Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing ejb deployed in JBoss 7.0.1 from another client

Tags:

jboss

ejb

Having deployed an EJB module in JBoss 7.0.1, I am trying to access it from a client executing on another JVM. However, I am unable to figure out the client side jars needed to add to my client's classpath.

I tried out with the following:-

  1. jboss-ejb-api_3.1_spec-1.0.1.Final.jar
  2. jboss-ejb-client-1.0.0.Beta11.jar 3.jboss-logging-3.1.0.CR2.jar
  3. jboss-marshalling-1.3.4.GA.jar 5.jboss-marshalling-river-1.3.4.GA.jar
  4. jboss-remoting-3.2.0.CR8.jar 7.jboss-sasl-1.0.0.Beta9.jar
  5. jboss-transaction-api_1.1_spec-1.0.0.Final.jar
  6. xnio-api-3.0.0.CR7.jar

There seems to be some inconsistency in this setup and I get this exception:-

INFO: JBoss EJB Client version 1.0.0.Beta11 Nov 9, 2012 12:01:04 AM org.xnio.Xnio INFO: XNIO Version 3.0.0.CR7 Nov 9, 2012 12:01:04 AM org.jboss.ejb.client.ConfigBasedEJBClientContextSelector createConnections ERROR: Could not create connection for connection named default java.lang.IllegalArgumentException: No matching XNIO provider found at org.xnio.Xnio.doGetInstance(Xnio.java:192) at org.xnio.Xnio.getInstance(Xnio.java:146) at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73)

...

I didn't have any issues while having a client access an ejb deployed in JBoss 7.1.0 Final, JBoss 6.1.0 Final or Glassfish servers. The jars required at the client side war available.

I am a newbie in Java EE and Application Servers by the way and I am trying to learn in the process.

Thanks.

like image 279
TonmoyC Avatar asked Nov 08 '12 18:11

TonmoyC


2 Answers

please add xnio-nio-3.0.3.GA.jar in your classpath

like image 105
Ramkumar Kalirajan Avatar answered Sep 27 '22 21:09

Ramkumar Kalirajan


In addition to Ramkumar's answer, I am adding the maven dependency for this jar. Following the maven dependency for the jar:

<dependency>
    <groupId>org.jboss.xnio</groupId>
    <artifactId>xnio-nio</artifactId>
    <version>3.0.3.GA</version>
</dependency>
like image 23
Halil Avatar answered Sep 27 '22 23:09

Halil