HI,
I am trying to invoke an Stateful EJB from a client application via JNDI lookup. both are deployed and running on same wildfly17server instance.
InitialContext context = null;
Backend remote = null;
try {
Map<String, String> environment = new Hashtable<>();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory");
environment.put(Context.PROVIDER_URL,"http-remoting://localhost:8080");
context = new InitialContext((Hashtable<String, String>) environment);
remote = (BackendRemote) context.lookup("ejb:backend/backend/BackendBean!ch.nic.reg.common.BackendRemote?stateful");
} catch (Exception e) {
e.printStackTrace();
}
javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "backend/backend/BackendBean!ch.nic.reg.common.BackendRemote?stateful" [Root exception is org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available]
08:43:19,916 ERROR [stderr] (ServerService Thread Pool -- 75) at org.jboss.ejb.client.EJBRootContext.lookupNative(EJBRootContext.java:160)
....
08:43:19,925 ERROR [stderr] (ServerService Thread Pool -- 75) Caused by: org.jboss.ejb.client.RequestSendFailedException: EJBCLIENT000409: No more destinations are available
08:43:19,925 ERROR [stderr] (ServerService Thread Pool -- 75) at org.jboss.ejb.client.NamingEJBClientInterceptor.handleSessionCreation(NamingEJBClientInterceptor.java:100)
Can anyone please help on this issue ?