0

I'm having trouble to load a report through a button.This is my code.When I click the button it shows the down image error.

try {
 InputStream in =
 getClass().getResourceAsStream("C:/Users/RaMiNdU/Documents/NetBeansProjects/TimeTable
 Generator/src/timetable/generator/sem1.jrxml");
 JasperDesign jasperDesign = JRXmlLoader.load(in);
 Map<String, Object> param = new HashMap<>();
 JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
 JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, param );
 JasperViewer.viewReport(jasperPrint, false);
 } catch (Exception e) {
    System.out.println(e.getMessage());
 }

This is the error message which is displaying ..when I click the button

4

2 回答 2

0

add commons-digester.jar to your classpath and you should be through

于 2013-03-30T05:56:37.097 回答
0
  • commons-digester is not available in the Classpath.
  • Any start-up script is overriding Classpath environment variable.
  • Check for java.lang.ExceptionInInitializerError in your log file. NoClassDefFoundError due to failure of static initialization is quite common.
  • Your class may not be visible while using multiple class loaders.
于 2013-03-30T06:18:26.077 回答