I have a testing Ubuntu server running tomcat7 and oracle jdk 8, I am trying to load a few jar files that will be needed for a variety of future programs. Both web and jvm programs. I realized that there is a problem when I did a test run of a jar that will be running as a server background process, but when it runs I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: edu/illinois/sql/sqlConnection
at server.edu.illinois.xmlConverter.convertXML.run(Converter.java:27)
at server.edu.illinois.xmlConverter.Converter.main(Converter.java:13)
Caused by: java.lang.ClassNotFoundException: edu.illinois.sql.sqlConnection
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
I have added my jars with my classes to /shared/lib and catalina.properties knows to look there and there are symbolic links in $JAVA_HOME/jre/lib. Does anyone have any advice as to why my custom classes from my jars on the server are not being loaded properly? Also the jar that I ran to generate the error runs great in eclipse.
This is a different question than ClassNotFoundException/NoClassDefFoundError in my Java web application because I believe my jars are in the correct locations and I am trying to figure out what I have done wrong that is causing these classes not to load.