aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate : JDBC Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate : JDBC Driver" Watch "Hibernate : JDBC Driver" New topic
Author

Hibernate : JDBC Driver

Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
Hi all,
I am very newbie to Hibernate. Earlier I was using the simple JDBC and SQL Server 2000. I just installed the Hibernate on my computer and now I am configuring it. Now it says to "copy to JDBC driver to the to global classpath". I just want to know where that Driver is located. Earlier i was using simple string to connect to SQL Server 2000. Its on single machine i am talking about.

I will appreciate if someone can help me in this regard.

Thanks
Manish Jain
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
The SQLServer driver you used comes in a jar file. It's that jar file that you need to include in your classpath when using Hibernate.


Ping & DNS - my free Android networking tools app
Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
Thanks for the reply I really appreciate it. Can you please give me the exact name of thar jar file.

Thanks
Manish Jain
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
I have no idea what the file is called (and I haven't used SQLServer in years). But you said that it has worked for you before, so you must have had it somewhere in your classpath. Search through the jar files on your hard disk.
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
For the MSSQL 2000 JDBC driver the jars are:

msbase.jar
mssqlserver.jar
msutil.jar
Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
Hi all,
Thanks for help but these jar files are not in my my machine. I checked it although I have SQL Server 2000 installed. Do I have to Install these files from somewhere.

Thanks
Manish Jain
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
The driver is available from the Microsoft web site.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Manish Jain:
Hi all,
Thanks for help but these jar files are not in my my machine. I checked it although I have SQL Server 2000 installed. Do I have to Install these files from somewhere.

Thanks
Manish Jain


Far better would be to use jTDS, since Microsoft's own driver is not supported by Hibernate and has some issues which make it a poor choice.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Manish Jain
Ranch Hand

Joined: Jun 07, 2005
Posts: 30
Hi All,
Thanks Everyone for answering and giving me useful suggestions.I really appreciate it. What I am doing to do now I am going to use JTDS for connectivity. Thanks everyone once again

Thanks
Manish Jain
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
Paul Sturrock says:

Far better would be to use jTDS, since Microsoft's own driver is not supported by Hibernate and has some issues which make it a poor choice.


Could you elaborate a little bit on those issues? I haven't used the MS driver, but a couple years back the jTDS driver was substantially slower than commercial drivers like Weblogic and iNet.
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 293

If you have a look at Hibernate's supported databases in the section about SQL Server, you can see some of the issues with the Microsoft SQL Server drivers.

Hopefully after today's announcement that will all change.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Ulf Dittmer:
Paul Sturrock says:



Could you elaborate a little bit on those issues? I haven't used the MS driver, but a couple years back the jTDS driver was substantially slower than commercial drivers like Weblogic and iNet.


I don't have recent experience with commercial drivers, so I can't say how jTDS compares with any of them. The MS driver is just an old version of a Data Direct driver (its seven versions behind Data Direct's current offering). We found memory leaks in the driver when running stress tests using it. Its licensing also meant you can't package it with your product. Support for it was also very poor, which is perhaps understandable since its not actually a Microsoft product, and Data Direct licensed it to MS as a static product. There are also little configuration gotchas which make it less easy for a novice user to work with than other drivers.
George Daswani
Greenhorn

Joined: Sep 28, 2005
Posts: 12
I personally use JTDS and InetSoftware's JDBC Driver - both have been quite stable..

If you want a MS sourced driver, then you might want to try out the new Beta Driver out for MS SQL 2000, and 2005

http://www.microsoft.com/sql/downloads/2005/jdbc.mspx

it's not based off that DataDirect POS anymore..

Support for SQL Server 2000 and SQL Server 2005

Support for JDBC 3.0

Improved performance

Improved XA transaction support

BLOB and CLOB support

Integrated authentication support

Updateable result sets
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate : JDBC Driver