0 Replies Latest reply on Apr 6, 2004 9:48 AM by amresh

    MBeanException: Exception in MBean operation 'start()'

    amresh Newbie

      We use the jmx RMIAdaptor with in JBoss to stop and start a MDB once every day.

      The MBean has been working without any problem for 3-4 months except twice when we got the following exception.

      Caused by: MBeanException: Exception in MBean operation 'start()'
      Cause: javax.naming.NameAlreadyBoundException; remaining name 'env'
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:303)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
       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.jmx.connector.invoker.InvokerAdaptorService.invoke(InvokerAdaptorService.java:249)
       at sun.reflect.GeneratedMethodAccessor110.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.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
       at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
       at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:58)
       at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
       at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:55)
       at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
       at $Proxy20.invoke(Unknown Source)



      Has anyone come across similar problem? The relevant code is:

      String name = "jmx/rmi/RMIAdaptor";
       InitialContext ic = new InitialContext();
       RMIAdaptor rmiAdaptor = (RMIAdaptor) ic.lookup(name);
       rmiAdaptor.invoke("jboss.j2ee:jndiName=local/testmdb,service=EJB", "start", null, null);



      Amresh