cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal report java error on LINUX JDK 17

0 Kudos
1,318

Hi, We are trying to use JDK 17 and LINUX, however get error when we try to generate crystal report as PDF

In windows it works fine.

com.businessobjects.reports.sdk.JRCCommunicationAdapter - detected an exception: Cannot invoke "java.awt.font.OpenType.getFontTable(int)" because "<parameter1>" is null

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.opentype.tables.OS2Table.<init>(SourceFile:108)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.if(SourceFile:116)

at com.crystaldecisions.reports.exporters.format.page.pdf.fontembedding.FontEmbeddingSession.a(SourceFile:104)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.if(SourceFile:594)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.r.a(SourceFile:424)

at com.crystaldecisions.reports.exporters.format.page.pdf.pdflib.PdfDocumentManager.a(SourceFile:337)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:1584)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:1492)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:780)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:729)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.a(SourceFile:683)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.a.if(SourceFile:633)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:1951)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:447)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.byte(SourceFile:323)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.d.a(SourceFile:303)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.b.a(SourceFile:217)

at com.crystaldecisions.reports.exporters.format.page.pdf.dom.PdfAdvancedDocumentModeller.a(SourceFile:177)

at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.a(SourceFile:252)

at com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter.processFormattedContent(SourceFile:200)

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:105)

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:253)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:647)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:597)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:641)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:677)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:526)

at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)

at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

at com.crystaldecisions.sdk.occa.report.application.dt.a(SourceFile:186)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(SourceFile:286)

at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(SourceFile:209)

at milestonegroup.pcontrol.server.reporting.CrystalReportGenerator.generateAndSaveReport(CrystalReportGenerator.java:269)

dfarina
Explorer
0 Kudos

Ran into this and the fix is very similar to the one we needed in OpenJDK 8 where literally any font had to be in the lib/font directory, but not Lucida Sans.

Accepted Solutions (0)

Answers (2)

Answers (2)

sgessner
Explorer
0 Kudos

You can solve the error by linking the missing fonts to your jdk/lib or jre/lib with the following command.

For me the dejavu fonts where missing.

ln -s /usr/share/fonts/truetype/dejavu ${JAVA_HOME}/jre/lib/fonts
0 Kudos

Looks like we would need to install font or copy fonts from older jre/lib to jdk/lib to get this working