-->
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.  [ 13 posts ] 
Author Message
 Post subject: Reverse Engineering with SQLserver 05 fails in Eclipse 3.2
PostPosted: Tue May 09, 2006 3:28 pm 
Newbie

Joined: Tue May 09, 2006 2:57 pm
Posts: 2
Hi ,
I am new to eclipse and Hibernate so please excuse my ignorance...
I am using Hibernate in Eclipse 3.2 , and I created a simple cfg from Sql Server dialect and checked the option of creating a console configuration file... , added jdbc driver jar in console configuration dialog box and then tried to rev. eng. the database from a sql server 2005 database.... however when I try to run Run/Hibernate Code Generation , I get followig error... I have a simple Test.java in same project wich connects to this 2005 database with same JDBC driver.... what I am doing wrong ?

Here is the stack trace

org.hibernate.console.HibernateConsoleRuntimeException: Problems while loading database driverclass (com.microsoft.sqlserver.jdbc.SQLServerDriver)
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver


-TIA
Pankaj


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 8:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Maybe I am stating the obvious but it s a classpath problem. I would also suggest you use jTDS JDBC driver.


Top
 Profile  
 
 Post subject: Re Reverse Engineering with SQLserver 05 fails in Eclipse3.2
PostPosted: Wed May 10, 2006 8:28 pm 
Newbie

Joined: Tue May 09, 2006 2:57 pm
Posts: 2
Hi David,
Thanks fo replying, two comments

1) Why do you suggest I should use jtDS driver..I have Test.Java in same package wchich connects to 2005 db with MS driver.

2) where should I set the class path.I have set that into Buildpath of the eclipse project as well as Console Configuration dialog box. What place I am missing ?

-TIA


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 5:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Guys, MS's *new* driver is also good.

And it looks like you did not put the driver jar into the console configuration classpath ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 5:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks for confirming the latest MS driver is OK. I recommend jTDS because I use it and I have been very happy with its performance, reliability and stability. As a general comment, I tend to stay with libs/drivers etc that I come to trust rather then keep trying the next version of X to see if it has caught up.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 11, 2006 5:18 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
jtds is definitly better than their old driver.

the new driver has the advantage over jtds (at the moment) that it can run in their new locking mode which gives much better OLTP performance.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 7:03 pm 
Newbie

Joined: Tue Jun 20, 2006 8:39 am
Posts: 5
max wrote:
the new driver has the advantage over jtds (at the moment) that it can run in their new locking mode which gives much better OLTP performance.

It was a nice dialogue about the two drivers - but what is the solution for the problem described at the beginning (beside using jtds - which works)? I have the same problem with Eclipse 3.2 and Hibernate Tools (most recent version) and I must use the Microsoft driver. I've posted it in the german part of the forum.

Did anyone got the refactoring part to work with the "new" Microsoft SQL driver and SQL Server 2000?

Greetings,
JiAi


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 7:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
as already stated - you need to put it in the classpath and make sure the classname is spelled correctly.

works for me.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 7:35 pm 
Newbie

Joined: Tue Jun 20, 2006 8:39 am
Posts: 5
max wrote:
as already stated - you need to put it in the classpath and make sure the classname is spelled correctly.
works for me.

But not for me - I've absolutely no idea what is wrong. I'm a novice user to Hibernate, but not to Java ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 07, 2006 7:42 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
create a screenshot of the console config settings and let me see if something obvious is wrong.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 5:43 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
I have to agree I have the same problem. I am using Beta 10 of the latest Tools.

When I look in the Edit launch configuration properties dialog and I go to the classpath directory, I can see that it automatically added my default classpath from the project. This project already has the sqljdbc.jar in its class path.

I tried removing this default class path and adding the sqljdbc.jar manually, and I still have the same problem.

When I look at the source file for the config it doesn't show anything about the classpath, even if I manually added on.

I too am new to hibernate and I am trying to learn how to use it. I do not see anyway to attach an image to a post, or I would do that. There is only an IMG tag which requires me to be able to place an image on a public server someplace, which I do not have available to me.

However I can describe the dialog here:

Main Tab
Type: Core
Project: HibernateTest
Property file: <empy>
Configuration file: \HibernateTest\hibernate.cfg.xml
Presistence unit: <greyed out and empy>

Options Tab
Naming strategy: <empty>
Entity resolver: <empty>

Classpath Tab
Code:
User Entries
\--HibernateTest (default classpath)
    \--HibernateTest
    \--sqljdbc.ar - C:\workspaces\
    \--Hibernate 3


Mappings Tab
<empty>

Common Tab
Save As: Local file
Display in favorites menu: <nothing checked>
Console Encoding: Default (Cp1252)
Standard Input and Output: Allocate Console
Launch in background is checked

Please Help,

-Creepy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 17, 2007 6:31 pm 
Newbie

Joined: Mon Sep 17, 2007 5:31 pm
Posts: 8
Update...

I tried with the jtds drivers and it doesn't have this problem. Only the Microsoft sqljdbc.jar do I have this problem. So that tells me I have it configured correctly as far as classpaths go, but something else outside of my controll seems to be an issue.

However I get a new error with is off topic for this thread, and will post a new topic to address it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 26, 2007 4:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
truly weird that jtds (or any other driver jar I have tried) loads fine but ms's driver doesn't.

I don't know for now why since i haven't been able to reproduce it yet.

_________________
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.  [ 13 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.