4

Having this code I get the error:

Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/axis/EngineConfiguration 

I am trying to get a report I have on the Jasper server. (not enough documentation regarding Jasper server). How do I fix it?

    JServer server = new JServer();
    server.setUrl("http://localhost:8080/jasperserver/services/repository");
    server.setUsername("jasperadmin");
    server.setPassword("jasperadmin");
    WSClient client = new WSClient(server);

    ResourceDescriptor resourceDescriptor = new ResourceDescriptor();
    resourceDescriptor.setUriString ("/reports/samples/AllAccounts");
  Map<String, Object> parameterMap = new HashMap<String, Object>();
   parameterMap.put("MY_PARAMETER_NAME", "myparametervalue");
    JasperPrint printer = client.runReport(resourceDescriptor, parameterMap);
    JasperViewer.viewReport(printer, false, Locale.ENGLISH);
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Meesh
  • 508
  • 1
  • 5
  • 17

1 Answers1

3

To solve the error, it will be necessary to add the Jar containing the EngineConfiguration class to the run-time class-path of the app.

Searching for EngineConfiguration at JarFinder should give you a list of likely suspects.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433