被低估的BIRT报表(五):signer information does not match

时间:2022-12-28 00:01:10

我不得不好好的吐槽下BIRT官方,你们自己发布的产品,不提供MD5校验值就罢了,但你总得保证产品能运行起来吧。

然而实际情况是,直接运行birt.war,报如下错误:

Caused by: java.lang.SecurityException: 
    Invalid signature file digest for Manifest main attributes
    at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:314)
    ... 10 more

好吧,找到org.eclipse.birt.runtime_4.6.0-20160607.jar文件,删除META-INF文件夹里面的ECLIPSE_.RSA、ECLIPSE_.SF,终于启动起来了。

继续带有数据连接的报表,又提示如下错误:

class "org.eclipse.datatools.connectivity.oda.IDriver"'s signer information does not match signer information of other classes in the same package
   at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
... 58 more

满脸的无奈,我真的无法想象,BIRT官方,你们有测试人员吗?

既然是签名的错误,那也好解决,找到org.eclipse.datatools.connectivity.oda_3.5.0.201603142002.jar文件,继续删除里面的ECLIPSE_.RSA、ECLIPSE_.SF文件,终于工作正常了。

在这过程中,切不可为了图方便,直接删除META-INF文件夹,否则又报如下错误:

Error happened while running the report.
   at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2375)
   ……
Caused by: java.lang.NullPointerException
   at org.eclipse.datatools.connectivity.oda.spec.manifest.ResultExtensionExplorer.addAllExtensions(ResultExtensionExplorer.java:541)
   at org.eclipse.datatools.connectivity.oda.spec.manifest.ResultExtensionExplorer.(ResultExtensionExplorer.java:122)
   ... 58 more

莫名奇妙的空指针,你会想到是删除了META-INF文件夹的问题吗?

结论

消除了启动Bug的BIRT,渲染性能还是非常强劲的,在我们的测试中,3500多页的报表,在比较差的机器上(i5 3代),不到一分钟也可以渲染完成。