Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NullPointerException when running Crystal reports with SP24 for Eclipse

We are trying to upgrade to SP24 of Crystal Report for Eclipse but have found that several of our reports are failing with a NullPointerException when generating the report. I've included the stack trace below - does anyone have any idea what may be wrong or have any workarounds, please?

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)
...
like image 294
Chaitra Avatar asked Oct 19 '25 13:10

Chaitra


1 Answers

Just in case someone else is running into the same problem here.

Problem is: Newer JDK versions are not shipped with a lib/fonts folder which the Crystal Report engine expects.

A somewhat unsatisfying, but working solution is:

  1. Create a fonts folder -> %JAVA_HOME%/lib/fonts
  2. Copy fonts from 'Windows\Fonts' into %JAVA_HOME%/lib/fonts.

Problem should be solved then.

like image 105
ShadowGames Avatar answered Oct 21 '25 01:10

ShadowGames