-->
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.  [ 4 posts ] 
Author Message
 Post subject: Cannot load JDBC driver class 'null'!why?
PostPosted: Tue May 18, 2004 8:09 am 
Newbie

Joined: Tue May 18, 2004 7:50 am
Posts: 3
windows 2000 server + tomcat5 + hibernate2.1.2

server.xml:
<Context path="/quickstart" docBase="quickstart">
<Resource name="jdbc/quickstart" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/quickstart">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>

<!-- DBCP database connection settings -->
<parameter>
<name>url</name>
<value>jdbc:mysql://192.168.0.42:3306/fee_for_game</value>
</parameter>
<parameter>
<name>driverClassName</name><value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>bgame</value>
</parameter>
<parameter>
<name>password</name>
<value>123456</value>
</parameter>

<!-- DBCP connection pooling options -->
<parameter>
<name>maxWait</name>
<value>3000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>100</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
</ResourceParams>
</Context>

web.xml:
<resource-ref>
<res-ref-name>jdbc/quickstart</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

hibernate.cfg.xml:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/jdbc/quickstart</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<mapping resource="hibernatetest/Deadline.hbm.xml"/>
</session-factory>
</hibernate-configuration>



but,when I run my program,there is an exception:
19:42:56,984 WARN SettingsFactory:95 - Could not obtain connection metadata
java.sql.SQLException: Cannot load JDBC driver class 'null'


why?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 8:14 am 
Newbie

Joined: Tue May 18, 2004 7:50 am
Posts: 3
my database is mysql4.0.13
driver is mysql-connector-java-3.0.11-stable-bin.jar
JDK1.4


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 8:58 pm 
Newbie

Joined: Tue May 18, 2004 7:50 am
Posts: 3
hello~~
can everybody help me?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 12:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Mmm, as this is a tomcat configuration issue, I'm sure some one on the tomcat list would be able to help you sort this out. Sorry I don't have much experience with Tomcat setup.


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