-->
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
PostPosted: Tue Nov 14, 2006 12:48 am 
Newbie

Joined: Mon Nov 13, 2006 2:52 am
Posts: 3
Hi,

I tried to implement hibernate 3.0.5 in Netbean 5.5.
It works fine using MySQL. I tried to use MSSQL Server.
My hibernate.properties file contains the following code
hibernate.connection.username=sa
hibernate.connection.password=pwd
hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.connection.driver_class=com.microsoft.jdbc.sqlserver.SQLServerDriver
hibernate.connection.url=jdbc:microsoft:sqlserver://<dbname>
hibernate.connection.pool_size=3

While building project am getting the following error

org.hibernate.connection.DriverManagerConnectionProvider configure
SEVERE: JDBC Driver class not found: com.microsoft.jdbc.sqlserver.SQLServerDriver
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1166)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1107)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:977)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:108)
at org.hibernate.connection.DriverManagerConnectionProvider.configure(DriverManagerConnectionProvider.java:61)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:80)
at org.hibernate.tool.hbm2ddl.SchemaExport$ProviderConnectionHelper.getConnection(SchemaExport.java:431)
at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:130)
at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:99)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:142)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:240)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:293)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)


I ve added the 3 jar files required for mssql server in the application/lib folder. Pls help me what do i need to do for solving this.

Thanks
Jayalakshmi


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 2:52 am 
Expert
Expert

Joined: Thu May 26, 2005 9:19 am
Posts: 262
Location: Oak Creek, WI
Check whether the lib files are on the ClassPath..

_________________
RamnathN
Senior Software Engineer
http://www.linkedin.com/in/ramnathn
Don't forget to rate.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 6:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
classpath of the console configuration that is.

note, in the svn/nightly build version we automatically use a selected projects dependencies.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 6:40 am 
Newbie

Joined: Mon Nov 13, 2006 2:52 am
Posts: 3
Max,

What steps i need to follow so that i can use ms-sqlserver in Hibernate tool.


Thanks
Jayalakshmi


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 14, 2006 6:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Add the driver to the console configuration class path and just configure hibernate.cfg.xml as you would if you ran it standalone.

_________________
Max
Don't forget to rate


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.