有了这段代码,我得到了错误:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/axis/EngineConfiguration
我正在尝试获取有关 Jasper 服务器的报告。(没有足够的关于 Jasper 服务器的文档)。我如何解决它?
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);