错误当java在tomcat8上运行birt报告时,不能启动OSGiPlatform

nx7onnlm  于 2021-09-29  发布在  Java
关注(0)|答案(0)|浏览(262)

我启动了一个spring boot项目,并希望在此项目中生成birt报告。当我在本地使用intellij并运行project时,报告生成成功,但当我生成war文件并使用tomcat8运行project时,出现以下错误:
严重:error.cannotstartuposgiplatform org.eclipse.birt.core.exception.birtexception:error.cannotstartuposgiplatform
这是我的java代码

ByteArrayOutputStream out = new ByteArrayOutputStream();
        IRunAndRenderTask runAndRenderTask = engine.createRunAndRenderTask(report);
        EXCELRenderOption renderOption = new EXCELRenderOption();
        renderOption.setOutputStream(out);
        renderOption.setOutputFormat(fileType);
        runAndRenderTask.setRenderOption(renderOption);
        runAndRenderTask.setParameterValues(values);
        runAndRenderTask.run( );
        out.close( );
        return out.toByteArray();

这是我对maven的依赖

<dependency>
            <groupId>com.innoventsolutions.birt.runtime</groupId>
            <artifactId>org.eclipse.birt.runtime_4.8.0-20180626</artifactId>
            <version>4.8.0</version>
  </dependency>

<dependency>
            <groupId>org.ow2.orchestra.eclipse.birt</groupId>
            <artifactId>org.ow2.orchestra.eclipse.birt.report.engine</artifactId>
            <version>3.7.0</version>
 </dependency>

有解决这个问题的办法吗

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题