Some common errors in Jasper report: SEVERE: Digester.getParser and JRException: Error compiling report java source files

I’ve followed a tutorial on how to use Jasper report in Netbeans IDE at

However, I encountered the following problems.

(Please note that when I refer to jasperreport library, I mean my customized library that contains a number of jar files that are necessary to compile and run jasperreport. You can name the library whatever you’d like to.



Feb 15, 2008 4:23:50 PM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
javax.xml.parsers.ParserConfigurationException: XML document validation is not supported
at com.bluecast.xml.JAXPSAXParserFactory.newSAXParser(


I am not sure if I understand it correctly. After several goolging attempts, I’ve found that it’s because there are more than one xml parser libraries in the library path of the project running Jasper. As a result, Jasper report uses the wrong xerces.jar path.

From my understanding is that:

  • A project contains several tasks relating to XML documents such as parsing text from XML documents and creating Jasper report.
  • Developer of the project add other xml parser libraries in addition to the Jasper report library into the project library class path. For example, the developer adds piccolo.jar and jasperreports–version–.jar and other commons jar libraries.
  • The problem is that instead of using its own xerces library, the Jasper report uses xerces of the piccolo.jar library. (It may not be correct, but the idea is Jasper uses the wrong library).
  • As a results, when executing the program, the error above is generated.


The solution to this error is that we need to put jasperreports library in front of piccolo library in the project library class path. To do this in Netbeans IDE 6.0.1, perform the following steps.

  1. Right click on the project name in the project window
  2. Click on Properties
  3. Click on Libraries
  4. We will see that the jasper library is below piccolo library.
  5. To fix the error, click on Jasper library and click “Move up” to move the Jasper library to be above other xml parser libraries such as “Piccolo” or “Jdom”.
  6. Close the project library window, click Run again on the Netbeans IDE.


After I fixed the ERROR#1 above, I get this error#2. The cause of this error is that it requires jdt-compiler–version–.jar library. This library can be found in the “lib” directory under the jasperreports-project.tar.gz.


net.sf.jasperreports.engine.JRException: Error compiling report java source files : /
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(




To fix this error, we will add jdt-compiler-version.jar into the jasper library in the Netbeans IDE. Follow the steps below.

  1. On the Netbeans IDE, Tools–>Libraries
  2. Click on “Jasper” on the Libraries window. (Note that “Jasper” is the name of Jasper library that contains jasperreports.jar and other commons-.jar libraries. The name of this library can be arbitrary, depending on developer.)
  3. Then, click “Add Jar”
  4. Browse the where the jdt-compiler-version.jar is, and add it to the “Jasper” library.
  5. Close the library window, and run the program again.

Now, the Jasper report should be generated successfully.

ERROR #3: I receive another error when I try to generate pdf document using:


jasperPrint, reportDest);


SOLUTION TO ERROR #3: If anyone gets an error when running jasperreports for generating pdf file, to fix this error you have to add itext.jar library to the Jasper library.

Just for a reference, libraries that I’ve added to the Jasper library are:

  • commons-beanutils-1.7.jar
  • commons-collections-2.1.jar
  • commons-digester.jar
  • commons-javaflow-20060411.jar
  • commons-logging-2.0.1.jar
  • jdt-compiler-3.1.1.jar
  • jasperreports-2.04.jar
  • xercesImpl.jar (This library is required for fixing ERROR#1)
  • itext-1.3.1.jar (for printing pdf)
This entry was posted in Java. Bookmark the permalink.

9 Responses to Some common errors in Jasper report: SEVERE: Digester.getParser and JRException: Error compiling report java source files


    Thanks for suggetion.

  2. tony yan says:

    great job,dear friend. i also confused by the tutorial, it created long long ago…..

  3. vinoth kumar says: Unable to create JAXBContext due to the security restriction

    i’m getting this error when i’m compile my servlet program which is going to connect into jasper report.

    can u plz give me the suggestions to overcome this error

  4. qwanto says:


    Followed the exact same tutorial, and ran into ERROR#2.

  5. farisi says:

    great article, thanks

  6. sanjay says:

    Thanks buddy ! You made my day …

  7. Shirish says:

    Hey thanks for your valuable comments

  8. Steve says:

    Thanks man you put a smile on my face ūüėÄ

  9. SUPREETH says:

    Error¬†filling¬†print…¬†Error¬†evaluating¬†expression¬†:¬† ¬†¬†¬†¬†Source¬†text¬†:¬†$F{END_TIME}
    net.sf.jasperreports.engine.fill.JRExpressionEvalException:¬†Error¬†evaluating¬†expression¬†:¬† ¬†¬†¬†¬†Source¬†text¬†:¬†$F{END_TIME}¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JREvaluator.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRCalculator.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRCalculator.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFillElement.evaluateExpression(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFillBand.evaluate(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRBaseFiller.fill(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRBaseFiller.fill(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JRFiller.fillReport(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.JasperFillManager.fillReport(¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.JasperFillManager.fillReport(¬† ¬†¬†¬†¬†at¬†¬† ¬†¬†¬†¬†at¬†org.openide.util.RequestProcessor$¬† ¬†¬†¬†¬†at¬†org.openide.util.RequestProcessor$¬† Caused¬†by:¬†org.codehaus.groovy.runtime.typehandling.GroovyCastException:¬†Cannot¬†cast¬†object¬†‘oracle.sql.TIMESTAMP@16cb856’¬†with¬†class¬†‘oracle.sql.TIMESTAMP’¬†to¬†class¬†‘oracle.sql.TIMESTAMP’¬† ¬†¬†¬†¬†at¬†org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(¬† ¬†¬†¬†¬†at¬†org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(¬† ¬†¬†¬†¬†at¬†Reconciliation_execution_status_Report_1318485205281_751615.evaluate(calculator_Reconciliation_execution_status_Report_1318485205281_751615:179)¬† ¬†¬†¬†¬†at¬†net.sf.jasperreports.engine.fill.JREvaluator.evaluate(¬† ¬†¬†¬†¬†…¬†19¬†more¬†


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s