[jboss-user] [JBoss Seam] - @Service EJB Undeploy error

alpheratz-jb do-not-reply at jboss.com
Tue Nov 21 16:54:12 EST 2006


(I originally posted this at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94960 but got no response, so I'll see if anyone in this community can help...)

I have an @Service EJB (see code). 

It deploys OK. it works OK. I can see the bean being driven through its lifecycle OK. I can see setValue being called. I can see the value in the MBean Inspector page. 

However on undeploy/redeploy I get an exception (see traces): 


  | java.lang.RuntimeException: javax.management.InstanceNotFoundException: dnd:statistics=DisasterCount is not registered.
  | 

The exception occurs regardless of whether the value is inspected in the MBeans Inspector page or not. 

The app is based around SEAM. Happens in all versions, including CR1.
This is with the jems-installer-1.2.0.BETA3.jar. 

There is another post somewhere that indicates that this is a jboss4.0.5
issue, since the poster says that going back to 4.0.4 solved his problem
(can't find the other post now, though...)

This is not a show-stopper...I don't see any real affect on the running app...I'd just like to confirm that this is 'harmless' or be shown the error of my ways if need be.

Any suggestions/assistance would be gratefully accepted. 

Cheers, 

Alph. 

=========== 

Usage in a SEAM stateful session bean: 


  |   @EJB
  |   private DisasterCountLocal dc;
  |   
  |   @SuppressWarnings("unchecked")
  |   @Factory("disasterCollection")
  |   public void findAll()
  |     {
  |     disasterCollection = em.createNamedQuery("Disaster.findAll").setHint(
  |         "org.hibernate.cacheable", true).getResultList();
  |     dc.setValue(disasterCollection.size());
  |     }
  | 



  | package dnd.mbean;
  | 
  | import javax.ejb.Local;
  | 
  | import org.jboss.annotation.ejb.Service;
  | 
  | // http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html
  | // http://trailblazer.demo.jboss.com/EJB3Trail/serviceobjects/jmx/index.html
  | 
  | @Service (objectName = "dnd:statistics=DisasterCount")
  | @Local(DisasterCountLocal.class)
  | public class DisasterCount implements DisasterCountLocal, DisasterCountManagement
  | {
  | 	int v;
  | 	
  | 	public void setValue(int v)
  | 	{
  | 		System.out.println("setValue(" + v + ")");
  | 	this.v = v;	
  | 	}
  | 	
  | 	public int getValue() {
  | 		return v;
  | 	}
  | 	
  |    // Lifecycle methods
  |    public void create() throws Exception
  |    {
  | 	   System.out.println("DisasterCount - Creating");
  |    }
  | 
  |    public void start() throws Exception
  |    {
  | 	   System.out.println("DisasterCount - Starting");
  |    }
  | 
  |    public void stop()
  |    {
  | 	   System.out.println("DisasterCount - Stopping");
  |    }
  | 
  |    public void destroy()
  |    {
  | 	   System.out.println("DisasterCount - Destroying");
  |    }
  | }
  | 


  | package dnd.mbean;
  | 
  | import javax.ejb.Local;
  | 
  | @Local
  | public interface DisasterCountLocal {
  | int getValue();
  | void setValue(int v);
  | }
  | 


  | package dnd.mbean;
  | 
  | import org.jboss.annotation.ejb.Management;
  | 
  | @Management
  | public interface DisasterCountManagement {
  | int getValue();
  | 
  | void create() throws Exception;
  | void start() throws Exception;
  | void stop();
  | void destroy();
  | }
  | 



Deployment trace: 


  | 12:22:40,937 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=jboss-seam-dnd.ear,jar=jb
  | oss-seam-dnd.jar,name=DisasterCount,service=EJB3 with dependencies:
  | 12:22:40,953 INFO  [EJBContainer] STARTED EJB: dnd.mbean.DisasterCount ejbName: DisasterCount
  | 12:22:40,968 INFO  [STDOUT] DisasterCount - Creating
  | 12:22:40,968 INFO  [STDOUT] DisasterCount - Starting
  | 12:22:40,984 INFO  [EJBContainer] STARTED EJB: dnd.ejb3.session.DisasterManagerAction ejbName: DisasterManagerAction
  | 



Undeploy/redeploy trace: 


  | 13:19:35,125 INFO  [STDOUT] DisasterCount - Stopping
  | 13:19:35,125 INFO  [STDOUT] DisasterCount - Destroying
  | 13:19:35,125 WARN  [ServiceDelegateWrapper] Stopping failed jboss.j2ee:ear=jboss-seam-dnd.ear,jar=jb
  | oss-seam-dnd.jar,name=DisasterCount,service=EJB3
  | java.lang.RuntimeException: javax.management.InstanceNotFoundException: dnd:statistics=DisasterCount
  |  is not registered.
  | 	at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:159)
  | 	at org.jboss.ejb3.service.ServiceContainer.stop(ServiceContainer.java:166)
  | 	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:585)
  | 	at org.jboss.ejb3.ServiceDelegateWrapper.stopService(ServiceDelegateWrapper.java:118)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
  | 	at sun.reflect.GeneratedMethodAccessor406.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.stop(Unknown Source)
  | 	at org.jboss.system.ServiceController.stop(ServiceController.java:508)
  | 	at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy267.stop(Unknown Source)
  | 	at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:151)
  | 	at org.jboss.ejb3.JmxKernelAbstraction.uninstall(JmxKernelAbstraction.java:175)
  | 	at org.jboss.ejb3.Ejb3Deployment.stop(Ejb3Deployment.java:501)
  | 	at org.jboss.ejb3.Ejb3Module.stopService(Ejb3Module.java:107)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
  | 	at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
  | 	at sun.reflect.GeneratedMethodAccessor406.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  | 	at $Proxy0.stop(Unknown Source)
  | 	at org.jboss.system.ServiceController.stop(ServiceController.java:508)
  | 	at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy36.stop(Unknown Source)
  | 	at org.jboss.ejb3.EJB3Deployer.stop(EJB3Deployer.java:469)
  | 	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:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.ja
  | va:142)
  | 	at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  | 	at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:2
  | 38)
  | 	at org.jboss.ws.integration.jboss.DeployerInterceptor.stop(DeployerInterceptor.java:122)
  | 	at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.stop(SubDeployerInterceptor
  | Support.java:196)
  | 	at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:99)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy37.stop(Unknown Source)
  | 	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
  | 	at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:659)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:632)
  | 	at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:615)
  | 	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:585)
  | 	at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  | 	at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  | 	at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.ja
  | va:142)
  | 	at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  | 	at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  | 	at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  | 	at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  | 	at $Proxy6.undeploy(Unknown Source)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.undeploy(URLDeploymentScanner.java:450)
  | 	at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:604)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentSc
  | anner.java:263)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScan
  | ner.java:274)
  | 	at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScann
  | er.java:225)
  | Caused by: javax.management.InstanceNotFoundException: dnd:statistics=DisasterCount is not registere
  | d.
  | 	at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
  | 	at org.jboss.mx.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:383)
  | 	at org.jboss.ejb3.JmxKernelAbstraction.uninstallMBean(JmxKernelAbstraction.java:155)
  | 	... 100 more
  | 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987730#3987730

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987730



More information about the jboss-user mailing list