-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Need help to configure jndi in jboss using hibernate
PostPosted: Mon Mar 17, 2008 7:01 am 
Newbie

Joined: Mon Mar 17, 2008 6:41 am
Posts: 1
Location: india
hi all,

i am getting this error javax.naming.NameNotFoundException: HibernateDS not bound.

please any one help me to solve this.

I want to configure jndi in jboss using hibernate.
for that i typed in java file
Context ctx = new InitialContext();
Object obj = ctx.lookup("java:/HibernateDS");
sessionFactory = (SessionFactory) obj;

and in mysql-ds file localted in jboss/server/default/deploy folder
i have pasted thse lines
<datasources>
<local-tx-datasource>
<jndi-name>HibernateDS</jndi-name>
<type-mapping>mySql</type-mapping>

<connection-url>jdbc:mysql://localhost:3306/hibernatedb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>sumathi</password>

<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>

<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>


could anyone pl help me in this.
i am trying almost 2 days to resolve this.

Regards,
suma


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.