aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes javax.naming.NameNotFoundException: cust not bound Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "javax.naming.NameNotFoundException: cust not bound" Watch "javax.naming.NameNotFoundException: cust not bound" New topic
Author

javax.naming.NameNotFoundException: cust not bound

yousuf alam
Greenhorn

Joined: Apr 22, 2008
Posts: 9
Hi Team,

I am new For ejb and Jboss server.I am trying to run CMP bean using datasource using Jboss server 5.1.0 GA.But its throwing "javax.naming.NameNotFoundException: cust not bound" Error
Since i am facing this issue for the last two days.please help me asap..
This is my servlet program to call the JNDI name :

Context ctx = new InitialContext(props);
custhome home = (custhome) ctx.lookup("java:comp/env/cust");

This is my jboss.xml,
------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd">
<jboss>
<enterprise-beans>
<entity>
<ejb-name>custbean</ejb-name>
<jndi-name>cust</jndi-name>
</entity>
</enterprise-beans>
</jboss>
-----------------------------------------------
and ejb-jar.xml as follows,
-------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>custbean</display-name>
<enterprise-beans>
<entity>
<ejb-name>custbean</ejb-name>
<home>com.db.custhome</home>
<remote>com.db.custremote</remote>
<ejb-class>com.db.custbean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>dbo.ejb</abstract-schema-name>
</entity>
</enterprise-beans>
</ejb-jar>
----------------------------------------------------------------


yousuf alam.A
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.naming.NameNotFoundException: cust not bound