• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

javax.naming.NameNotFoundException: cust not bound

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
----------------------------------------------------------------

 
reply
    Bookmark Topic Watch Topic
  • New Topic