JBoss Community

Invoke ejb remote, Classloader problem InitialContextFactory

created by Fausto De La Torre in JBoss Remoting - View the full discussion

Hi,

 

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.

 

Question:

 

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

 

Att.

Fausto


Reply to this message by going to Community

Start a new discussion in JBoss Remoting at Community