1 Reply Latest reply on Dec 3, 2009 9:27 PM by Vaughn Butt

    error while deploying seam app on JB-AS 5.0.1.GA

    Mert Caliskan Newbie

      Hi,
      I'm mavenizing seam's identity management scaffolding app. It's based on seam 2.1.2-SNAPSHOT. When I try to deploy the app to Jboss Application Server 5.0.1.GA, I got the
      appserver not bound. I'm pretty sure that I don't have jndi resource named appserver (only have the ontoidmanDatasource).


      So any idea where this appserver jndi name might be coming from?




      javax.persistence.PersistenceException: [PersistenceUnit: ontoidman] Unable to build EntityManagerFactory
           at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
           at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
           at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
           at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
           at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
           at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
           at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
           at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
           at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
           at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
           at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
           at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
           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.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.install(AbstractController.java:774)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
           at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
           at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
           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.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:698)
           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(Unknown Source)
      Caused by: org.hibernate.HibernateException: Could not locate TransactionManager
           at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:60)
           at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:357)
           at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
           at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
           at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
           ... 50 more
      Caused by: javax.naming.NameNotFoundException: appserver 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.interfaces.NamingContext.lookup(NamingContext.java:722)
           at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
           at javax.naming.InitialContext.lookup(Unknown Source)
           at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:57)
           ... 54 more


        • 1. Re: error while deploying seam app on JB-AS 5.0.1.GA
          Vaughn Butt Newbie

          This post is not a definitive response to this question but it might help.


          I had the same error message (Caused by: javax.naming.NameNotFoundException: appserver not bound) when I was trying to get SeamTest (ie embedded JBoss) to work after getting a seam-gen 2.2.0GA created project to deploy to Glassfish.


          The project uses hibernate rather than JPA.


          In the hibernate.cfg.xml for glassfish we have


            <property name="transaction.manager_lookup_class">org.hibernate.transaction.SunONETransactionManagerLookup</property>



          When I tried to use this in a SeamTest I got the error you describe.


          The error went away after I changed the transaction.manager_lookup_class to be:



            <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>



          The error/stacktrace was replaced by:


          ERROR [org.hibernate.impl.SessionFactoryObjectFactory] Invalid JNDI name:
          javax.naming.InvalidNameException



          but the code did work in the SeamTest.