4 Replies Latest reply on May 29, 2012 8:16 AM by wdfink

    How to Change DefaultDS in jndi-name

    mthalis

      I developed simple EJB application, in that application I used Jndi-name as DefaultDS It worked perfeclty no exceptions and data goto database now I want to change Default jndi-name to another name like (mySource) if i change it to mySource i got exceptions. below show technologies I used .

       

      EJB3, Netbeans 6.9 IDE, Mysql 5.1, Jboss 5.1 and Ubuntu 9.1

       

      I copy mysql-connector to jboss-5.1.0.GA/server/default/lib this folder, and remove  -ds.xml files in jboss-5.1.0.GA/server/default/deploy and put

      mysql-ds.xml to it.

       

      Here it contain mysql-ds.xml

       

      <datasources>
        <local-tx-datasource>
          <jndi-name>mySource</jndi-name>
          <use-java-context>false</use-java-context>
          <connection-url>jdbc:mysql://192.168.1.3:3306/Man</connection-url>
          <driver-class>com.mysql.jdbc.Driver</driver-class>
          <user-name>ubuntu</user-name>
          <password>rahasak</password>
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
          <!-- should only be used on drivers after 3.22.1 with "ping" support
          <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
          -->
          <!-- sql to call when connection is created
          <new-connection-sql>some arbitrary sql</new-connection-sql>
            -->
          <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
          <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
            -->

       

          <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
          <metadata>
             <type-mapping>mySQL</type-mapping>
          </metadata>
        </local-tx-datasource>
      </datasources>

       

      persistent.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <persistence version="1.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_1_0.xsd">
        <persistence-unit name="JbossExample-ejbPU" transaction-type="JTA">
          <provider>oracle.toplink.essentials.PersistenceProvider</provider>
          <jta-data-source>java:/mySource</jta-data-source>
          <exclude-unlisted-classes>false</exclude-unlisted-classes>
          <properties/>
        </persistence-unit>
      </persistence>

       

      Below Show Errors I got

       

       

      14:43:38,108 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@13658395{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossExample.ear/JbossExample-ejb.jar/}
      14:43:38,108 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@13658395{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossExample.ear/JbossExample-ejb.jar/}
      14:43:38,108 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@13658395{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossExample.ear/JbossExample-ejb.jar/}
      14:43:38,108 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@13658395{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossExample.ear/JbossExample-ejb.jar/}
      14:43:38,537 INFO  [JBossASKernel] Created KernelDeployment for: JbossExample-ejb.jar
      14:43:38,545 INFO  [JBossASKernel] installing bean: jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3
      14:43:38,545 INFO  [JBossASKernel]   with dependencies:
      14:43:38,545 INFO  [JBossASKernel]   and demands:
      14:43:38,545 INFO  [JBossASKernel]     persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU
      14:43:38,545 INFO  [JBossASKernel]     jboss.ejb:service=EJBTimerService
      14:43:38,545 INFO  [JBossASKernel]   and supplies:
      14:43:38,545 INFO  [JBossASKernel]     jndi:JbossExample/ChildFacade/remote-Session.ChildFacadeRemote
      14:43:38,545 INFO  [JBossASKernel]     Class:Session.ChildFacadeRemote
      14:43:38,545 INFO  [JBossASKernel]     jndi:JbossExample/ChildFacade/remote
      14:43:38,545 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3) to KernelDeployment of: JbossExample-ejb.jar
      14:43:38,966 INFO  [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@9e3acc{name=jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
      14:43:38,973 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU
      14:43:38,974 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU state=Create
      javax.naming.NameNotFoundException: mySource 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:443)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at javax.naming.InitialContext.lookup(InitialContext.java:392)
          at org.jboss.jpa.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:111)
          at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275)
          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:597)
          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:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          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.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:1631)
          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
          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:702)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)
      14:43:39,007 INFO  [TomcatDeployment] deploy, ctxPath=/JbossExample-war
      14:43:39,059 WARN  [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

       

      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3" is missing the following dependencies:
          Dependency "<UNKNOWN jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU' **")
          Dependency "<UNKNOWN jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **")
        Deployment "jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")

       

      DEPLOYMENTS IN ERROR:
        Deployment "persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU" is in error due to the following reason(s): javax.naming.NameNotFoundException: mySource not bound
        Deployment "<UNKNOWN jboss.j2ee:ear=JbossExample.ear,jar=JbossExample-ejb.jar,name=ChildFacade,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **, ** UNRESOLVED Demands 'persistence.unit:unitName=JbossExample.ear/JbossExample-ejb.jar#JbossExample-ejbPU' **

       

          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:619)


       


      14:44:04,268 INFO  [[/JbossExample-war]] Marking servlet addRecord as unavailable
      14:44:04,268 ERROR [[addRecord]] Allocate exception for servlet addRecord
      javax.naming.NameNotFoundException: JbossExample 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(InitialContext.java:392)
          at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
          at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
          at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
          at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
          at org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:366)
          at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:271)
          at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:265)
          at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1006)
          at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)


      Please help me to do it. i  suffered Internet but unable to solve the problem, Is their any other files should i changed in Joss to this? I'm waiting for you're precious reply's.

       

      Thank You.

        • 1. Re: How to Change DefaultDS in jndi-name
          jaikiran

          Dinesh Nadeera wrote:

           


          <datasources>
            <local-tx-datasource>
              <jndi-name>mySource</jndi-name>
              <use-java-context>false</use-java-context>

          You are using use-java-context = false, which means that the datasource will not be bound to the java: namespace.

           

           

          So in your persistence.xml, change this:

          Dinesh Nadeera wrote:

           


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

           

          to:

           

          <jta-data-source>mySource</jta-data-source>
          
          • 2. Re: How to Change DefaultDS in jndi-name
            mthalis

            Thank for reply. I changed persistence.xml and run application I got below error

             

             

            21:13:16,150 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@9777223{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossEJB3.ear/JbossEJB3-ejb.jar/}
            21:13:16,183 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@9777223{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossEJB3.ear/JbossEJB3-ejb.jar/}
            21:13:16,183 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@9777223{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossEJB3.ear/JbossEJB3-ejb.jar/}
            21:13:16,183 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@9777223{vfszip:/home/dinesh/jboss-5.1.0.GA/server/default/deploy/JbossEJB3.ear/JbossEJB3-ejb.jar/}
            21:13:16,233 INFO  [JBossASKernel] Created KernelDeployment for: javassist.jar
            21:13:16,233 INFO  [JBossASKernel] installing bean: jboss.j2ee:ear=JbossEJB3-ejb.jar,jar=javassist.jar,name=javassist,service=EJB3
            21:13:16,233 INFO  [JBossASKernel]   with dependencies:
            21:13:16,234 INFO  [JBossASKernel]   and demands:
            21:13:16,234 INFO  [JBossASKernel]   and supplies:
            21:13:16,234 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=JbossEJB3-ejb.jar,jar=javassist.jar,name=javassist,service=EJB3) to KernelDeployment of: javassist.jar
            21:13:17,527 INFO  [JBossASKernel] Created KernelDeployment for: JbossEJB3-ejb.jar
            21:13:17,527 INFO  [JBossASKernel] installing bean: jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3
            21:13:17,527 INFO  [JBossASKernel]   with dependencies:
            21:13:17,527 INFO  [JBossASKernel]   and demands:
            21:13:17,527 INFO  [JBossASKernel]     jboss.ejb:service=EJBTimerService
            21:13:17,527 INFO  [JBossASKernel]     persistence.unit:unitName=JbossEJB3.ear/JbossEJB3-ejb.jar#JbossEJB3-ejbPU
            21:13:17,540 INFO  [JBossASKernel]   and supplies:
            21:13:17,540 INFO  [JBossASKernel]     jndi:JbossEJB3/StudentFacade/remote
            21:13:17,541 INFO  [JBossASKernel]     Class:Session.StudentFacadeRemote
            21:13:17,541 INFO  [JBossASKernel]     jndi:JbossEJB3/StudentFacade/remote-Session.StudentFacadeRemote
            21:13:17,541 INFO  [JBossASKernel] Added bean(jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3) to KernelDeployment of: JbossEJB3-ejb.jar
            21:13:17,911 INFO  [EJB3EndpointDeployer] Deploy AbstractBeanMetaData@52dd05{name=jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
            21:13:18,149 INFO  [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=JbossEJB3.ear/JbossEJB3-ejb.jar#JbossEJB3-ejbPU
            21:13:18,177 INFO  [Ejb3Configuration] Processing PersistenceUnitInfo [
                name: JbossEJB3-ejbPU
                ...]
            21:13:19,219 WARN  [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
            21:13:19,300 INFO  [AnnotationBinder] Binding entity from annotated class: Entity.Student
            21:13:19,301 INFO  [QueryBinder] Binding Named query: Student.findAll => SELECT s FROM Student s
            21:13:19,301 INFO  [QueryBinder] Binding Named query: Student.findById => SELECT s FROM Student s WHERE s.id = :id
            21:13:19,301 INFO  [QueryBinder] Binding Named query: Student.findByName => SELECT s FROM Student s WHERE s.name = :name
            21:13:19,306 INFO  [EntityBinder] Bind entity Entity.Student on table student
            21:13:19,408 INFO  [HibernateSearchEventListenerRegister] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
            21:13:19,437 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
            21:13:19,449 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource
            21:13:20,031 INFO  [SettingsFactory] RDBMS: MySQL, version: 5.1.41-3ubuntu12.3
            21:13:20,032 INFO  [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} )
            21:13:20,054 INFO  [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
            21:13:20,070 INFO  [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
            21:13:20,071 INFO  [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
            21:13:20,072 INFO  [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
            21:13:20,072 INFO  [SettingsFactory] Automatic flush during beforeCompletion(): disabled
            21:13:20,072 INFO  [SettingsFactory] Automatic session close at end of transaction: disabled
            21:13:20,072 INFO  [SettingsFactory] JDBC batch size: 15
            21:13:20,072 INFO  [SettingsFactory] JDBC batch updates for versioned data: disabled
            21:13:20,072 INFO  [SettingsFactory] Scrollable result sets: enabled
            21:13:20,072 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
            21:13:20,072 INFO  [SettingsFactory] Connection release mode: auto
            21:13:20,072 INFO  [SettingsFactory] Maximum outer join fetch depth: 2
            21:13:20,073 INFO  [SettingsFactory] Default batch fetch size: 1
            21:13:20,073 INFO  [SettingsFactory] Generate SQL with comments: disabled
            21:13:20,073 INFO  [SettingsFactory] Order SQL updates by primary key: disabled
            21:13:20,073 INFO  [SettingsFactory] Order SQL inserts for batching: disabled
            21:13:20,073 INFO  [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
            21:13:20,074 INFO  [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
            21:13:20,075 INFO  [SettingsFactory] Query language substitutions: {}
            21:13:20,075 INFO  [SettingsFactory] JPA-QL strict compliance: enabled
            21:13:20,075 INFO  [SettingsFactory] Second-level cache: enabled
            21:13:20,075 INFO  [SettingsFactory] Query cache: disabled
            21:13:20,075 INFO  [SettingsFactory] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
            21:13:20,076 INFO  [RegionFactoryCacheProviderBridge] Cache provider: org.hibernate.cache.HashtableCacheProvider
            21:13:20,078 INFO  [SettingsFactory] Optimize cache for minimal puts: disabled
            21:13:20,078 INFO  [SettingsFactory] Cache region prefix: persistence.unit:unitName=JbossEJB3.ear/JbossEJB3-ejb.jar#JbossEJB3-ejbPU
            21:13:20,078 INFO  [SettingsFactory] Structured second-level cache entries: disabled
            21:13:20,078 INFO  [SettingsFactory] Statistics: disabled
            21:13:20,078 INFO  [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
            21:13:20,078 INFO  [SettingsFactory] Default entity-mode: pojo
            21:13:20,079 INFO  [SettingsFactory] Named query checking : enabled
            21:13:20,091 INFO  [SessionFactoryImpl] building session factory
            21:13:20,152 INFO  [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=JbossEJB3.ear/JbossEJB3-ejb.jar#JbossEJB3-ejbPU
            21:13:20,152 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            21:13:20,205 INFO  [NamingHelper] Creating subcontext: persistence.unit:unitName=JbossEJB3.ear
            21:13:20,206 INFO  [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=JbossEJB3.ear/JbossEJB3-ejb.jar#JbossEJB3-ejbPU
            21:13:20,215 WARN  [SessionFactoryObjectFactory] InitialContext did not implement EventContext
            21:13:20,215 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
            21:13:20,307 INFO  [ClientENCInjectionContainer] STARTED CLIENT ENC CONTAINER: javassist
            21:13:20,568 INFO  [TomcatDeployment] deploy, ctxPath=/JbossEJB3-war
            21:13:21,094 WARN  [HDScanner] Failed to process changes
            org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
            
            DEPLOYMENTS MISSING DEPENDENCIES:
              Deployment "jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3" is missing the following dependencies:
                Dependency "<UNKNOWN jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **")
              Deployment "jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3_endpoint" is missing the following dependencies:
                Dependency "jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
            
            DEPLOYMENTS IN ERROR:
              Deployment "<UNKNOWN jboss.j2ee:ear=JbossEJB3.ear,jar=JbossEJB3-ejb.jar,name=StudentFacade,service=EJB3>" is in error due to the following reason(s): ** UNRESOLVED Demands 'jboss.ejb:service=EJBTimerService' **
            
                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
                at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
                at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
                at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
                at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
                at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
                at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
                at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
                at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(Thread.java:636)
            
            21:14:36,946 INFO  [[/JbossEJB3-war]] Marking servlet addRecord as unavailable
            21:14:36,947 ERROR [[addRecord]] Allocate exception for servlet addRecord
            javax.naming.NameNotFoundException: JbossEJB3 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(InitialContext.java:409)
                at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1346)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:817)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
                at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
                at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:75)
                at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:99)
                at org.jboss.web.tomcat.service.TomcatInjectionContainer.processInjectors(TomcatInjectionContainer.java:366)
                at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:271)
                at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:265)
                at org.jboss.web.tomcat.service.TomcatInjectionContainer.newInstance(TomcatInjectionContainer.java:256)
                at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1006)
                at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                at java.lang.Thread.run(Thread.java:636)
            
            
            
            

             

            Please help me to run my application. Other than mysql-ds.xml, Is their any xml files should I configure in Jboss 5.1 server to run my application(I only edit mysql-ds.xml).

             

            Thank You.

            • 3. Re: How to Change DefaultDS in jndi-name
              rukia

              I have exactly the same errors logs, can anyone help please?

              • 4. Re: How to Change DefaultDS in jndi-name
                wdfink

                See this thread.