0 Replies Latest reply on Jul 9, 2013 9:38 AM by Prashant Srivastava

    How to access mbean deployed in Jboss 4.0 from Jboss 7.1 server

    Prashant Srivastava Newbie

      The scenario is as follows:-

       

      One application is deployed in JBOSS 4.0.5. The monitoring application is deployed in jboss 7.1.0. Both are deployed in separate machines in the same network. We can not access the manged bean published by jboss 4.0.5 from jboss 7.1.0. Tried both the JNP and remoting. I think remoting is the suggested approach for jboss 7. On first access from the client the exception seen is IllegalAccessError.On subsequent accesses the error message in the log changes to NoClassDefFoundError.Please see attached error snapshots for more details.

       

      Following is the configuration in jboss 7.1.0 client:-

       

      Hashtable<String, String> envProps = new Hashtable<String, String>();
      envProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
      envProps.put(Context.SECURITY_CREDENTIALS, "<<password>>");
      envProps.put(Context.SECURITY_PRINCIPAL, "<<user>>");

      String url = "remote://" + <<ip of the jboss 4.0 server where the mbeans are deployed>> + ":4447";
      envProps.put(Context.PROVIDER_URL, url);

      envProps.put("org.jboss.remoting-jmx.timeout", "86400");
      InitialContext context = new InitialContext(envProps);
      return (MBeanServerConnection)context.lookup("jmx/rmi/RMIAdaptor");

       

      I am really struggling with this issue.Please help.