Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using jar file hits Exception in thread "main" java.lang.NoClassDefFoundErr

hjz1321Aug 30 2010 — edited Aug 31 2010
I am using jdeveloper to deploy client side jdbc app to a jar file, however, I got following error while running java -classpath .:classes12.jar -jar myjarfile.jar

Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/pool/OracleDataSource

I have been scratching my head trying to set -classpath to different format but no luck, same error each time. So I tried to deploy only class files(only two classes totally) directly and it works

java -classpath .:classes12.jar myclassfile

So this implies that it's nothing to do with -classpath command line setting, it's more of somewhere not correct in the deployed jar file. Is there anyway in deploy profile or project property that I need to set in order to make the jar file correct?

on project property window, under libraries and classpath, i tried to check and uncheck Export box next to Oracle JDBC entry under classpath Entries list, no luck either way.


Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2010
Added on Aug 30 2010
1 comment
787 views