0 Replies Latest reply on Aug 19, 2010 4:36 AM by Daphna Deutsch

    Failed to create EJB home interface when accessing from JMX

    Daphna Deutsch Newbie

      After migrating from Jboss 4.0 to JBoss 5.1.GA, accessing EJBs from the JMX console is no longer working.

      I have a method which accessing EJB. When running it in the application it works fine, and manage to create the home interface.
      But when try to run it from the JMX, it fails to find the home interface, and I’m getting the following error:

      • javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException:
      • com.opengaming.UltimateOne.ejb.ParticipantHomeRemote (no security manager: RMI class loader disabled)]
      • at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:845)  
      • at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)  
      • at javax.naming.InitialContext.lookup(InitialContext.java:392)

      • the exception occurs when trying to lookup the home interface:

      final Context ctx = createContext(ip);  

      • try 
      • {  
      •     home = ctx.lookup(jndiName);  
      • }



      The createContext method



      • final Hashtable<String,String> env = new Hashtable<String, String>();  
      • env.put (Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");  
      • final int rmiPort = Integer.parseInt(CachingManager.getGeneralPropertyValueByName(  
      •         PropertyConstants.RMI_PORT));  
      • env.put (Context.PROVIDER_URL, "jnp://" + ip + ":" + rmiPort);  
      • env.put (Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");  
      • final InitialContext ic = new InitialContext(env);  
      • return ic; 

      notice that this code used to work on Jboss 4.0 with no changes.


      thanks in advanced