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
|
|