Problem in invoking a Remote EJB in JBoss.5.1.0 GA Server from my local desktop ejb in same jboss version
velraman Nov 12, 2013 11:19 AMHi JBoss experts,
We need a to do a POC on calling remote EJB from my local ejb, both jboss servers running on same version Jboss.5.1.0 GA.
We are getting so many problems in implementing this.
I have the following jars included in jboss5.1.0 GA of my client.
jboss-ejb-client-2.0.0.Beta3.jar
jboss-logging-3.1.0.CR2.jar
jboss-remote-naming-1.0.6.Final.jar
jboss-remoting-3.2.16.GA.jar
xnio-api-3.1.0.CR5
xnio-nio-3.0.0.GA
I have the code of getting the context as well.
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "jnp://10.86.24.7:1099");
InitialContext context = new InitialContext(env); System.out.println("context initialized successfully.");
But I'm getting below error in logs :
2013-11-12 20:57:22,430 INFO [org.xnio] (http-0.0.0.0-8089-2) XNIO Version 3.1.0.CR5
2013-11-12 20:57:22,450 INFO [org.xnio.nio] (http-0.0.0.0-8089-2) XNIO NIO Implementation Version 3.1.0.CR5
2013-11-12 20:57:22,490 INFO [STDOUT] (http-0.0.0.0-8089-2) The exception is Failed to create remoting connection
2013-11-12 20:57:22,490 ERROR [STDERR] (http-0.0.0.0-8089-2) javax.naming.NamingException: Failed to create remoting connection [Root exception is java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated: java.lang.NoSuchMethodError: org.jboss.logging.Logger.tracef(Ljava/lang/String;Ljava/lang/Object;)V]
2013-11-12 20:57:22,490 ERROR [STDERR] (http-0.0.0.0-8089-2) at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
2013-11-12 20:57:22,490 ERROR [STDERR] (http-0.0.0.0-8089-2) at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:152)
2013-11-12 20:57:22,490 ERROR [STDERR] (http-0.0.0.0-8089-2) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
2013-11-12 20:57:22,490 ERROR [STDERR] (http-0.0.0.0-8089-2) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
Do you have any documentation of how to connect and invoke remote EJB specifically for Jboss5.1.0. GA (NOT for JBoss AS7 or 6)??
Please advice me whether remote EJB call works in Jboss.5.1.0.GA because of the issue ??
Thanks
Velmurugan R