File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Name Not Bound Exception 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 "Name Not Bound Exception" Watch "Name Not Bound Exception" New topic

Name Not Bound Exception

sravani jetty
Ranch Hand

Joined: Jun 06, 2007
Posts: 38
I am using Netbeans IDE with JBoss as application server and MySql as Database. I am working on it more than a week and can not able to solve it.
I Placed the mysql-connector-java-5.0.8-bin.jar file in the lib folder and configured the mysql-ds.xml file and placed it in the server\default\deploy
directory. And mysql-ds.xml is as follows

Name of my project is sample and in sample-war file I wrote a JSP to call the EJB methods. And this is as follows

I wrote a remote Stateless session bean and an entity bean.
And my persistence.xml file looks as follows
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<persistence-unit name="titan" transaction-type="JTA">
<property name="" value="update"/>

When I run the application i got an exception like sample not bound.
When JBoss is started I can see an error in the console. It is
ObjectName: persistence.units:ear=sample2.ear,jar=sample2-ejb.jar,unitName=titan
Reason: javax.naming.NameNotFoundException: jdbc not bound
I Depend On:
Depends On Me:

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441


Change it to

By default, the datasources are bound to the java: namespace

[My Blog] [JavaRanch Journal]
sravani jetty
Ranch Hand

Joined: Jun 06, 2007
Posts: 38
Hi Jaikiran,
I did that but still it is not working.

I agree. Here's the link:
subject: Name Not Bound Exception
It's not a secret anymore!