5 Replies Latest reply on Feb 27, 2009 10:51 PM by Israel Lacerra

    Jboss 5 and Seam 2.1.1

    Israel Lacerra Newbie
      I'm trying to run my seam 2.1.1 app on jboss 5 (it works on jboss 4.2.2). But when a seam component try to find a ejb3, something goes wrong and I get a javax.nameNotFoundException.

      Apparently everything is ok...

      my beans:


      15:45:34,057 INFO  [JBossASKernel] installing bean: jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=DomainEntitiesConverterBean,service=EJB3
      15:45:34,057 INFO  [JBossASKernel]   with dependencies:
      15:45:34,057 INFO  [JBossASKernel]   and demands:
      15:45:34,057 INFO  [JBossASKernel]      jboss.ejb:service=EJBTimerService
      15:45:34,057 INFO  [JBossASKernel]      jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO
      15:45:34,057 INFO  [JBossASKernel]   and supplies:
      15:45:34,057 INFO  [JBossASKernel]      jndi:rosys-core/DomainEntitiesConverterBean/local
      15:45:34,057 INFO  [JBossASKernel]      jndi:rosys-core/DomainEntitiesConverterBean/remote
      15:45:34,057 INFO  [JBossASKernel]      Class:br.com.riskoffice.domain.ui.web.DomainEntitiesConverter
      15:45:34,057 INFO  [JBossASKernel]      jndi:rosys-core/DomainEntitiesConverterBean/local-br.com.riskoffice.domain.ui.web.DomainEntitiesConverter
      15:45:34,057 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=DomainEntitiesConverterBean,service=EJB3) to KernelDeployment of: rosys-core.jar


      and my components:
      15:45:56,795 INFO  [Component] Component: walletEx, scope: SESSION, type: JAVA_BEAN, class: br.com.riskoffice.domain.ui.web.WalletEx
      15:45:56,797 INFO  [Component] Component: walletsAliasQuery, scope: EVENT, type: JAVA_BEAN, class: br.com.riskoffice.domain.ui.web.WalletsAliasQuery
      15:45:56,799 INFO  [Component] Component: walletsQuery, scope: EVENT, type: JAVA_BEAN, class: br.com.riskoffice.domain.ui.web.WalletsQuery
      15:45:56,803 INFO  [Contexts] starting up: org.jboss.seam.security.persistentPermissionResolver


      are created without errors.


      Is there any special config I have to make in Seam to work with Jboss 5 ?



      thanks
      Israel
        • 2. Re: Jboss 5 and Seam 2.1.1
          John Ament Master

          what do you have in components.properties? what about the core:init bean in components.xml?

          • 3. Re: Jboss 5 and Seam 2.1.1
            Israel Lacerra Newbie
            > Where is the error?

            I forgot the most important! :-)

            Here is:

            13:57:58,764 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

            *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedCorporateBondManagerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedCorporateBondManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedDerivativeManagerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedDerivativeManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedFutureManagerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedFutureManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/TagGenBean/local-br.com.riskoffice.risk.tags.TagGen' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedFutureManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedGovernmentBondManagerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedGovernmentBondManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedStockOptionManagerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AdvancedStockOptionManagerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AlphaDebBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AlphaDebBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AlphaDebBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/ComputationAdvancedFlowBean/local-br.com.riskoffice.risk.computations.ComputationAdvancedFlow' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFileUploadBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFileUploadBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFileUploadBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFundLoaderBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFundLoaderBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFundLoaderBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidFundLoaderBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/RobotLoaderStatusDAOBean/local-br.com.riskoffice.robot.RobotLoaderStatusDAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidRobotBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidRobotBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/RobotLoaderStatusDAOBean/local-br.com.riskoffice.robot.RobotLoaderStatusDAO' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidRobotBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/AnbidWorkerBean/local-br.com.riskoffice.robot.anbid.AnbidWorker' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidRobotBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/AnbidFundLoaderBean/local-br.com.riskoffice.robot.anbid.AnbidFundLoader' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidRobotBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidSchedulerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidSchedulerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/AnbidRobotBean/local-br.com.riskoffice.robot.anbid.AnbidRobot' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidWorkerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidWorkerBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AnbidWorkerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/Ejb3DAOBean/local-br.com.riskoffice.ejb3.Ejb3DAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketLoaderBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketLoaderBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/RobotLoaderStatusDAOBean/local-br.com.riskoffice.robot.RobotLoaderStatusDAO' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketLoaderBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketWorkerBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketWorkerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/AndimaDebSideMarketLoaderBean/local-br.com.riskoffice.robot.andima.AndimaDebSideMarketLoader' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaDebSideMarketWorkerBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/RobotLoaderStatusDAOBean/local-br.com.riskoffice.robot.RobotLoaderStatusDAO' **}

            jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaFileExporterBean,service=EJB3
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaFileExporterBean,service=EJB3>{Described:** UNRESOLVED Demands 'jndi:rosys-core/AndimaLoaderBean/local-br.com.riskoffice.robot.andima.AndimaLoader' **}
            -> <UNKNOWN jboss.j2ee:ear=rosys-core.ear,jar=rosys-core.jar,name=AndimaFileExporterBean,service=EJB3>{Described:** UNRESOLVED Demands 'persistence.unit:unitName=rosys-core.ear/rosys-core.jar#rosys' **}

            ...





            >what do you have in components.properties?
            I don t have one.

            >what about the core:init bean in components.xml?
            <core:init jndi-pattern="rosys-core/#{ejbName}/local" />
            • 4. Re: Jboss 5 and Seam 2.1.1
              Israel Lacerra Newbie
              And when I use a method with @Observer("org.jboss.seam.postInitialization"):

              14:03:54,953 ERROR [[/]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
              org.jboss.seam.InstantiationException: Could not instantiate Seam component: anbidScheduler
                      at org.jboss.seam.Component.newInstance(Component.java:2106)
                      at org.jboss.seam.Component.getInstance(Component.java:1988)
                      at org.jboss.seam.Component.getInstance(Component.java:1950)
                      at org.jboss.seam.Component.getInstance(Component.java:1944)
                      at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2311)
                      at org.jboss.seam.Component.getValueToInject(Component.java:2263)
                      at org.jboss.seam.Component.injectAttributes(Component.java:1703)
                      at org.jboss.seam.Component.inject(Component.java:1521)
                      at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61)
                      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                      at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
                      at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                      at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                      at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
                      at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
                      at br.com.riskoffice.robot.RobotSchedulersStarter_$$_javassist_1.scheduleTimer(RobotSchedulersStarter_$$_javassist_1.java)
                      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.jboss.seam.util.Reflections.invoke(Reflections.java:22)
                      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
                      at org.jboss.seam.Component.callComponentMethod(Component.java:2211)
                      at org.jboss.seam.core.Events.raiseEvent(Events.java:85)
                      at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:114)
                      at org.jboss.seam.init.Initialization.init(Initialization.java:735)
                      at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
                      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
                      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:367)
                      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146)
                      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:460)
                      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
                      at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
                      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.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 $Proxy36.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:286)
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                      at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
                      at org.jboss.system.ServiceController.start(ServiceController.java:460)
                      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
                      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
                      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
                      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:171)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
                      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
                      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
                      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
                      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
                      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
                      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
                      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
                      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
                      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
                      at org.jboss.Main.boot(Main.java:209)
                      at org.jboss.Main$1.run(Main.java:547)
                      at java.lang.Thread.run(Thread.java:636)
              Caused by: javax.naming.NameNotFoundException: AnbidSchedulerBean not bound
                      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
                      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
                      at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
                      at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
                      at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
                      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
                      at javax.naming.InitialContext.lookup(InitialContext.java:409)
                      at org.jboss.seam.Component.instantiateSessionBean(Component.java:1367)
                      at org.jboss.seam.Component.instantiate(Component.java:1331)
                      at org.jboss.seam.Component.newInstance(Component.java:2084)
                      ... 85 more


              AnbidSchedulerBean it's not the problem. It's just the first bean searched...