nijinpp Posted November 1, 2011 Share Posted November 1, 2011 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 More sharing options...
iamwoodyjones Posted November 1, 2011 Share Posted November 1, 2011 You're missing a few jars on your class path during run time. I think that one is the commons logging jar. Take a look at the jars that come with the jasper distribution to get an idea of jars you need to have during run time.Good luck. Link to comment Share on other sites More sharing options...
nijinpp Posted November 3, 2011 Author Share Posted November 3, 2011 thanks frankhassanabad ...bur after adding the commons logging jar to the classpath i'm still getiing the same error....can u tell me any other reason for that??? Link to comment Share on other sites More sharing options...
iamwoodyjones Posted November 3, 2011 Share Posted November 3, 2011 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.htmlUsing "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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now