0 Replies Latest reply on Mar 23, 2009 1:52 AM by Cruz Fernandez

    Wicket Example on Tomcat

    Cruz Fernandez Newbie

      When deployed on Tomcat 6.0 the wicket example, it is not building the War with the necesary wicket jars. They are missing in the WEB-INF/lib directory.


      When the war is loaded in tomcat an error in the loading of WEB-INF/components.xml is thrown:


      java.lang.RuntimeException: error while reading /WEB-INF/components.xml
              at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:231)
              at org.jboss.seam.init.Initialization.create(Initialization.java:134)
              at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
              at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
              at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
              at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
              at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
              at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
              at org.apache.catalina.core.StandardService.start(StandardService.java:516)
              at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.RuntimeException: Error loading element WebApplication with component name null and component class null
              at org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:352)
              at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227)
              ... 26 more




      The examples/build.xml is missing this jars, adding this to build.xml fixes it:



      --- build.xml     2008-12-19 02:27:17.000000000 -0200
      +++ build.xml.fixed     2009-03-22 21:13:59.000000000 -0300
      @@ -870,16 +870,19 @@
            <target name="tomcat.war" depends="war">
                 <copy todir="${war.dir}/WEB-INF/lib">
                      <fileset refid="seam.jar" />
                      <fileset refid="tomcat.war.extras" />
                      <fileset refid="cglib.jar" />
                      <fileset refid="drools.jar" />
                      <fileset refid="cache.jar" />
                      <fileset refid="jbpm.jar" />
      +               <fileset refid="wicket-extensions.jar" />
      +               <fileset refid="wicket-datetime.jar" />
      +               <fileset refid="seam.wicket.jar" />
                      <fileset refid="tomcat.jbpm.jar" />
                      <fileset refid="spring.jar" />
                      <fileset refid="gwt.jar" />
                      <fileset refid="openid.jar" />
                      <fileset refid="jboss-el.jar" />
                      <fileset refid="jsf.jar" />
                      <fileset refid="search.jar" />
                      <fileset refid="richfaces-api.jar" />