3

Im trying to invoke an EJB from a remote server using JNDI lookup, Im using EJB3 with Spring-MVC in WildFly 10 and the configuration guided in this documentation has been done in my client and remote server https://docs.jboss.org/author/display/WFLY10/EJB+invocations+from+a+remote+client+using+JNDI

But still I'm not able to get the connection of remote server.

1) Created a user under ApplicationRealm and gave the permissions for master slave setup for remote EJB Invocation.

2) This is my jboss-ejb-client.properties file, Here I have given the wildfly User_Name and Password of Host server.

endpoint.name=client-endpoint
remote.connections=one, two
remote.connection.one.host=172.16.25.26
remote.connection.one.port=8080
remote.connection.one.username=ABCD
remote.connection.one.password=ABCD@123
remote.connection.two.host=localhost
remote.connection.two.port=8080
remote.connection.two.username=guest
remote.connection.two.username=guest
# org.jboss.as.logging.per-deployment=true

My exception is

javax.naming.AuthenticationException: Failed to connect to any server. Servers tried: 
[http-remoting://172.16.25.26:8080 (Authentication failed: all available authentication mechanisms failed:
   JBOSS-LOCAL-USER: javax.security.sasl.SaslException: Failed to read server challenge [Caused by 
java.io.FileNotFoundException: D:\wildfly-10.0.0.Final\standalone\tmp\auth\local3540175271681581878.challenge 
(The system cannot find the file specified)]
   DIGEST-MD5: javax.security.sasl.SaslException: DIGEST-MD5: Cannot perform callback to acquire realm, 
authentication ID or password [Caused by javax.security.auth.callback.UnsupportedCallbackException])] 
[Root exception is javax.security.sasl.SaslException: Authentication failed: all available authentication 
mechanisms failed:

Please tell me what am I missing here thats causing this exception and what is the significance of secret-key generated while creating the user in wildfly and where to configure that key

TT.
  • 15,774
  • 6
  • 47
  • 88
Madan Thunderfist
  • 193
  • 1
  • 2
  • 14
  • Where did you get your `jboss-client.jar`? – Steve C Sep 12 '17 at 14:37
  • sorry there is no such jar specified in the documentation, so i have not taken it..Please tell me what is the significance of the jar and where can i download and place it in my server – Madan Thunderfist Sep 13 '17 at 05:16
  • Are you using maven with the `wildfly-ejb-client-bom` dependency? – Steve C Sep 13 '17 at 05:23
  • No sir..I just followed the documentation as I'm a beginner in this – Madan Thunderfist Sep 13 '17 at 05:29
  • 1
    Did you read the section under "Setting up the client classpath with the jars that are required to run the client application" in the documentation page that you linked? – Steve C Sep 13 '17 at 05:50
  • oh ya..I missed it..I use gradle , so do i have to give the jboss-client.jar dependency in the ejb jar which im trying to invoke remotely? – Madan Thunderfist Sep 13 '17 at 05:57
  • Yes except that you would use the `wildfly-ejb-client-bom` dependency as shown in [quickstart/ejb-remote/client/pom.xml](https://github.com/wildfly/quickstart/blob/11.x/ejb-remote/client/pom.xml) – Steve C Sep 13 '17 at 06:05
  • What is the significance of secret key generated while creating the User in Host server? – Madan Thunderfist Sep 13 '17 at 06:09
  • Is this issue resolved? I am getting similar one: https://stackoverflow.com/questions/49070046/saslexception-in-wildfly-remote-ejb-client even though I added jar. – Valsaraj Viswanathan Mar 02 '18 at 13:30

0 Answers0