Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

jasper reports gets NoClassDefFoundError

Posted on 2014-03-04
2
Medium Priority
?
1,800 Views
Last Modified: 2014-03-04
I get the following error.  I know it is likely a missing jar file, but I have all of the listed prerequisites.  Here are the details:

java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule
      at net.sf.jasperreports.components.ComponentsExtensionsRegistryFactory.<clinit>(ComponentsExtensionsRegistryFactory.java:110)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:247)
      at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForRealName(JRClassLoader.java:157)
      at net.sf.jasperreports.engine.util.JRClassLoader.loadClassForName(JRClassLoader.java:115)
      at net.sf.jasperreports.engine.util.ClassUtils.instantiateClass(ClassUtils.java:53)
      at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.instantiateRegistry(DefaultExtensionsRegistry.java:237)
      at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:214)
      at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.loadRegistries(DefaultExtensionsRegistry.java:162)
      at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getRegistries(DefaultExtensionsRegistry.java:133)
      at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:105)
      at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83)
      at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:123)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
      at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
      at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179)
      at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:108)
      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
      at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:569)
      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:915)
      at ca.specialtysoftware.jpar.reports.ReportFileIO.fillReport(ReportFileIO.java:147)
      at ca.specialtysoftware.jpar.reports.ReportFileIO.saveJasperPrint(ReportFileIO.java:95)
      at ca.specialtysoftware.jpar.reports.ReportFileIO.saveJasperPrint(ReportFileIO.java:79)
      at ca.specialtysoftware.jpar.business.tasks.BuildClaimsDetailTask.doInBackground(BuildClaimsDetailTask.java:131)
      at javax.swing.SwingWorker$1.call(SwingWorker.java:278)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at javax.swing.SwingWorker.run(SwingWorker.java:317)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)


Here are the class libraries that I have included in my project:
JAXP_150.jar
commons-beanutils-1.9.1.jar
commons-collections-2.1.1.jar
commons-logging-1.1.1.jar
commons-javaflow-1209105.jar
commons-digester3-3.2.jar
commons-codec-1.5.jar
itext-2.1.3.jar
poi-3.2-FINAL.jar
jfreechart-1.0.7.jar
jxl-2.6.12.jar
jasperreports-5.5.1.jar
jasperreports-applet-5.5.1.jar
jasperreports-font-5.5.1.jar
jasperreports-javaflow-5.5.1.jar
servlet-api-2.4.jar

These other jar files that should be unrelated are there as well
toplink-essentials-agent.jar
RelativeLayout.jar
xercesImpl-2.9.1.jar
MySQL-connector-java-5.1.6-bin.jar
ostermillerutils_1_07_00.jar


This is jasperreports 5.5.1 obviously.  If anyone has it working for a stand-alone java program and can compare my situation with their working one, I would appreciate it.
0
Comment
Question by:geekdad1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
geekdad1 earned 0 total points
ID: 39904838
Solved it.  When you download apache commons digester library make sure that you do not get the (most recent) digester3 version, get the digester-2.1 version.  They are not the same.
0
 
LVL 1

Author Closing Comment

by:geekdad1
ID: 39904842
I hate giving myself the points, but I did solve it, and I think this should be posted since other developers seem to have similar problems with jasperreports.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

671 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question