John David Anderson wrote:
- I've placed a copy of mysql-connector-java-3.1.8-bin.jar in the / $TomcatHome/common/lib directory (which has a bunch of other jar files in it)
I'm not sure either if this directory is automatically loaded into Tomcat's classpath. Typically all java application servers completely disregard the system's classpath and builds their own. It is standard though, that for every java web application's required libraries to put them into WEB-INF/lib. All jar files in this directory are most definitely added to the classpath when this application is started. True, some say that you'll end up with 5 copies of the same library if you have 5 applications in one Tomcat instance, but I prefer this way, since even if you update Tomcat or your system or anything you will still have the correct version of the library you wrote for it.
- When I try to connect to the mySQL database from my little JSP test app, I get a monster error (included at the end of this message)
How are you coding up the connection?
Could someone point me to a step-by-step or let me know what I'm doing wrong?
I'm using Tomcat 4.1.31, mySQL 4.0.23 on Java 1.4.2_07....
-- John
java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
java.lang.NoClassDefFoundError: org/aspectj/lang/Signature at java.lang.Class.forName0(Native Method) at java.lang.Class.forName (Class.java:141) at org.apache.jsp.index_jsp.connect(index_jsp.java: 25) at org.apache.jsp.index_jsp._jspService(index_jsp.java:528) at
This stack trace lends me to believe that the system is looking for the AspectJ library. AspectJ brings aspect oriented programming (versus objected-oriented programming) to java. Looking at the mysql documentation, all the dependencies of the mysql connector/j driver are self contained in the jar. (this is usually the case). Is some other code finding its way into your app?
--------------------
BYU Unix Users Group http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG. ___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
