NoClassDefFoundError
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mohamed_zafer
Posted On:   Monday, July 30, 2001 04:24 AM

Hello There, I am using RedHat6.2. I have written a java program and it compiles fine. But when i try to run it , it gives the following Exception classNotFoundException: oracle/jdbc/driver/OracleDriver when my OracleDriver is in the classpath. I tried using the -cp option, i.e., java -cp $CLASSPATH InsertRows Now i get the following error java.lang.NoClassDefFoundError: /:/usr/java/jdk1/3/1/lib:/usr/java/extlib/classes111/zip If u could notice the folder name jdk1.3.1 is taken as jdk1/3/1, similarly classes111.zip is taken as classes111/zip. Why is this happening. I have used redhat be   More>>

Hello There,



I am using RedHat6.2. I have written a java program and it compiles fine. But when i try to run it , it gives the following Exception


classNotFoundException: oracle/jdbc/driver/OracleDriver



when my OracleDriver is in the classpath.



I tried using the -cp option, i.e.,


java -cp $CLASSPATH InsertRows



Now i get the following error



java.lang.NoClassDefFoundError: /:/usr/java/jdk1/3/1/lib:/usr/java/extlib/classes111/zip



If u could notice the folder name jdk1.3.1 is taken as jdk1/3/1, similarly classes111.zip is taken as classes111/zip. Why is this happening. I have used redhat before and not faced problems like this, after i reinstalled I am getting these exception.


Does anyone have idea what the reason could be, I could'nt find a answer in any other forums, and already wasted two days digging into it. Help will be very much appreciated.



Thanks in advance



Mohamed Zafer

   <<Less

Re: NoClassDefFoundError

Posted By:   Nathan_Meyers  
Posted On:   Monday, July 30, 2001 11:09 AM

My guess is that you've got an errant space in your CLASSPATH environment variable. That could explain not finding the Oracle jar and also interpreting part of the "-cp" argument as a classname instead of part of the classpath.
About | Sitemap | Contact