11 Replies Latest reply on Jul 11, 2008 11:02 AM by Joshua Jackson

    Seam on JBoss AS 5.0.0.CR1

    Joshua Jackson Master

      Dear all,


      Has anyone tried Seam on JBoss AS 5.0.0.CR1 yet? Does it run smooth? Could you share your experience.


      Many thanks

        • 1. Re: Seam on JBoss AS 5.0.0.CR1
          Stan Silvert Newbie

          Hi Joshua,


          Right now there are no known issues with Seam/AS 5 compatibility.  I've run a few of the example apps on it and had no problems.  However, you do need to make sure you are using Seam 2.0.3 CR1.


          Regards,


          Stan

          • 2. Re: Seam on JBoss AS 5.0.0.CR1
            Georges Goebel Newbie

            Hi,


            I am using seam 2.1.0A successfully under jboss 4.2.2 but in the meanwhile I gave jboss 5.0 CR1 a try with my application and I get plenty of exceptions. So before trying to solve the exceptions, I want to ask if Seam 2.1.0A is compatible with jboss 5 CR1 as the release date of seam 2.1.0A was in february


            Thanks


            Georges

            • 3. Re: Seam on JBoss AS 5.0.0.CR1
              Georges Goebel Newbie

              To fast,


              I included the jboss-seam-jas5.jar in my ear and the exceptions disapeared


              Georges Goebel

              • 4. Re: Seam on JBoss AS 5.0.0.CR1
                Joshua Jackson Master

                Stan Silvert wrote on Jul 02, 2008 14:50:


                Hi Joshua,

                Right now there are no known issues with Seam/AS 5 compatibility.  I've run a few of the example apps on it and had no problems.  However, you do need to make sure you are using Seam 2.0.3 CR1.


                Hi Stan,


                I've tried Seam 2.1.0.A1 and faced an error where the SeamEntityManager can not connect to the datasource. It seems that the web-archive is started first before the datasource. Did you faced this issue?


                Many thanks.

                • 5. Re: Seam on JBoss AS 5.0.0.CR1
                  Jay Balunas Novice

                  There was an upgrade to facelets that was part of the Seam 2.0.3.CR1 release that was not in 2.1.0.A1 - it will be in the next 2.1 release.  This might be what you are running into.  If you post the error, and deployment part of the log we should be able to confirm.


                  -Jay

                  • 6. Re: Seam on JBoss AS 5.0.0.CR1
                    Tomaz Cerar Master

                    Joshua: I have faced that problem...
                    in CR1 build there is problem with dependencies at start up of app server.


                    anyhow, the problem is already fixed in trunk code, so you can build jboss yourself or just download nightly build from hudson. http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-5.0.x/


                    cheers,
                    tomaz

                    • 7. Re: Seam on JBoss AS 5.0.0.CR1
                      Joshua Jackson Master

                      Tomaz Cerar wrote on Jul 08, 2008 17:46:


                      Joshua: I have faced that problem...
                      in CR1 build there is problem with dependencies at start up of app server.

                      anyhow, the problem is already fixed in trunk code, so you can build jboss yourself or just download nightly build from hudson. http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-5.0.x/



                      Hi Thomas,
                      Thanks for the confirmation. Really helpful :)

                      • 8. Re: Seam on JBoss AS 5.0.0.CR1
                        Joshua Jackson Master

                        georges goebel wrote on Jul 08, 2008 10:07:


                        I am using seam 2.1.0A successfully under jboss 4.2.2 but in the meanwhile I gave jboss 5.0 CR1 a try with my application and I get plenty of exceptions. So before trying to solve the exceptions, I want to ask if Seam 2.1.0A is compatible with jboss 5 CR1 as the release date of seam 2.1.0A was in february



                        Yeah I also wonder why does Seam 2.1.0.A1 does not work in JBoss AS 5.0.0.CR1.

                        • 9. Re: Seam on JBoss AS 5.0.0.CR1
                          Joshua Jackson Master

                          This is the error that I've received:


                          2:54:51,606 ERROR [DatasourceConnectionProvider] Could not find datasource: java:/seamDatasource
                          javax.naming.NameNotFoundException: seamDatasource not bound
                               at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
                               at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
                               at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
                               at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
                               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:669)
                               at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
                               at javax.naming.InitialContext.lookup(InitialContext.java:351)
                               at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
                               at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:114)
                               at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
                               at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:66)
                               at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2078)
                               at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1302)
                               at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:854)
                               at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
                               at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
                               at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
                               at org.jboss.seam.persistence.EntityManagerFactory.createEntityManagerFactory(EntityManagerFactory.java:85)
                               at org.jboss.seam.persistence.EntityManagerFactory.startup(EntityManagerFactory.java:50)
                               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.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                               at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                               at org.jboss.seam.Component.callComponentMethod(Component.java:2100)
                               at org.jboss.seam.Component.callCreateMethod(Component.java:2015)
                               at org.jboss.seam.Component.newInstance(Component.java:1976)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
                               at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
                               at org.jboss.seam.init.Initialization.init(Initialization.java:596)
                               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
                               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3862)
                               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
                               at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:346)
                               at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:139)
                               at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:431)
                               at org.jboss.web.deployers.WebModule.startModule(WebModule.java:112)
                               at org.jboss.web.deployers.WebModule.start(WebModule.java:90)
                               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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                               at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
                               at $Proxy35.start(Unknown Source)
                               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
                               at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
                               at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
                               at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
                               at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
                               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                               at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:271)
                               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
                               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
                               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
                               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
                               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:624)
                               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:442)
                               at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:88)
                               at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:46)
                               at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
                               at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                               at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
                               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
                               at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:991)
                               at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
                               at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                               at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
                               at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
                               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
                               at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
                               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
                               at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
                               at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
                               at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
                               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:257)
                               at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:135)
                               at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
                               at org.jboss.Main.boot(Main.java:209)
                               at org.jboss.Main$1.run(Main.java:544)
                               at java.lang.Thread.run(Thread.java:613)
                          12:54:51,609 ERROR [[/seam]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                          org.jboss.seam.InstantiationException: Could not instantiate Seam component: seamEntityManagerFactory
                               at org.jboss.seam.Component.newInstance(Component.java:1986)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
                               at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
                               at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
                               at org.jboss.seam.init.Initialization.init(Initialization.java:596)
                               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
                               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3862)
                               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
                          



                          It seems that the WeDeployer is started first before the JCA. I already used JBoss Seam 2.0.3.CR1 deployed on JBoss AS 5.0.0.CR1. I also already include the jboss-seam-jbas5.jar library in the classpath. Did anyone know how to face this issue? What haven't I done yet?


                          Many thanks

                          • 10. Re: Seam on JBoss AS 5.0.0.CR1
                            Ales Justin Master
                            Yup, as Tomaz said, this is a known issue in JBoss5.CR1:
                            - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=138587

                            As you can read, there is a few workarounds:
                            - use JBoss5 trunk or Hudson build (+ update jboss-reflect.jar from its trunk)
                            - add that missing '-beans.xml' to deloyers.xml + update jboss-reflect.jar from its trunk
                            - wrap DS with some lazy warpper (doing ds jndi lookup when actually hitting ds)

                            • 11. Re: Seam on JBoss AS 5.0.0.CR1
                              Joshua Jackson Master

                              Ales Justin wrote on Jul 11, 2008 10:47:


                              Yup, as Tomaz said, this is a known issue in JBoss5.CR1:

                              As you can read, there is a few workarounds:
                              - use JBoss5 trunk or Hudson build (update jboss-reflect.jar from its trunk)
                              - add that missing '-beans.xml' to deloyers.xml  update jboss-reflect.jar from its trunk
                              - wrap DS with some lazy warpper (doing ds jndi lookup when actually hitting ds)




                              Thanks Ales. Since Stan said that he didn't face the same problem, I thought there was a solution to this.