Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
When I try to run a jar file in my ubuntu machine I Got an Exception as:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory<br />
        at com.amazonaws.util.VersionInfoUtils.<clinit>(VersionInfoUtils.java:41)<br />
        at com.amazonaws.ClientConfiguration.<clinit>(ClientConfiguration.java:31)<br />
        at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.<init>(AmazonSimpleEmailServiceClient.java:129)<br />
        at SendTextHtml.main(SendTextHtml.java:33)<br />
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory<br />
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)<br />
        at java.security.AccessController.doPrivileged(Native Method)<br />
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)<br />
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)<br />
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)<br />
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)<br />
        ... 4 more


What to do?
Posted
Updated 28-Jan-13 22:05pm
v3

You have to put the necessary jar file in your application classpath.In this case commons-logging.jar
 
Share this answer
 
run the jar by mentioning the path of the dependent jars using --classpath argument
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900