-->
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.  [ 5 posts ] 
Author Message
 Post subject: JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQ
PostPosted: Wed Dec 21, 2005 1:28 pm 
Newbie

Joined: Wed Dec 21, 2005 12:51 pm
Posts: 4
Hi All,
I am very new with Hibernate.Here i am trying to excute some example of hibernate 3.0 version ON Eclipse IDE with java 1.4.8 n databse is Microsoft SQLServer.

I am getting error like "JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQLServerDriver"


here is the hibernate.cfg.xml file:

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://localhost/hibernatetutorial</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password">sa</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Mapping files -->
<mapping resource="contact.hbm.xml"/>
</session-factory>
</hibernate-configuration>
=====================================

N i copied all database jar files into the lib directory of the project like msbase.jar,mssqlserver.jar,msutil.jar....................I am not getting where is the mistake.

So could anybody help me on this.i will appreciate ur response.........

Warm Regards,
simmi


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 21, 2005 2:32 pm 
Newbie

Joined: Thu Dec 15, 2005 8:31 am
Posts: 10
Is the lib directory where the jars are located in the project build path?


Top
 Profile  
 
 Post subject: JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQ
PostPosted: Wed Dec 21, 2005 2:57 pm 
Newbie

Joined: Wed Dec 21, 2005 12:51 pm
Posts: 4
Hi,
YES all jar files r placed in the lib Directory........
This is the path where all jar files r placed

C:\HibernateExample\hibernate\lib

Thnx

_________________
simmi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 22, 2005 12:58 am 
Newbie

Joined: Thu Dec 15, 2005 8:31 am
Posts: 10
OK. Is that directory in the build path for the project?

project properties -> Java Build Path -> Libraries tab

Is the driver jars listed there.


Top
 Profile  
 
 Post subject: JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQ
PostPosted: Thu Dec 22, 2005 9:44 am 
Newbie

Joined: Wed Dec 21, 2005 12:51 pm
Posts: 4
Hi ,

Thank u very much for ur help.Actually i put them phisically in lib directiry.
But they were not appear in JavaBuidPath.But now i put them in JavaBuildPath.Now it is working good.......Thx alot

_________________
simmi


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