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: Unable to specify new driver related to MS SQL Server 2005
PostPosted: Fri Apr 07, 2006 9:03 am 
Newbie

Joined: Fri Apr 07, 2006 3:30 am
Posts: 1
Hello,

I tried to use Hibernate tools (org.hibernate.eclipse_3.1.0.beta4 ).

I generate a hibernate.cfg.xml file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="Lambda">
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.password">megaouel</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://LONDON\SQLEXPRESS;DatabaseName=CO</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.default_catalog">CO</property>
<property name="hibernate.default_schema">dbo</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
</session-factory>
</hibernate-configuration>


Notice that the MS drivername has changed from SQL 2000 to SQL 2005

I create then a Hibernate console ( I provide link to sqljdbc.jar in classpath area)

I tries to reversere engineer an existing database table.

I got two kinds of problems when i choose refresh to retrieve the existing database schema (refresh button):

- Pending message is displayed for a while, and no schema is found or,


- I got an error message box : Error while fetching children

java.lang.ClassNotFoundException com.microsoft.sqlserver.jdbc.SQLServerDriver


I have tried to install the MS driver in the eclipse directories but it does not seem to work.

Please how to setup hibernate tools with external drivers ?


Thank you

Amar


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 17, 2006 6:03 pm 
Proxool Developer
Proxool Developer

Joined: Tue Aug 26, 2003 10:42 am
Posts: 373
Location: Belgium
je me demande si ton driver ne devrait pas se trouver dans le classpath de ton projet (dans les jars utilises par ton projet)...


Top
 Profile  
 
 Post subject: Re: Unable to specify new driver related to MS SQL Server 20
PostPosted: Thu Jun 22, 2006 12:06 pm 
Newbie

Joined: Thu Jun 22, 2006 12:03 pm
Posts: 1
amaramar wrote:
Hello,

I tried to use Hibernate tools (org.hibernate.eclipse_3.1.0.beta4 ).

I generate a hibernate.cfg.xml file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="Lambda">
<property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name="hibernate.connection.password">megaouel</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://LONDON\SQLEXPRESS;DatabaseName=CO</property>


Your problem is that jdbc:microsoft:sqlserver has changed to jdbc:sqlserver in 2005.

christos


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.