Jump to content
We've recently updated our Privacy Statement, available here ×

ClassNotFoundException


nijinpp

Recommended Posts

i am new to jasper report i'm trying to convert a jasper file to pdf using java...the ide is netbeans..while running the output error shows as

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    at net.sf.jasperreports.engine.util.JRLoader.<clinit>(JRLoader.java:61)
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:243)
    at JasperTest.main(JasperTest.java:19)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

please do help me....

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Lots of great ways to see why something isn't being put onto your classpath during runtime.  First off, open the jar that you downloaded with a zip program and follow it's class structure to make sure that it has the class from your NoClassDefFoundError message.  Then, after adding it to your runtime class path see this link:

http://www.exampledepot.com/egs/java.lang/ClassOrigin.html

Using "java -verbose" you should hopefully see if it's picking up the class from that jar or not.  Good luck.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...