3 Replies Latest reply on Sep 12, 2009 9:44 PM by Coen Damen

    Running Maven2 Seam projects from within Eclipse with Tomcat Embedded Jboss

    Coen Damen Novice

      Hi,


      I have 4 Maven2 Seam projects in Eclipse. I want to run the WAR and EJB from Tomcat embedded Jboss within Eclipse. The projects work fine when I deploy the EAR to a JBoss (4.2.2) server.


      I followed the instructions to get Tomcat and Embedded Jboss working from the Seam documentation and all is fine.


      What I did was I made a reference in Eclipse to the EJB project in the WAR file. I worked with web applications before and this is how to run them from within Eclipse.


      However, when I add the projects (the WAR and linked EJB) to the Tomcat6 runtime and start up the server, I get this:


      
      Jan 9, 2009 11:51:11 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
      WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:umbrella-war' did not find a matching property.
      Jan 9, 2009 11:51:11 AM org.apache.catalina.core.AprLifecycleListener init
      Jan 9, 2009 11:51:11 AM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Jan 9, 2009 11:51:11 AM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 667 ms
      WARN  [org.jboss.mx.loading.UnifiedLoaderRepository3] Tried to add non-URLClassLoader.  Ignored
      WARN  [org.jboss.aop.deployment.AspectManagerService] Could not find base-aspects.xml file in the resources of org.apache.catalina.loader.StandardClassLoader@1632c2d
      INFO  [org.jboss.aop.deployers.AspectDeployer] Deploying xml into org.jboss.aop.AspectManager@66fcd5 for org.apache.catalina.loader.StandardClassLoader@1632c2d
      INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/Apps/apache-tomcat-6.0.18/lib/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
      INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/Apps/apache-tomcat-6.0.18/lib/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
      INFO  [org.jboss.resource.deployers.RARDeployment] Required license terms exist, view vfsfile:/C:/Apps/apache-tomcat-6.0.18/lib/deploy/jms-ra.rar/META-INF/ra.xml
      WARN  [org.jboss.jms.server.security.SecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
      INFO  [org.jboss.jms.server.ServerPeer] JBoss Messaging 1.4.0.SP1 server [0] started
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://NL-L3G2716:4457 has leasing enabled, lease period 10000 milliseconds
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@92e96c started
      INFO  [org.jboss.jms.server.destination.QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://NL-L3G2716:4457 has leasing enabled, lease period 10000 milliseconds
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@144d0c6 started
      WARN  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
      WARN  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] Connector bisocket://NL-L3G2716:4457 has leasing enabled, lease period 10000 milliseconds
      INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@e69696 started
      INFO  [org.jboss.jms.server.destination.QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
      INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      Jan 9, 2009 11:51:17 AM org.apache.catalina.core.StandardService start
      INFO: Starting service Catalina
      Jan 9, 2009 11:51:17 AM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
      Jan 9, 2009 11:51:17 AM org.apache.catalina.loader.WebappLoader start
      INFO: Dual registration of jndi stream handler: factory already defined
      Jan 9, 2009 11:51:17 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
      INFO: validateJarFile(C:\Workspaces\EclipseTNTUmbrellaWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\umbrella-war\WEB-INF\lib\servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
      INFO  [javax.servlet.ServletContextListener] Welcome to Seam 2.1.0.SP1
      WARN  [org.jboss.seam.Component] Component class should be serializable: org.jboss.seam.ui.facelet.mockHttpSession
      log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable.
      log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by 
      log4j:ERROR [WebappClassLoader
        delegate: false
        repositories:
          /WEB-INF/classes/
      ----------> Parent Classloader:
      org.apache.catalina.loader.StandardClassLoader@1632c2d
      ] whereas object of type 
      log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.apache.catalina.loader.StandardClassLoader@1632c2d].
      INFO  [org.quartz.simpl.SimpleThreadPool] Job execution threads will use class loader of thread: main
      INFO  [org.quartz.core.QuartzScheduler] Quartz Scheduler v.1.5.2 created.
      INFO  [org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
      INFO  [org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      INFO  [org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 1.5.2
      INFO  [org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      INFO  [org.ajax4jsf.cache.CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
      INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.DEVELOPMENT=true, javax.faces.DEFAULT_SUFFIX=.xhtml}
      INFO  [org.ajax4jsf.cache.LRUMapCacheFactory] Creating LRUMap cache instance of default capacity
      Jan 9, 2009 11:51:23 AM org.apache.catalina.core.ApplicationContext log
      SEVERE: StandardWrapper.Throwable
      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
              at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              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:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Jan 9, 2009 11:51:23 AM org.apache.catalina.core.StandardContext loadOnStartup
      SEVERE: Servlet /umbrella-war threw load() exception
      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
              at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
              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:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Jan 9, 2009 11:51:23 AM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      Jan 9, 2009 11:51:23 AM org.apache.jk.common.ChannelSocket init
      INFO: JK: ajp13 listening on /0.0.0.0:8009
      Jan 9, 2009 11:51:23 AM org.apache.jk.server.JkMain start
      INFO: Jk running ID=0 time=0/32  config=null
      Jan 9, 2009 11:51:23 AM org.apache.catalina.startup.Catalina start
      INFO: Server startup in 12226 ms
      
      



      Am I overlooking something here?


      Thanks for your reply,
      Coen