java.lang.NoClassDefFoundError
Hi, I'm trying to get JBoss Hibernate running, on Eclipse 3.1, on Ubuntu 6.06.
This is a detailed (and lengthy) problem description - it's very important to me to solve this. Thank you indeed for your time and efforts. I need to resolve this, at any rate. Thanks again. This is the Java code I'm trying to execute: Code:
import org.hibernate.SessionFactory; Quote:
1. By default, Java on Ubuntu is started via "/usr/bin/java", which is a link that points to "/usr/lib/j2sdk1.5-sun/bin/java", in my case, and that's allright. "/usr/lib/j2sdk1.5-sun/lib" does contain the JAR file in question, "commons-logging-1.1.jar". 2. Anyways, - to make sure to match a working Java Virtual Machine, I'm now starting Eclipse using a custom command: "/usr/lib/j2sdk1.5-sun/bin/java -Xms40m -Xmx256m -jar /media/hde1/home/robert/eclipse-3.1.2-wtp/startup.jar -os linux -ws gtk -arch x86 -launcher /media/hde1/home/robert/eclipse-3.1.2-wtp/eclipse -name Eclipse -showsplash 600 -exitdata 460011 -vm /usr/lib/j2sdk1.5-sun/bin/java -vmargs -Xms40m -Xmx256m -jar /media/hde1/home/robert/eclipse-3.1.2-wtp/startup.jar". Again, "/usr/lib/j2sdk1.5-sun/lib" does contain the JAR file in question, "commons-logging-1.1.jar". 3. In the project's "Java Build Path", I've added (a) "/usr/lib/j2sdk1.5-sun/lib/hibernate3.jar" (otherwise, the project wouldn't compile), and (b) "/usr/lib/j2sdk1.5-sun/lib/commons-logging-1.1.jar" (containing the class that could not be found). I've also made sure both libraries are checked to be exported. 4. In the project's "Java Build Path", I've also added a reference to the variable "JRE_LIB", which points to "/usr/lib/j2sdk1.5-sun/jre/lib/rt.jar". That package that cannot be found, "commons-logging-1.1.jar", does exist in "/usr/lib/j2sdk1.5-sun/jre/lib/ext". 5. On my Ubuntu system, there's also some dubious folder named "/usr/share/java". There, mostly links exist, but additionally, some actual JAR files. I've added the JAR file in question, "commons-logging-1.1.jar", to it. 6. Java (in case some application would still ask "the system" for where to find Java) should be configured allright: Quote:
8. At some point of time, I'd also set the CLASSPATH property accordingly, pointing to "/usr/lib/j2sdk1.5-sun/jre/lib/ext", where "commons-logging-1.1.jar" resides. - No luck. 9. I've searched the web for similar issues, but anything doesn't seem to help for me. Also, I haven't had such problems when using Eclipse on Windows (using other libraries), extensively. ------------------------ Still no luck! I've spent a d*mned complete day on just trying to resolve that simple issue! And it's not going to stop! F*ck!! ------------------------ - Would anyone please be so nice to get me out of here? You see, I've tried alot, and I really need some assistance to get me productive again. Sincerely robbbert |
Another case:
I've added the Apache Axis default web app to Tomcat. - When I point the browser to that URL, the following error gets thrown: Quote:
Quote:
|
your posting are quite long and left alone stuffs like apache and tomcat but no harm checking your javac , jar and javah and such executables in your usual */bin directories ...
//i'm not sure whether this can help you ... . |
Quote:
|
no files are as offending as how you mentioned i guess ...
can try something like /usr/bin/jar -V and for the rest of */bin/javac and such too ... probably they belong to gnu softwares ... but if you have already got these right in the first place then the problems might lie somewhere else which i wouldnt know ... //sorry , cant help you much ... . |
Quote:
BTW, I really dislike how Ubuntu (my favorite Linux distribution) handles Java. When you install Sun Java (by Ubuntus repositories...), there shouldn't remain symbolic links to Kaffe Java, IBM Java, "some" Java, etc. When you state, "java", "javah", "javac", "jar", etc., any of these programs should point to the same Java version. Thanks |
Compiling JSPs with Tomcat works now. For almost two days I'd tried anything until finally I switched from that Tomcat version that came bundled with NetBeans to an original one.
|
All times are GMT -5. The time now is 08:15 PM. |