2 Replies Latest reply on Oct 29, 2012 1:26 PM by wdfink

    Invoke ejb remote, Classloader problem InitialContextFactory




      I am trying to invoke a remote service from a jboss server to another jboss server, however when I intent to instantiate InitialContext to do the lookup, with jndi properties I get the next error: javax.naming.NamingException: JBAS011843: No logró instanciar InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory del cargador de clase ModuleClassLoader for Module myApp.war, it is because org.jboss.naming.remote.client.InitialContextFactory is not in the classpath of "myApp.war", right?


      If JBOSS_HOMEbin/client/jboss-client.jar is packaged into myApp.war/WEB-INF/lib, InitialContextFactory is reconigzed in classpath and can instantiate InitialContext, however I do not want to do this, because
      jboss-client.jar is a common library (or module?, I do not know), I would like that all applications share this library or module.


      To to this I added a dependency into MANIFEST file to org.jboss.remote-naming module, this way InitialContextFactory is in classpath but other classes are not.




      How can I do, all my applications (in deployments directory) and classes of jboss-client.jar are in the same classpath?

      There is a module of jboss-client.jar?


      Thanks in advance