JavaでPentahoの.prptレポートファイルからPDFを生成しようとしています。 issuesの数の後、私はこの問題に達した:ここJavaでのPentaho PDF生成 - 登録されたルートハンドラがありません
SEVERE: Failed:
org.pentaho.reporting.libraries.resourceloader.ResourceCreationException: There are no root-handlers registered for the factory for type class org.pentaho.reporting.engine.classic.core.metadata.parser.ReportPreProcessorMetaDataCollection
at org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:176)
at org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.create(DefaultResourceManagerBackend.java:291)
at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:389)
at org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:353)
at org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:216)
は、私が使用しているコードです:
ClassicEngineBoot.getInstance().start();
final ResourceManager manager = new ResourceManager();
manager.registerDefaults();
final Resource reportResource = manager.createDirectly(getClass().getResource("/reports/test-report.prtp"), MasterReport.class);
final MasterReport masterReport = (MasterReport) reportResource.getResource();
PdfReportUtil.createPDF(masterReport, new ByteArrayOutputStream());
そしてここでは、ポンポンスニペット(Iリポジトリhttp://repository.pentaho.org/artifactory/pentaho/を使用しています)です。
<dependency>
<groupId>pentaho-reporting-engine</groupId>
<artifactId>pentaho-reporting-engine-classic-core</artifactId>
<version>3.8.0-GA</version>
</dependency>
<dependency>
<groupId>pentaho-reporting-engine</groupId>
<artifactId>pentaho-reporting-engine-classic-extensions</artifactId>
<version>3.8.0-GA</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libloader</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libxml</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libserializer</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libformula</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libfonts</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libformat</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>pentaho-library</groupId>
<artifactId>libdocbundle</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
誰でもこれを修正する方法を知っていますか?