How to get a report from jasperserver

Having this code, I get an error message:

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

I am trying to get a report that I have on a Jasper server. (not enough documentation on the Jasper server). How to 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); 
+4
source share
1 answer

To resolve this error, you must add the Jar containing the EngineConfiguration class to the application runtime class.

A search for EngineConfiguration in JarFinder should provide you with a list of likely suspects.

+3
source

Source: https://habr.com/ru/post/1444292/


All Articles