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.  [ 2 posts ] 
Author Message
 Post subject: Tomcat unable to make a JNDI DataSource visible to Hibernate
PostPosted: Thu Feb 05, 2004 4:34 pm 
Regular
Regular

Joined: Wed Dec 31, 2003 4:26 am
Posts: 108
Location: Berkeley, CA
No matter how I try it, trying to use a Tomcat (5.0) container-provided data source (vs. Hibernate provided one) doesn't work for me. Here's the current state:

=======================

Feb 4, 2004 9:46:25 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: null
Feb 4, 2004 9:46:25 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Cannot create JDBC driver of class '' for connect URL 'null'
Feb 4, 2004 9:46:25 PM net.sf.hibernate.JDBCException <init>
SEVERE: Cannot open connection
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:257)
at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3157)
at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3140)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
at net.sf.hibernate.loader.Loader.list(Loader.java:940)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1454)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1446)
at com.publishworks.merchandise.DataSource.fetchAll(DataSource.java:26)
...

=============================

Has anyone seen this? I have the server.xml configure properly, I believe. Also refer to the resource in the web.xml. The postgres.jar is in Tomcats common/lib folder. Any clues?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 05, 2004 4:43 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Try to get a JDBC connection from Tomcats JNDI manually, without Hibernate. If it doesn't work, check the Tomcat mailinglists or FAQ or ...

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.