• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dean,
Thanks for posting the resolution!
 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic