我正在尝试使用带有 mongodb 的 java 中的 pentaho 生成报告。
我的代码是
try {
ClassLoader classloader = this.getClass().getClassLoader();
URL reportDefinitionURL =
classloader.getResource("reports/TestSalesOrderReportOuputValues.prpt");
ResourceManager resourceManager = new ResourceManager();
resourceManager.registerDefaults();
Resource directly = resourceManager.createDirectly(
reportDefinitionURL, MasterReport.class);
return (MasterReport) directly.getResource();
} catch (ResourceException e) {
e.printStackTrace();
}
越来越像,
org.pentaho.reporting.libraries.resourceloader.ResourceCreationException: Unable to parse the document: ResourceKey{schema=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader, identifier=content.xml, factoryParameters={org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository}=org.pentaho.reporting.libraries.repository.zipreader.ZipReadRepository@854e63b, org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository-loader}=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader@638a3572}, parent=ResourceKey{schema=org.pentaho.reporting.libraries.resourceloader.loader.URLResourceLoader, identifier=file:/D:/java_works/nirvahak-wrokspace/samples/sample-erp/target/classes/reports/manogoTestVenu.prpt, factoryParameters={}, parent=null}}
请任何人都可以帮助我。