You got ServletException so it is some kind of web application (maybe you got embedded tomcat server in eclipse). It is normal that when you run standalone java class all jars are taken from classpath, but when you deploy application to servlet container you need to put those jars in for example WEB-INF/lib directory as they are not deployed.
I am running my app from eclipse, i dunno if that makes a difference.. I dont have anything on my tomcat folder!
Really it does make difference, since your adding the jar file to eclipse, only eclipse knows where actually jar file is located, but when it comes to running on the any server(tomcat), server should know where jar files are located, when we consider tomcat you should place jar files inside WEB-INF/lib folder then only tomcat come to know about that project an your getting the error from tomcat not from eclipse, eclipse is an IDE which helps while coding, if you add you jar in class path then it will only eclipse come to know not your web server, always your web server search jar file in WEB-INF/lib folder
Eduardo Ponce de Leon
Joined: May 13, 2009
Well, that is weird, yesterday it was working fine. The .jar was in that folder, i delete the file and add it again and it is working fine now.