Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
javax.naming.NameNotFoundException while connecting to Jboss 7 server from remote Java Client
Joined: Oct 02, 2013
Oct 02, 2013 20:00:55
I have a client that needs to connect to a ejb which is deployed on a remote
7 server . When the server was localhost i never faced any issues . However now i constantly get an exception
javax.naming.NameNotFoundException: ejb:SPIEAR/Service//Connect!com.gem.spi.Connection?stateful -- service jboss.naming.context.java.jboss.exported.ejb:SPIEAR.Service."Connect!com.gem.spi.Connection?stateful"
My client code that makes the call to the ejb is as follows :
Context context = null; String JBOSS_CONTEXT="org.jboss.naming.remote.client.InitialContextFactory";; Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT); props.put(Context.PROVIDER_URL, "remote://10.160.148.61:4447"); props.put(Context.SECURITY_PRINCIPAL, "testuser"); props.put(Context.SECURITY_CREDENTIALS, "testpassword"); context = new InitialContext(props); //InitialContext annuaireJNDI = new InitialContext(); Connection Connector = (Connection) context .lookup("ejb:SPIEAR/Service//Connect!com.gem.spi.Connection?stateful");
On the server side when i deploy the EAR i get the following logged regarding the nature of the deployment
java:global/SPIEAR/Service/Connect!com.gem.spi.Connection java:app/Service/Connect!com.gem.spi.Connection java:module/Connect!com.gem.spi.Connection java:jboss/exported/SPIEAR/Service/Connect!com.gem.spi.Connection java:global/SPIEAR/Service/Connect java:app/Service/Connect java:module/Connect
Looking at the server logs & reading
I was hoping that the call would succeed but no success .
Anyone help point out my mistake ?
It is sorta covered in the
JavaRanch Style Guide
subject: javax.naming.NameNotFoundException while connecting to Jboss 7 server from remote Java Client
hello world problem with local interface and stateless session bean.
Problem with EJB lookup on JBoss 7.1
java.lang.IllegalStateException: No EJB receiver available for handling - again
JNDI lookup between GlassFish 3.1 and JBoss AS 7.1
Lookup EJB on Different Application servers
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014