java 使用SP24 for Eclipse运行Crystal报表时出现NullPointerException异常

jhkqcmku  于 2022-12-17  发布在  Java
关注(0)|答案(2)|浏览(174)

我们正在尝试将Crystal Report for Eclipse升级到SP24,但发现我们的几个报告在生成报告时失败,并出现NullPointerException。我在下面包含了堆栈跟踪-有人知道可能是什么问题吗?或者有任何解决方法吗?

Changing Main Report Table Connection Info
Changing Sub Report Table Connection Info
Setting Parameters of Main Reports
Starting Verify database
Completed Verify database
Setting Parameters of Sub Reports
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:238)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:148)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:129)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:112)
    at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpJRCExportReport.runReportExport(RpJRCExportReport.java:742)
    at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.process(RpScheduleReportRun.java:177)
    at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.drive(RpScheduleReportRun.java:263)
    at us.nm.state.hsd.aspen.business.batch.rp.crystal.RpScheduleReportRun.main(RpScheduleReportRun.java:286)
Caused by: java.lang.NullPointerException
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.d.a(SourceFile:154)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:332)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:250)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(SourceFile:922)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(SourceFile:784)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.f.e(SourceFile:383)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(SourceFile:242)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)
...
ufj5ltwl

ufj5ltwl1#

以防有人在这里遇到同样的问题。
问题是:较新的JDK版本没有附带Crystal Report引擎所需的lib/fonts文件夹。
一个不太令人满意但可行的解决方案是:
1.创建字体文件夹-〉%JAVA_HOME%/lib/fonts
1.将字体从“Windows\Fonts”复制到%JAVA_HOME%/lib/fonts。
那问题就解决了。

t3psigkw

t3psigkw2#

我遇到了同样的问题,将jre/lib/fonts文件夹从Java8复制到Java 11 -jdk/lib/fonts解决了这个问题。

相关问题