• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Dean Rochester
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dean,
Thanks for posting the resolution!
 
hem kumar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic