-->
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.  [ 3 posts ] 
Author Message
 Post subject: javax.naming.NameNotFoundException: jdbc not bound
PostPosted: Sun Mar 05, 2006 2:39 am 
Newbie

Joined: Sun Mar 05, 2006 2:24 am
Posts: 2
Hi ,

Iam the new user of Hibernate,In my apllication iam using Hibernate2.1.5 , server as JBOSS and Database as MySql.i don all the configuration in the JBOSS .when iam going to deploy the application iam getting this Error.

This is the error Log

11:11:20,968 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
11:11:21,421 WARN [SettingsFactory] No dialect set - using GenericDialect: Coul
d not instantiate dialect class
11:11:21,421 INFO [Dialect] Using dialect: net.sf.hibernate.dialect.GenericDial
ect
11:11:21,421 INFO [SettingsFactory] Use outer join fetching: false
11:11:21,421 INFO [NamingHelper] JNDI InitialContext properties:{}
11:11:21,436 FATAL [DatasourceConnectionProvider] Could not find datasource: java:jdbc/MesuDS
javax.naming.NameNotFoundException: jdbc not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(Da
tasourceConnectionProvider.java:44)
at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionPr
ovider(ConnectionProviderFactory.java:83)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.ja
va:65)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1
132)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.
java:766)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:
476)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:444)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
upport.java:271)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
eanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)


**************************************************
anybody can help me.


sreenu.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 05, 2006 3:06 am 
Regular
Regular

Joined: Wed Feb 08, 2006 3:59 pm
Posts: 75
You need to deploy a datasource, put a file named (for instance) mesu-ds.xml in JBoss deploy dir looking like :

Code:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>MesuDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/mesu</connection-url>
    <driver-class>org.gjt.mm.mysql.Driver</driver-class>
    <user-name>hibernate</user-name>
    <password>hibernate</password>
  </local-tx-datasource>
</datasources>


And your hibernate-service.xml will get the DS with this attribute :

Code:
<attribute name="DatasourceName">java:/MesuDS</attribute>


You can add /jdbc to this JNDI name if you want.


Top
 Profile  
 
 Post subject: Its helpful to me
PostPosted: Tue May 09, 2006 8:35 am 
Newbie

Joined: Sun Mar 05, 2006 2:24 am
Posts: 2
Hi gtm,

Thanx a lot it will lot helpful to me.


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

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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.