7 Replies Latest reply on Feb 16, 2009 5:38 PM by Raghuveer Lanka

    EJB ghost reference in JBoss JNDI

    Gregory Chazalon Newbie

      Hi,

      I've been struggling this morning with a redeployment issue.
      When I first deploy an EJB module on my JBoss 3.2.3 server, it just works fine. After a new build, when I try to redeploy it (via JBoss IDE), the container cannot deploy it correctly, because of somekind of ghost reference to the old EJB module.
      And this happens, no matter what I clean (including the tmp*.jar in the tmp/deploy directory) or which deploying way I use (JBoss IDE or regular way).

      For the record, here is a sample of the log I get :

      -------------------------------------------------------
      14:08:51,529 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
      14:08:52,030 INFO [EjbModule] Deploying Archive
      14:08:52,130 INFO [EjbModule] Deploying Parrot
      14:08:52,140 INFO [EjbModule] Deploying QueueSIPReceiver
      14:08:52,200 INFO [StatelessSessionContainer] Registration is not done -> stop
      14:08:52,210 ERROR [EjbModule] Initialization failed
      javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:617)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:198)
       at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
       at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
       at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
       at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
       at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
       at org.jboss.ejb.EjbModule.createService(EjbModule.java:297)
       at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
       at $Proxy14.create(Unknown Source)
       at org.jboss.system.ServiceController.create(ServiceController.java:310)
       at org.jboss.system.ServiceController.create(ServiceController.java:243)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy12.create(Unknown Source)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:523)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      14:08:52,220 WARN [ServiceController] Problem creating service jboss.j2ee:module=adp-examples.jar,service=EjbModule
      javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:617)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:198)
       at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
       at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
       at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
       at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
       at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
       at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
       at org.jboss.ejb.EjbModule.createService(EjbModule.java:297)
       at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
       at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
       at $Proxy14.create(Unknown Source)
       at org.jboss.system.ServiceController.create(ServiceController.java:310)
       at org.jboss.system.ServiceController.create(ServiceController.java:243)
       at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy12.create(Unknown Source)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:523)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
       at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      14:08:52,220 INFO [EJBDeployer] Deployed: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
      14:08:52,230 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
      14:08:52,230 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:
       <none>
      Incompletely deployed packages:
       <none>
      MBeans waiting for classes:
       <none>
      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:module=adp-examples.jar,service=EjbModule
       state: FAILED
       I Depend On:
       Depends On Me: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.]
      
      --------------------------------------------------------------
      


      And needless to say, that a start/undeploy/shutdown/restart/redeploy sequence does not change anything to this...

      Does anyone have encountered this kind of mindbreaking situation ?
      Please share your trick !

      Thanks,

      Gregory




        • 1. Re: EJB ghost reference in JBoss JNDI
          Darran Lofthouse Master

          Are you sure that there are no other jars in the deploy folder that contain the EJB that the error is complaining about?

          After the start have you checked JNDI to see if the component is already bound there?

          • 2. Re: EJB ghost reference in JBoss JNDI
            Gregory Chazalon Newbie

            Thanks Darran,

            but I'm afraid that there is no conflict with any other Jars, because there is only one on my server.
            And the JNDI tree seems clean to me. None of my EJB mentioned.

            The most annoying is that a shutdown/restart doesn't change anything. JBoss must be store its JNDI entries, but where ?

            • 3. Re: EJB ghost reference in JBoss JNDI
              Gregory Chazalon Newbie

              Okay, I'm still stuck on this thing.
              Here is a sample of the debug log I can get in DEBUG treshold from JBoss :

              ------------------------------
              16:28:08,916 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 31s:465ms
              16:32:34,749 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:34,749 DEBUG [MainDeployer] Starting deployment (init step) of package at: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:34,759 DEBUG [MainDeployer] using deployer org.jboss.ejb.EJBDeployer@1716fa0
              16:32:34,819 DEBUG [EJBDeployer] looking for nested deployments in : file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:34,819 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.ejb:service=EJBDeployer,type=org.jboss.deployment.SubDeployer.init,sequenceNumber=3,timeStamp=1084804354819,message=null,userData=org.jboss.deployment.DeploymentInfo@de7e6df2 { url=file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar }
               deployer: org.jboss.ejb.EJBDeployer@1716fa0
               status: null
               state: INIT_DEPLOYER
               watch: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
               lastDeployed: 0
               lastModified: 0
               mbeans:
              ]
              16:32:34,819 DEBUG [DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:service=LoaderRepository,name=Default, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
              16:32:34,819 DEBUG [UnifiedClassLoader] New jmx UCL with url file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar
              16:32:34,819 DEBUG [UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@142aa03{ url=file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar ,addedOrder=0}
              16:32:34,819 DEBUG [MainDeployer] found 0 subpackages of file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:34,819 DEBUG [MainDeployer] Watching new file: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:34,819 DEBUG [MainDeployer] create step for deployment file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,109 DEBUG [EJBDeployer] Verifying file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,179 DEBUG [verifier] Bean checked: Archive: Verified.
              16:32:35,189 DEBUG [verifier] Bean checked: Parrot: Verified.
              16:32:35,199 DEBUG [verifier] Bean checked: QueueSIPReceiver: Verified.
              16:32:35,239 DEBUG [EJBDeployer] Deploying: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,239 DEBUG [ServiceController] Creating service jboss.j2ee:module=adp-examples.jar,service=EjbModule
              16:32:35,239 DEBUG [EjbModule] Creating
              16:32:35,249 DEBUG [EjbModule] createService, begin
              16:32:35,249 INFO [EjbModule] Deploying Archive
              16:32:35,280 DEBUG [EjbModule] Creating WebClassLoader of class org.jboss.web.WebClassLoader
              16:32:35,340 INFO [EjbModule] Deploying Parrot
              16:32:35,350 DEBUG [EjbModule] Creating WebClassLoader of class org.jboss.web.WebClassLoader
              16:32:35,350 INFO [EjbModule] Deploying QueueSIPReceiver
              16:32:35,360 DEBUG [EjbModule] Creating WebClassLoader of class org.jboss.web.WebClassLoader
              16:32:35,380 DEBUG [EjbModule] creating binding for QueueSIPReceiver:message-driven-bean
              16:32:35,410 DEBUG [ServiceController] Creating service jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB
              16:32:35,420 DEBUG [ServiceController] adding depends in ServiceController.create: []
              16:32:35,420 DEBUG [StatelessSessionContainer] Creating
              16:32:35,420 DEBUG [StatelessSessionContainer] Mapped archive -1614125401to public void adonis2.adp.examples.webservices.ejb.ArchiveBean.archive(javax.activation.DataHandler) throws javax.ejb.EJBException
              16:32:35,420 DEBUG [StatelessSessionContainer] Mapped Container method remove HASH 2137066130
              16:32:35,430 DEBUG [StatelessSessionContainer] Mapped Container method getEJBLocalHome HASH 696357781
              16:32:35,430 DEBUG [StatelessSessionContainer] Mapped Container method getPrimaryKey HASH 359205605
              16:32:35,430 DEBUG [StatelessSessionContainer] Mapped Container method isIdentical HASH -62303043
              16:32:35,430 DEBUG [StatelessSessionContainer] Mapping create
              16:32:35,430 DEBUG [StatelessSessionContainer] Mapping remove
              16:32:35,430 DEBUG [StatelessSessionInstancePool] Creating
              16:32:35,430 DEBUG [StatelessSessionInstancePool] Created
              16:32:35,430 DEBUG [StatelessSessionContainer] Created
              16:32:35,430 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=84,timeStamp=1084804355430,message=null,userData=jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB]
              16:32:35,430 DEBUG [DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.create,sequenceNumber=84,timeStamp=1084804355430,message=null,userData=jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB]
              16:32:35,430 DEBUG [ServiceController] Creating dependent components for: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB dependents are: []
              16:32:35,430 DEBUG [EjbModule] Bound jmxName=jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB, hash=1555708967into Registry
              16:32:35,430 INFO [StatelessSessionContainer] Registration is not done -> stop
              16:32:35,440 DEBUG [EjbModule] Looking to destroy container: jboss.j2ee:jndiName=local/QueueSIPReceiver,service=EJB, state: Unregistered, destroy: false
              16:32:35,440 DEBUG [EjbModule] Looking to destroy container: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB, state: Unregistered, destroy: false
              16:32:35,440 DEBUG [EjbModule] Looking to destroy container: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB, state: Created, destroy: true
              16:32:35,440 DEBUG [ServiceController] destroying service: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB
              16:32:35,440 DEBUG [ServiceController] destroying dependent services for: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB dependent services are: []
              16:32:35,440 DEBUG [StatelessSessionContainer] Destroying
              16:32:35,440 DEBUG [StatelessSessionInstancePool] Destroying
              16:32:35,440 DEBUG [StatelessSessionInstancePool] Destroyed
              16:32:35,440 DEBUG [StatelessSessionContainer] Destroyed
              16:32:35,440 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.destroy,sequenceNumber=85,timeStamp=1084804355440,message=null,userData=jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB]
              16:32:35,440 DEBUG [DefaultManagedObjectFactoryMap] Failed to find factory for event: javax.management.Notification[source=jboss.system:service=ServiceController,type= org.jboss.system.ServiceMBean.destroy,sequenceNumber=85,timeStamp=1084804355440,message=null,userData=jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB]
              16:32:35,440 DEBUG [ServiceController] removing service: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB
              16:32:35,440 DEBUG [ServiceController] removing jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB from server
              16:32:35,440 ERROR [EjbModule] Initialization failed
              javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.
               at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:617)
               at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:198)
               at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
               at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
               at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
               at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
               at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
               at org.jboss.ejb.EjbModule.createService(EjbModule.java:297)
               at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
               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:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
               at $Proxy14.create(Unknown Source)
               at org.jboss.system.ServiceController.create(ServiceController.java:310)
               at org.jboss.system.ServiceController.create(ServiceController.java:243)
               at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy12.create(Unknown Source)
               at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:523)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
               at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy6.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
              16:32:35,450 WARN [ServiceController] Problem creating service jboss.j2ee:module=adp-examples.jar,service=EjbModule
              javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.
               at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:617)
               at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:198)
               at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
               at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
               at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
               at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
               at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
               at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:327)
               at org.jboss.ejb.EjbModule.createService(EjbModule.java:297)
               at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
               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:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
               at $Proxy14.create(Unknown Source)
               at org.jboss.system.ServiceController.create(ServiceController.java:310)
               at org.jboss.system.ServiceController.create(ServiceController.java:243)
               at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy12.create(Unknown Source)
               at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:523)
               at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
               at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy6.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
              16:32:35,460 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.ejb:service=EJBDeployer,type=org.jboss.deployment.SubDeployer.create,sequenceNumber=4,timeStamp=1084804355460,message=null,userData=org.jboss.deployment.DeploymentInfo@de7e6df2 { url=file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar }
               deployer: org.jboss.ejb.EJBDeployer@1716fa0
               status: null
               state: CREATE_DEPLOYER
               watch: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
               lastDeployed: 1084804354819
               lastModified: 1084804354749
               mbeans:
               jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB (state not available)
              ]
              16:32:35,460 DEBUG [MainDeployer] Done with create step of deploying adp-examples.jar
              16:32:35,460 DEBUG [MainDeployer] Begin deployment start file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,460 DEBUG [EJBDeployer] start application, deploymentInfo: org.jboss.deployment.DeploymentInfo@de7e6df2 { url=file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar }
               deployer: org.jboss.ejb.EJBDeployer@1716fa0
               status: Starting
               state: START_DEPLOYER
               watch: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
               lastDeployed: 1084804354819
               lastModified: 1084804354749
               mbeans:
               jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB (state not available)
              , short name: adp-examples.jar, parent short name: null
              16:32:35,460 DEBUG [ServiceController] starting service jboss.j2ee:module=adp-examples.jar,service=EjbModule
              16:32:35,460 DEBUG [ServiceController] Ignoring start request for service: jboss.j2ee:module=adp-examples.jar,service=EjbModule
              16:32:35,460 INFO [EJBDeployer] Deployed: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,460 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.ejb:service=EJBDeployer,type=org.jboss.deployment.SubDeployer.start,sequenceNumber=5,timeStamp=1084804355460,message=null,userData=org.jboss.deployment.DeploymentInfo@de7e6df2 { url=file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar }
               deployer: org.jboss.ejb.EJBDeployer@1716fa0
               status: Starting
               state: START_DEPLOYER
               watch: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
               lastDeployed: 1084804354819
               lastModified: 1084804354749
               mbeans:
               jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB (state not available)
              ]
              16:32:35,460 DEBUG [J2EEDeployedObject] File: file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar, descriptor: META-INF/ejb-jar.xml
              16:32:35,470 DEBUG [J2EEDeployedObject] File: file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar, descriptor: META-INF/jboss.xml
              16:32:35,470 DEBUG [J2EEDeployedObject] File: file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar, descriptor: META-INF/jaws.xml
              16:32:35,470 DEBUG [J2EEDeployedObject] File: file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp45284adp-examples.jar, descriptor: META-INF/jbosscmp-jdbc.xml
              16:32:35,470 DEBUG [EJBModule] postRegister(), parent: jboss.management.local:j2eeType=J2EEServer,name=Local
              16:32:35,470 DEBUG [EJBModule] Created JSR-77 EJBModule: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=EJBModule,name=adp-examples.jar
              16:32:35,470 DEBUG [EJBModuleFactory] Created module: jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=EJBModule,name=adp-examples.jar
              16:32:35,470 DEBUG [EJBModuleFactory]
              javax.management.InstanceNotFoundException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB is not registered.
               at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:354)
               at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:442)
               at org.jboss.management.j2ee.factory.EJBModuleFactory.createEJB(EJBModuleFactory.java:102)
               at org.jboss.management.j2ee.factory.EJBModuleFactory.create(EJBModuleFactory.java:65)
               at org.jboss.management.j2ee.LocalJBossServerDomain.handleNotification(LocalJBossServerDomain.java:383)
               at org.jboss.mx.server.NotificationListenerProxy.handleNotification(NotificationListenerProxy.java:69)
               at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:93)
               at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:178)
               at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:559)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
               at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
               at java.lang.reflect.Method.invoke(Method.java:324)
               at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
               at $Proxy6.deploy(Unknown Source)
               at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
               at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
               at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
              16:32:35,470 DEBUG [MainDeployer] End deployment start on package: adp-examples.jar
              16:32:35,470 INFO [MainDeployer] Deployed package: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,480 DEBUG [URLDeploymentScanner] Watch URL for: file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar -> file:/D:/jboss-3.2.3/server/default/deploy/adp-examples.jar
              16:32:35,480 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
              Cause: Incomplete Deployment listing:
              Packages waiting for a deployer:
               <none>
              Incompletely deployed packages:
               <none>
              MBeans waiting for classes:
               <none>
              MBeans waiting for other MBeans:
              [ObjectName: jboss.j2ee:module=adp-examples.jar,service=EjbModule
               state: FAILED
               I Depend On:
               Depends On Me: javax.management.InstanceAlreadyExistsException: jboss.j2ee:jndiName=adp.examples.ArchiveLocalHome,service=EJB already registered.]
              
              ------------------------------
              


              I wonder if the log in bold is the root of my problem.
              Is this something normal ?

              Any help appreciated.




              • 4. Re: EJB ghost reference in JBoss JNDI
                saroj Newbie

                I'm also facing the same problem...Can u please help me...

                • 5. Re: EJB ghost reference in JBoss JNDI
                  Abhishek Khandelwal Newbie

                  I am getting similar problem. But I am not able to get past the loading the class file.

                  Here is what I did:
                  I started jboss, and it started without any problem, I try to deploy jrmp-comp.sar and jrmp-dl.jar(which comes with jboss/testsuites) in jboss_home/server/all/deploy directory.

                  And jboss is not able to deploy the ejb and this the error thrown on console:

                  ==========================================================
                  00:22:49,989 INFO [Server] JBoss (MX MicroKernel) [4.0.0 (build: CVSTag=JBoss_4_0_0 date=20050308-2334_4.0.0-0.spike.1089)] Started in 56s:149ms
                  00:24:22,954 INFO [EjbModule] Deploying StatelessSession
                  00:24:22,979 ERROR [EjbModule] Initialization failed jboss.j2ee:module=jrmp-dl.jar,service=EjbModule
                  org.jboss.util.NestedRuntimeException: Error creating MBeanProxy: jboss:service=WebService; - nested throwable: (javax.management.InstanceNotFoundException: jboss:service=WebService is not registered.)
                  at org.jboss.mx.util.MBeanProxyExt.(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.create(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.create(Unknown Source)
                  at org.jboss.ejb.EjbModule.destroyService(Unknown Source)
                  at org.jboss.ejb.EjbModule.createService(Unknown Source)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(Unknown Source)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
                  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Unknown Source)
                  at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
                  at org.jboss.mx.server.Invocation.invoke(Unknown Source)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(Unknown Source)
                  at $Proxy0.create(Unknown Source)
                  at org.jboss.system.ServiceController.create(Unknown Source)
                  at org.jboss.system.ServiceController.create(Unknown Source)
                  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Unknown Source)
                  at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
                  at org.jboss.mx.server.Invocation.invoke(Unknown Source)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
                  at $Proxy16.create(Unknown Source)
                  at org.jboss.ejb.EJBDeployer.create(Unknown Source)
                  at org.jboss.deployment.MainDeployer.create(Unknown Source)
                  at org.jboss.deployment.MainDeployer.deploy(Unknown Source)

                  and then
                  00:24:23,002 WARN [ServiceController] Problem creating service jboss.j2ee:module=jrmp-dl.jar,service=EjbModule
                  org.jboss.util.NestedRuntimeException: Error creating MBeanProxy: jboss:service=WebService; - nested throwable: (javax.management.InstanceNotFoundException: jboss:service=WebService is not registered.)
                  at org.jboss.mx.util.MBeanProxyExt.(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.create(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.create(Unknown Source)
                  at org.jboss.ejb.EjbModule.destroyService(Unknown Source)
                  at org.jboss.ejb.EjbModule.createService(Unknown Source)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(Unknown Source)
                  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(Unknown Source)
                  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Unknown Source)
                  at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
                  at org.jboss.mx.server.Invocation.invoke(Unknown Source)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(Unknown Source)
                  at $Proxy0.create(Unknown Source)
                  at org.jboss.system.ServiceController.create(Unknown Source)
                  at org.jboss.system.ServiceController.create(Unknown Source)
                  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Unknown Source)
                  at org.jboss.mx.server.Invocation.dispatch(Unknown Source)
                  at org.jboss.mx.server.Invocation.invoke(Unknown Source)
                  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(Unknown Source)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(Unknown Source)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(Unknown Source)
                  at $Proxy16.create(Unknown Source)
                  at org.jboss.ejb.EJBDeployer.create(Unknown Source)
                  at org.jboss.deployment.MainDeployer.create(Unknown Source)
                  at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
                  at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
                  at org.jboss.deployment.MainDeployer.deploy(Unknown Source)
                  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:324)
                  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(Unknown Source)
                  ========================================================

                  Any help????

                  • 6. Re: EJB ghost reference in JBoss JNDI
                    Michael Pelz Sherman Newbie

                    I'm having exactly the same problem using JBoss 4.0.0 on Windows 2003.

                    Very interested in any suggestions anyone might have on this!

                    - Michael

                    • 7. Re: EJB ghost reference in JBoss JNDI
                      Raghuveer Lanka Newbie

                      I am also having the same problem. i am using Jboss 4.x. Anyone has any suggestions on how to go about this error.