org.pentaho.reporting.libraries.resourceloader.ResourceCreationException:无法解析文档。

时间:2013-08-09 10:28:41

标签: java mongodb pentaho

我正在尝试使用带有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}}

请任何人帮助我。

1 个答案:

答案 0 :(得分:0)

当经典引擎未正确启动时,可能会抛出此异常。首先启动经典引擎。

  

ClassicEngineBoot.getInstance()开始();