File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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 ?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: javax.naming.NameNotFoundException while connecting to Jboss 7 server from remote Java Client
Lookup EJB on Different Application servers
java.lang.IllegalStateException: No EJB receiver available for handling - again
hello world problem with local interface and stateless session bean.
JNDI lookup between GlassFish 3.1 and JBoss AS 7.1
Problem with EJB lookup on JBoss 7.1
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014