- This topic has 3 replies, 2 voices, and was last updated 14 years, 1 month ago by support-swapna.
-
AuthorPosts
-
AlMartindaleMemberHi
I hope someone can help. I am pretty rusty with my Java, and have been asked to get a JSP web site runing on Windows XP with MySql, which was written for Java 1.2 with Oracle running on a Unix server.
It is going to be used as a standalone kiosk machine which will not be on the network.
I have managed to get it running as a web project in MyEclipse 8.6 using the J2EE 1.4 Specification Level and mysql-connector-java-5.1.13-bin.jar.
I have also got it working using J2EE 1.3 specification Level and mysql-connector-java-3.1.14bin.jar. It won’t work without J2EE 1.3 or J2EE 1.4 selected.
But I am completely unable to get it running on TomCat outside of MyEclipse.
The error I keep running into is:
java.lang.NoClassDefFoundError: java/sql/NClob
at java.lang.Class.getDeclaredMethods0(Native Method)I have found this post which says this only came in with Java 1.6:
http://groups.google.com/group/xerial/browse_thread/thread/d67b83ced1120f05I have tried several versions of TomCat (standalone versions 5.5, version 4.1 and the latest version that comes as an XAMPP extension 6.02), and I have tried these installations with Java 1.4.2 installed and with Java 1.6 installed.
My latest tests were on
Apache Tomcat/4.1.40
Java 1.4.2_09-b05 Sun Microsystems Inc.
Windows XP 5.1 x86
mysql-connector-java-3.1.14bin.jarIs there a way I can use the combination of Java, Tomcat and classes that MyEclipse is using without running MyEclipse?
Could I compile the JDBC connector myself to avoid the issue?
Please, any ideas on how to solve this would be really, realy welcome.
Thanks
Al
support-swapnaModeratorAlMartindale,
I suspect this error is purely related to environmental variables/Java version Incompatibility. Please check the JRE version on the Tomcat.
Is there a way I can use the combination of Java, Tomcat and classes that MyEclipse is using without running MyEclipse?
You can create a .war file from MyEclipse and copy it to Tomcat webapps directory. Start the server and you should be able to run the application.
AlMartindaleMemberThanks for your help.
I don’t think it was because it wasn’t packaged up as a WAR, but I found a work around in the end.
The TomCat extension that comes with Xampp has its own Java runtime.
So I copied the JRE folder from the Eclipse installation to the Xampp installation:
C:\xampp\tomcat\jre\I had already put the mysql-connector-java-5.1.13-bin.jar JDBC driver and the J2EE 1.4 jar files in the lib directory of the web application:
C:\xampp\tomcat\webapps\ict\WEB-INF\lib (where ict is the application name)I guesss these could also go in the C:\xampp\tomcat\lib folder, but it is working now so I’m not going to tinker any more
All the best
Al
support-swapnaModeratorAlMartindale,
Glad to know that it is working.
Do let us know if you have any issues. -
AuthorPosts