10 Replies Latest reply on May 11, 2012 10:46 PM by Trong Nguyen

    javax.naming.NameNotFoundException: persistence not bound

    rac-tech Newbie

      Hi

       

      I have an ear that consists of a ejb module and a war module. The SpringInitiServiceImpl (ejb) listed in the following jboss xml is in a jar file(sss.jar). The sss.jar file is in the lib folder in the ear root(ear/lib) . When this is deployed in JBoss 5, an exception is thrown(list at the bottom).

       

      I can see that just after this exception is thrown, the persistent unit is loading.

       

      Is this a loading sequence issue?

       

      ------------------------------------

       

      12:04:55,542 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=sss.ear/sss.jar#smalllake-bopc

      12:04:55,589 INFO  [Version] Hibernate Annotations 3.4.0.GA

      12:04:55,589 INFO  [Environment] Hibernate 3.3.1.GA

      12:04:55,605 INFO  [Environment] hibernate.properties not found

      12:04:55,605 INFO  [Environment] Bytecode provider name : javassist

      12:04:55,605 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling

      12:04:55,667 INFO  [Version] Hibernate Commons Annotations 3.1.0.GA

      12:04:55,667 INFO  [Version] Hibernate EntityManager 3.4.0.GA

      12:04:55,683 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [

      name: smalllake-bopc

      -----------------------------------

      Any help would be highly appreciated.

      The more required details are listed below.

       

       

      --------------------------------------------------------------------------------------

      Struture

      -----------

       

      ear/lib

             - sss.jar

               ........

               ........

       

      ear/META-INF

                -application.xml

                -jboss-app.xml

      ear/abc.jar

                    -com

                    -META-INF

                               -jboss.xml

                               -persistence.xml

      ear/abc.war

       

      -----------------------------------------------------------------------------------------

       

      Error

      -------

       

       

      java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

      at org.jboss.ejb3.service.ServiceContainer.invokeOptionalMethod(ServiceContainer.java:381)

      at org.jboss.ejb3.service.ServiceContainer.create(ServiceContainer.java:206)

      ....

      at org.jboss.Main$1.run(Main.java:556)

      at java.lang.Thread.run(Unknown Source)

       

       

      Caused by: java.lang.reflect.InvocationTargetException

      ....

      Caused by: org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition. Group resource name [classpath*:beanRefContext.xml], factory key [null]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'factoryKey' defined in URL [vfszip:/D:/JavaDev/software/jboss-5.1.0.GA/server/default/deploy/sss.ear/sss.jar/beanRefContext.xml]:

       

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'factoryKey' defined in URL [vfszip:/D:/JavaDev/software/jboss-5.1.0.GA/server/default/deploy/sss.ear/sss.jar/beanRefContext.xml]: Instantiation of bean failed; nested exception

      .............

      .............

      at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:384)

      ... 67 more

      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.ClassPathXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service.PrCa' defined in class path resource [spring-conf.xml]: Cannot resolve reference to bean 'delegate.PrCa' while setting bean property 'delegate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'delegate.PrCa' defined in class path resource [spring-conf.xml]: Cannot resolve reference to bean 'dao.PrOffer' while setting bean property 'PrOfferDao';

      ............

      ............

      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smalllake-bopc': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: persistence not bound

      ..........

      ..........

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'delegate.PrCa' defined in class path resource [spring-conf.xml]: Cannot resolve reference to bean 'dao.PrOffer' while setting bean property 'PrOfferDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dao.PrOffer': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'smalllake-bopc': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: persistence not bound

      ............

      ............

      Caused by: javax.naming.NameNotFoundException: persistence 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:726)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)

      at javax.naming.InitialContext.lookup(Unknown Source)

      at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)

      at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)

      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)

      at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)

      at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)

      at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)

      at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)

      at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)

      ... 133 more

        • 1. Re: javax.naming.NameNotFoundException: persistence not bound
          Wolf-Dieter Fink Master

          What version of JBoss you use 5.0.1 or 5.1.0?

          I have problems with 5.0 with the persistence, after migrate to 5.1 it disapeared.

           

          Do you see that the entities are analysed and deployed? Maybe hibernate does not find the classes ...

          • 2. Re: javax.naming.NameNotFoundException: persistence not bound
            rac-tech Newbie

            Thank you for the reply

             

            The JBoss version is 5.1.0.

             

            Persistent unit(smalllake-bopc) is deployed with a warning just after this exception is thrown. Please see a portion of the log below

            ----------------------------------------------------------------------------------------------------------

            Caused by: javax.naming.NameNotFoundException: persistence not bound

            at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)

            ....

            ....

            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1400)

            ... 133 more

             

            09:10:29,332 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=sss.ear/sss.jar#smalllake-bopc

            09:10:29,379 INFO  [Version] Hibernate Annotations 3.4.0.GA

            09:10:29,394 INFO  [Environment] Hibernate 3.3.1.GA

            09:10:29,394 INFO  [Environment] hibernate.properties not found

            09:10:29,394 INFO  [Environment] Bytecode provider name : javassist

            09:10:29,394 INFO  [Environment] using JDK 1.4 java.sql.Timestamp handling

            09:10:29,457 INFO  [Version] Hibernate Commons Annotations 3.1.0.GA

            09:10:29,457 INFO  [Version] Hibernate EntityManager 3.4.0.GA

            09:10:29,488 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [

            name: smalllake-bopc

            ...]

            09:10:29,582 WARN  [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.

            • 3. Re: javax.naming.NameNotFoundException: persistence not bound
              rac-tech Newbie

              This issue has been fixed and I'm publishing what was done in case this could help someone else out there.

               

              ---------------------------------------------------------------------------------------

              I found out that this error is a misleading error due to a jndi name used. The JNDI name used for "jboss.entity.manager.factory.jndi.name"(declared in persistence.xml)  was in the pattern "java:/persistence/abc" Although the error message "Persistence not bound" it should have been "persistence/abc not bound". It could be some error of the error message generation.

               

              So the actual error was jboss.entity.manager.factory.jndi.name(declared in persistence.xml) is not bound. I noticed that this JNDI lookup is done(by EhCache) at the start up time just before binding this persistence unit JNDI name.

               

              Solution

              ------------

               

              After adding the following property to persistence.xml(inside <properties> ) and applying JBoss patches the error went away.

               

              <property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"/>

              • 4. javax.naming.NameNotFoundException: persistence not bound
                Derya Altuntas Newbie

                rac-tech I am not using Hibernate in my application.But I am getting same error.I also tried to add property as you specified.

                But error still exists.What Can I do? I need help.This is my first EJB try.But I could not deployed

                 

                20:41:52,968 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU state=Create: javax.naming.NameNotFoundException: SiguardEJBJNDI not bound
                at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]
                at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]
                at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]
                at org.jnp.server.NamingServer.lookup(NamingServer.java:443) [:5.0.5.Final]
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728) [:5.0.5.Final]
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]
                at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_13]
                at org.jboss.jpa.impl.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:120) [:2.0.0]
                at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:252) [:1.0.2-alpha-3]
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_13]
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_13]
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_13]
                at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_13]
                at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:60) [jboss-reflect.jar:2.2.0.GA]
                at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:168) [jboss-reflect.jar:2.2.0.GA]
                at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) [jboss-reflect.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:257) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:125) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:72) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:202) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]
                at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]
                at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
                at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
                at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
                at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
                at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
                at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]
                at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
                at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]
                at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]
                at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]
                at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]
                at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]
                at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]
                at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]
                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.0.0.Final]
                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
                at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]

                20:41:53,000 INFO  [SessionSpecContainer] Starting jboss.j2ee:jar=SiguardEJB.jar,name=FileManager,service=EJB3
                20:41:53,015 INFO  [EJBContainer] STARTED EJB: com.siemens.SessionBean.FileManager.FileManager ejbName: FileManager
                20:41:53,015 INFO  [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:


                20:41:53,015 WARN  [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers
                20:41:53,562 INFO  [AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:FileManager

                FileManager/no-interface -> EJB3.1 no-interface view

                20:41:53,718 INFO  [xnio] XNIO Version 2.1.0.CR2
                20:41:53,734 INFO  [nio] XNIO NIO Implementation Version 2.1.0.CR2
                20:41:54,187 INFO  [remoting] JBoss Remoting version 3.1.0.Beta2
                20:41:54,421 INFO  [TomcatDeployment] deploy, ctxPath=/
                20:41:54,500 INFO  [service] Removing bootstrap log handlers
                20:41:54,609 ERROR [ProfileServiceBootstrap] Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                DEPLOYMENTS IN ERROR:
                  Deployment "persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU" is in error due to the following reason(s): javax.naming.NameNotFoundException: SiguardEJBJNDI not bound

                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
                at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
                at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
                at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
                at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
                at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
                at java.lang.Thread.run(Thread.java:619) [:1.6.0_13]

                20:41:54,671 INFO  [org.apache.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
                20:41:54,671 INFO  [org.apache.coyote.ajp.AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                20:41:54,671 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] JBossAS [6.0.0.Final "Neo"] Started in 3m:42s:468ms

                • 5. javax.naming.NameNotFoundException: persistence not bound
                  Wolf-Dieter Fink Master

                  Might be a different problem.

                  Please post your JBoss version and attach your persistence.xml of your EAR file.

                  Also your datasource *-ds.xml

                  • 6. Re: javax.naming.NameNotFoundException: persistence not bound
                    Derya Altuntas Newbie

                    My JBoss Version 6.0.0- Final.

                     

                    All other file is in attachment

                    • 7. Re: javax.naming.NameNotFoundException: persistence not bound
                      Wolf-Dieter Fink Master

                      You should use

                      <jta-data-source>java:/SiguardEJBJNDI</jta-data-source>

                      in you persistence.xml

                      • 8. Re: javax.naming.NameNotFoundException: persistence not bound
                        Derya Altuntas Newbie

                        Thank you so much.I did not get any error.But I did not get aany success message.Do you think my application is deployed?

                         

                        0:01:29,661 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] Stopping persistence unit persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,661 INFO [org.hibernate.impl.SessionFactoryImpl] closing

                        10:01:29,661 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Unbinding factory from JNDI name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,661 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

                        10:01:29,661 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Unbound factory from JNDI name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,677 INFO [org.jboss.ejb3.session.SessionSpecContainer] Stopping jboss.j2ee:jar=SiguardEJB.jar,name=FileManagerBean,service=EJB3

                        10:01:29,677 INFO [org.jboss.ejb3.EJBContainer] STOPPED EJB: com.siemens.SessionBean.FileManager.FileManagerBean ejbName: FileManagerBean

                        10:01:29,693 INFO [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Uninstalled org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@9a398d from MC at org.jboss.ejb.bean.instantiator/SiguardEJB/SiguardEJB/FileManagerBean

                        10:01:29,724 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@6651775{vfs:///D:/jboss-6.0.0.Final/server/default/deploy/SiguardEJB.jar}

                        10:01:29,724 INFO [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@6651775{vfs:///D:/jboss-6.0.0.Final/server/default/deploy/SiguardEJB.jar}

                        10:01:29,724 INFO [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@9a398d into MC at org.jboss.ejb.bean.instantiator/SiguardEJB/SiguardEJB/FileManagerBean

                        10:01:29,724 WARN [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: SiguardEJB.jar

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:jar=SiguardEJB.jar,name=FileManagerBean,service=EJB3

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] with dependencies:

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] and demands:

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jboss.ejb:service=EJBTimerService; Required: Described

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jboss-switchboard:appName=SiguardEJB,module=SiguardEJB,name=FileManagerBean; Required: Create

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] and supplies:

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jndi:FileManagerBean/remote

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jndi:FileManagerBean

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jndi:FileManagerBean/local-com.siemens.SessionBean.FileManager.FileManagerBeanLocal

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] Class:com.siemens.SessionBean.FileManager.FileManagerBeanLocal

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jndi:FileManagerBean/local

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] jndi:FileManagerBean/remote-com.siemens.SessionBean.FileManager.FileManagerBeanRemote

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] Class:com.siemens.SessionBean.FileManager.FileManagerBeanRemote

                        10:01:29,755 INFO [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:jar=SiguardEJB.jar,name=FileManagerBean,service=EJB3) to KernelDeployment of: SiguardEJB.jar

                        10:01:29,755 INFO [org.jboss.jpa.deployment.PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,771 INFO [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [

                        name: SiguardEJBPU

                        ...]

                        10:01:29,771 WARN [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly.PersistenceUnitInfo.getNewTempClassLoader() is null.

                        10:01:29,771 INFO [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

                        10:01:29,771 INFO [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

                        10:01:29,771 INFO [org.hibernate.validator.engine.resolver.DefaultTraversableResolver] Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.

                        10:01:29,771 INFO [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.

                        10:01:29,786 INFO [org.hibernate.connection.ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

                        10:01:29,786 INFO [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] Using provided datasource

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Database ->

                        name : MySQL

                        version : 5.1.51-community

                        major : 5

                        minor : 1

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Driver ->

                        name : MySQL-AB JDBC Driver

                        version : mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )

                        major : 5

                        minor : 1

                        10:01:29,786 INFO [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.MySQLDialect

                        10:01:29,786 INFO [org.hibernate.engine.jdbc.JdbcSupportLoader] Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4

                        10:01:29,786 INFO [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory

                        10:01:29,786 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup

                        10:01:29,786 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch size: 15

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): enabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Connection release mode: auto

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Maximum outer join fetch depth: 2

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Order SQL inserts for batching: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory

                        10:01:29,786 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] JPA-QL strict compliance: enabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Query cache: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge

                        10:01:29,786 INFO [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Cache region prefix: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Statistics: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Named query checking : enabled

                        10:01:29,786 INFO [org.hibernate.cfg.SettingsFactory] Check Nullability in Core (should be disabled when Bean Validation is on): disabled

                        10:01:29,786 INFO [org.hibernate.impl.SessionFactoryImpl] building session factory

                        10:01:29,786 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,786 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

                        10:01:29,802 INFO [org.hibernate.impl.SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=SiguardEJB.jar#SiguardEJBPU

                        10:01:29,802 WARN [org.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext

                        10:01:29,802 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

                        10:01:29,802 INFO [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:jar=SiguardEJB.jar,name=FileManagerBean,service=EJB3

                        10:01:29,802 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB: com.siemens.SessionBean.FileManager.FileManagerBean ejbName: FileManagerBean

                        10:01:29,818 INFO [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:

                         

                        FileManagerBean/remote - EJB3.x Default Remote Business Interface

                        FileManagerBean/remote-com.siemens.SessionBean.FileManager.FileManagerBeanRemote - EJB3.x Remote Business Interface

                        FileManagerBean/local - EJB3.x Default Local Business Interface

                        FileManagerBean/local-com.siemens.SessionBean.FileManager.FileManagerBeanLocal - EJB3.x Local Business Interface

                         

                        10:01:29,818 WARN [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers

                        • 9. Re: javax.naming.NameNotFoundException: persistence not bound
                          Wolf-Dieter Fink Master

                          is FileManagerBean part of your app? Looks like deployed.

                          You might check it with jmx-console or management-console or try to use it

                          • 10. Re: javax.naming.NameNotFoundException: persistence not bound
                            Trong Nguyen Newbie

                            You have to add below libs into: "c:\jboss-6.1.0.Final\server\default\lib" (I used JBoss 6.1.final ). 
                            1. eclipselink-2.3.0.jar
                            2. javax.persistence-2.0.jar
                            3. org.eclipse.persistence.jpa.jar
                            4. org.eclipse.persistence.jpa.jpql_1.0.0.jar

                            my persistence.xml
                            <?xml version="1.0" encoding="UTF-8"?>
                            <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                            xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                            http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
                              <persistence-unit name="BluePumpkin-ejbPU" transaction-type="JTA">
                                 <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
                                <jta-data-source>java:/Bluepumpkin</jta-data-source>
                                <exclude-unlisted-classes>false</exclude-unlisted-classes>
                                <properties/>
                              </persistence-unit>
                            </persistence>

                            My jboos-ds.xml

                            <?xml version="1.0" encoding="UTF-8"?>
                            <datasources>
                              <local-tx-datasource>
                                <jndi-name>Bluepumpkin</jndi-name>
                                <connection-
                            url>jdbc:sqlserver://localhost:1433;databaseName=BluePumpkinDB</connection-url>
                                <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                                <user-name>sa</user-name>
                                <password/>
                                <min-pool-size>5</min-pool-size>
                                <max-pool-size>20</max-pool-size>
                                <idle-timeout-minutes>5</idle-timeout-minutes>
                              </local-tx-datasource>
                            </datasources>