aspose file tools*
The moose likes JDBC and the fly likes Context give: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Context give: Cannot load JDBC driver class Watch "Context give: Cannot load JDBC driver class New topic
Author

Context give: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'

Anders Boje Larsen
Greenhorn

Joined: Jul 15, 2010
Posts: 16
Hi
I have in many years use a JDBC Driver 2000, but now we are moved to a MS SQL Server 2008. That's why I now are trying to make e connection with sqljdbc4.jar from MS.

Normally we use "context" to make the connection.


But now i give me a exception.


It works with a connection make like this:


I use jakarta-tomcat-5.5.9 and Eclipse, with JDBC Driver SQL 4.0.

I have placed the jar file the workspace WEB-INF/lib and on TOMCAT: C:\jakarta-tomcat-5.5.9\common\lib

Please help me to get the context to work

THANKS
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That looks like you may be running a JVM that is too old to support the classes in the new driver.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Anders Boje Larsen
Greenhorn

Joined: Jul 15, 2010
Posts: 16
You may have right in that conclusion.

I tried to run some code with the connection that works and get this error that I think tell the same story as you.



I can read that JVM is a way to execution some code on my machine, is that right?
And who can i update and solved this problem?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


I can read that JVM is a way to execution some code on my machine, is that right?

Yes. Upgrade your JRE/JDK (as appropriate).
Anders Boje Larsen
Greenhorn

Joined: Jul 15, 2010
Posts: 16
I solved the problem with use sqljdbc.jar instead of sqljdbc4.jdbc.
There are to different in the same version. I are not allow to update the java version we are running here.

Thanks for the help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context give: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
 
Similar Threads
ConnectionPool
SQLNestedException
connection pooling problem
org.springframework.orm.hibernate3.HibernateJdbcException:
Cannot create JDBC driver of class SQLServerDriver