File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes problem in acessing session bean using jndi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "problem in acessing session bean using jndi" Watch "problem in acessing session bean using jndi" New topic
Author

problem in acessing session bean using jndi

Aseet Padhi
Greenhorn

Joined: Mar 29, 2010
Posts: 1
Hi All,

I am getting following error while accessing the session bean using jndi.

xxxxxxxxxxxxxxxxxxxxxx
yyyyyyyyyyyyyyyyyyyyy
zzzzzzzzzzzzzzzzzzzzzzzzz
aaaaaaaaaaaaaaaaaaaaaaaaa
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
at javax.naming.InitialContext.lookup(Unknown Source)
at MyClient.main(MyClient.java:31)


I have Session bean in com.mysession package
Session Bean Name:vMySessionBean
Home interface: MySessionBeanHome
Remote interface: MySessionBeanRemote

MyClient class as follows



my ejb-jar.xml



jboss-ejb-jar.xml



Kindly help me.

Regards,
Aseet

[Devaka: Added code tags - UseCodeTags]
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 475
    
    3
Since client and JBoss are running in different VMs, client will not have access to the "java:/" and "java:comp/env/" namespaces.
Just use

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in acessing session bean using jndi
 
Similar Threads
Error while calling EJB
Error: javax.naming.NameNotFoundException: SignOn not bound
EJB JNDI name
Issues with jboss.xml file in jboss 5.1
"jndi:ejb not bound" error while deploying EJB