aspose file tools*
The moose likes JDBC and the fly likes mssql jars not being found in common/lib directory on tomcat 5.5 server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "mssql jars not being found in common/lib directory on tomcat 5.5 server" Watch "mssql jars not being found in common/lib directory on tomcat 5.5 server" New topic
Author

mssql jars not being found in common/lib directory on tomcat 5.5 server

Dean Rochester
Greenhorn

Joined: Feb 22, 2010
Posts: 2
I know this is more of a web question, but since it had to do with database connection I thought it should go here...

I have a tomcat 5.5.23 web app that uses msbase.jar, mssqlserver.jar and msutil.jar to make its connection

I can run it locally but when I deploy it to another tomcat 5.5.23 instance on another server, I get

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

I put these jars in my web-inf/lib folder and I still get the same thing.

The common/lib directory has these 3 files in it too.

What am I missing?

Thanks in advance
Dean-O
Dean Rochester
Greenhorn

Joined: Feb 22, 2010
Posts: 2
I figured it out... I had to have the jar files in my specified JAVA_HOME/jre/lib/ext directory too then all was fine

The bean jar I had, was using other jar files, that were not part of the main bean jar file... and that no matter that I had them im the common/lib and shared/lib directory of tomcat they were not picked up until I put them in the JAVA_HOME/jre/lib/ext directory

FYI
Dean-O
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30894
    
158

Dean,
Thanks for posting the resolution!


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
hem kumar
Ranch Hand

Joined: Sep 05, 2005
Posts: 97
But its not a good practice to put 3rd party jar files inside your java directory. That way your program can not be portable. So always set the Classpath to include the jars and also put these jars inside the lib folder of your IDE. I hope this will solve the problem for you.


.....For Every Problem There Is a Solution.....
Regards, Hem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: mssql jars not being found in common/lib directory on tomcat 5.5 server