0 Replies Latest reply on Mar 2, 2006 7:03 AM by mitesh Oza

    jmx/invoker/RMIAdaptor - This is working with JBoss 4.x but

    mitesh Oza Newbie

      Hi,

      before i dive into problem rather i would like to give u small idea of the problem.

      i can get the Instance of MBeanServer from Outside the JBoss in JBoss 4.x but i am not able to get Instance of MBeanServer in case of JBoss 3.x.

      i found there are some differences for RMIAdaptor Implementation but i am not able get actual idea that how i can do this.

      CAN ANYBODY HELP ME FOR RESOLVING THIS PROBLEM.!!!!!!

      see the below code.

      MBeanServerConnection server=null;

      Properties.put("java.naming.factory.initial", "org.jboss.naming.HttpNamingContextFactory");
      Properties.put("java.naming.provider.url", "http://localhost:8080/invoker/JNDIFactory");
      Properties.put("java.naming.factory.url.pkgs", "org.jboss.naming.client");

      InitialContext ctx = new InitialContext(Properties); // From jndi.properties

      server = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");

      it gives me the following error.

      javax.naming.ServiceUnavailableException: Unexpected failure [Root exception is java.lang.IllegalStateException: Failed to find method for hash:-884175917852741154]
      at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:56)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy0.lookup(Unknown Source)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at JbossMonitor.JbossMonitorTest.(JbossMonitorTest.java:176)
      at JbossMonitor.JbossMonitorTest.main(JbossMonitorTest.java:507)
      Caused by: java.lang.IllegalStateException: Failed to find method for hash:-884175917852741154
      at org.jboss.invocation.MarshalledInvocation.getMethod(MarshalledInvocation.java:367)
      at org.jboss.naming.NamingService.invoke(NamingService.java:266)
      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.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.http.servlet.InvokerServlet.processRequest(InvokerServlet.java:147)
      at org.jboss.invocation.http.servlet.InvokerServlet.doPost(InvokerServlet.java:209)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
      at java.lang.Thread.run(Thread.java:534)

      i am not able to understand why this is not working.

      this code is already working for JBOSS 4.X BUT IT IS NOT WORKING FOR JBOSS 3.X

      i need urgent reply.

      thanks in advance

      lbrd.