-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.ClassCastException error when running render task to "postscript" format #1010
Comments
During reflective access to the "trueTypeFonts" field of "FontFactoryImpl" the type "Properties" was assumed, but the type has changed to "HashMap" in OpenPDF. Stopped using reflective access to the field since there are now API to access the content of "trueTypeFonts".
During reflective access to the "trueTypeFonts" field of "FontFactoryImpl" the type "Properties" was assumed, but the type has changed to "HashMap" in OpenPDF. Stopped using reflective access to the field since there are now API to access the content of "trueTypeFonts".
I was a bit fast to merge this change. @ivkina , can you test this build (https://github.com/eclipse/birt/actions/runs/2710745400) when it is done and see if it solves your problem? |
Hi Claes,
Could you please advise how can I test the fix? I am not very familiar with github “test build” methodology. Should just grab some birt runtime jar file and try it? Please, advise.
Thank you,
Aleksey
From: Claes Rosell ***@***.***>
Sent: Thursday, July 21, 2022 5:30 AM
To: eclipse/birt ***@***.***>
Cc: Aleksey Ivkin ***@***.***>; Mention ***@***.***>
Subject: [External] Re: [eclipse/birt] java.lang.ClassCastException error when running render task to "postscript" format (Issue #1010)
I was a bit fast to merge this change. @ivkina<https://urldefense.com/v3/__https:/github.com/ivkina__;!!Ofz1Xjg!7cTaO6Uz0TT1weU8-oLqoqAE_CYAULZ4o3AeCrp8cYafAVIIFLqb8GE5_xnvFOUF3mzCuinw14y43js5lGATEKevIwg$> , can you test this build (https://github.com/eclipse/birt/actions/runs/2710745400<https://urldefense.com/v3/__https:/github.com/eclipse/birt/actions/runs/2710745400__;!!Ofz1Xjg!7cTaO6Uz0TT1weU8-oLqoqAE_CYAULZ4o3AeCrp8cYafAVIIFLqb8GE5_xnvFOUF3mzCuinw14y43js5lGATcMW9yuw$>) when it is done and see if it solves your problem?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/eclipse/birt/issues/1010*issuecomment-1191260306__;Iw!!Ofz1Xjg!7cTaO6Uz0TT1weU8-oLqoqAE_CYAULZ4o3AeCrp8cYafAVIIFLqb8GE5_xnvFOUF3mzCuinw14y43js5lGATlRzM4QE$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AEHS2GPKUI7K6SOWDOMHT3TVVEKAFANCNFSM53LKVV6Q__;!!Ofz1Xjg!7cTaO6Uz0TT1weU8-oLqoqAE_CYAULZ4o3AeCrp8cYafAVIIFLqb8GE5_xnvFOUF3mzCuinw14y43js5lGATumrbY_c$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
This e-mail and any attachments are intended only for the named recipient(s) and may contain information that is legally privileged, confidential, or exempt from disclosure under applicable law. This message may be logged for archival purposes, may be reviewed by parties at Deltek<http://www.deltek.com/> other than those named in the message header, and may not necessarily constitute an official representation of Deltek<http://www.deltek.com/>. If you have received this message in error, or are not the named recipient(s), you may not retain copy or use this e-mail or any attachment for any purpose or disclose all or any part of the contents to any other person. Any such dissemination, distribution or copying of this e-mail or its attachments is strictly prohibited. Please immediately notify the sender and permanently delete this e-mail and any attachment from your computer.
You are responsible for complying with all applicable data protection, import, re-import, export, and re-export control laws, including any applicable license requirements, and country-specific sanctions programs. Without limiting the foregoing, you are solely responsible for compliance related to the information you send, via email, to Deltek, its employees, or agents. Please contact ***@***.*** with any questions or concerns.
|
How are you currently consuming Birt? |
We have BIRT engine runtime deployed as a set of jars in weblogic application container as part of our own web app deployment.
It is a set of BIRT report engine api jars ( like 90+ jars or so). It we can get the fixed jar it would be great. We will just replace it and give it a try.
Thanks,
Aleksey
…________________________________
From: Claes Rosell ***@***.***>
Sent: Thursday, July 21, 2022 8:21 AM
To: eclipse/birt ***@***.***>
Cc: Aleksey Ivkin ***@***.***>; Mention ***@***.***>
Subject: [External] Re: [eclipse/birt] java.lang.ClassCastException error when running render task to "postscript" format (Issue #1010)
How are you currently consuming Birt?
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/eclipse/birt/issues/1010*issuecomment-1191417514__;Iw!!Ofz1Xjg!_rqoRLbFlnbaqQu6W_9OUnnb62hVcNs9a4f_N_quwWErnpFrTgEF1V_fuIxrjUrIqoulduZOUTvFw3mKheLoC1ghTlk$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AEHS2GJSLRG3C264UH57DEDVVE6GNANCNFSM53LKVV6Q__;!!Ofz1Xjg!_rqoRLbFlnbaqQu6W_9OUnnb62hVcNs9a4f_N_quwWErnpFrTgEF1V_fuIxrjUrIqoulduZOUTvFw3mKheLoR_oHHg4$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
This e-mail and any attachments are intended only for the named recipient(s) and may contain information that is legally privileged, confidential, or exempt from disclosure under applicable law. This message may be logged for archival purposes, may be reviewed by parties at Deltek<http://www.deltek.com/> other than those named in the message header, and may not necessarily constitute an official representation of Deltek<http://www.deltek.com/>. If you have received this message in error, or are not the named recipient(s), you may not retain copy or use this e-mail or any attachment for any purpose or disclose all or any part of the contents to any other person. Any such dissemination, distribution or copying of this e-mail or its attachments is strictly prohibited. Please immediately notify the sender and permanently delete this e-mail and any attachment from your computer.
You are responsible for complying with all applicable data protection, import, re-import, export, and re-export control laws, including any applicable license requirements, and country-specific sanctions programs. Without limiting the foregoing, you are solely responsible for compliance related to the information you send, via email, to Deltek, its employees, or agents. Please contact ***@***.*** with any questions or concerns.
|
Just to confirm that we use already pre-built BIRT Runtime (ReportEngine API) jars that come with each release:
***@***.***
***@***.***
From: Aleksey Ivkin ***@***.******@***.***>
Sent: Thursday, July 21, 2022 8:32 AM
To: Claes Rosell ***@***.***>; eclipse/birt ***@***.***>; eclipse/birt ***@***.***>
Cc: Mention ***@***.***>
Subject: Re: [External] Re: [eclipse/birt] java.lang.ClassCastException error when running render task to "postscript" format (Issue #1010)
We have BIRT engine runtime deployed as a set of jars in weblogic application container as part of our own web app deployment.
It is a set of BIRT report engine api jars ( like 90+ jars or so). It we can get the fixed jar it would be great. We will just replace it and give it a try.
Thanks,
Aleksey
…________________________________
From: Claes Rosell ***@***.******@***.***>>
Sent: Thursday, July 21, 2022 8:21 AM
To: eclipse/birt ***@***.******@***.***>>
Cc: Aleksey Ivkin ***@***.******@***.***>>; Mention ***@***.******@***.***>>
Subject: [External] Re: [eclipse/birt] java.lang.ClassCastException error when running render task to "postscript" format (Issue #1010)
How are you currently consuming Birt?
-
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/eclipse/birt/issues/1010*issuecomment-1191417514__;Iw!!Ofz1Xjg!_rqoRLbFlnbaqQu6W_9OUnnb62hVcNs9a4f_N_quwWErnpFrTgEF1V_fuIxrjUrIqoulduZOUTvFw3mKheLoC1ghTlk$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AEHS2GJSLRG3C264UH57DEDVVE6GNANCNFSM53LKVV6Q__;!!Ofz1Xjg!_rqoRLbFlnbaqQu6W_9OUnnb62hVcNs9a4f_N_quwWErnpFrTgEF1V_fuIxrjUrIqoulduZOUTvFw3mKheLoR_oHHg4$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
This e-mail and any attachments are intended only for the named recipient(s) and may contain information that is legally privileged, confidential, or exempt from disclosure under applicable law. This message may be logged for archival purposes, may be reviewed by parties at Deltek<http://www.deltek.com/> other than those named in the message header, and may not necessarily constitute an official representation of Deltek<http://www.deltek.com/>. If you have received this message in error, or are not the named recipient(s), you may not retain copy or use this e-mail or any attachment for any purpose or disclose all or any part of the contents to any other person. Any such dissemination, distribution or copying of this e-mail or its attachments is strictly prohibited. Please immediately notify the sender and permanently delete this e-mail and any attachment from your computer.
You are responsible for complying with all applicable data protection, import, re-import, export, and re-export control laws, including any applicable license requirements, and country-specific sanctions programs. Without limiting the foregoing, you are solely responsible for compliance related to the information you send, via email, to Deltek, its employees, or agents. Please contact ***@***.*** with any questions or concerns.
|
Aleksey, please try to avoid copying the previous message when you reply by email. If you are using the BIRT report engine jars, then you can find them generated automatically from Claes' PR. |
Got it, Thanks for the fix! It is working now for postscript. How should we consume the fix? Just take all the jars from birt-runtime artifact here or will it be there some kind of an "official" release to download? Sorry for many questions and thanks again, |
Next official release will be 4.10. I think that we aim to release 4.10 in alignment to 2022-09, but I really do not know. |
Thanks for this update! Will take the fix for now and then upgrade to 4.10. |
Happens with any report using latest BIRT runtime. It never happened with previous version of BIRT. We are using postscript in some cases when we print reports to a printer and need to tweak print options like collate, number of copies, scale, etc.
Here the simple task render code that fails:
IReportEngine engine = ...;
IReportDocument roiDoc = engine.openReportDocument("//.../file.rptdocument");
IRenderTask task = engine.createRenderTask(roiDoc);
task.setPageNumber(1);
IPostscriptRenderOption options = new PostscriptRenderOption();
options.setOutputFormat("postscript");
options.setPostscriptLevel(3);
options.setAutoPaperSizeSelection(true);
options.setCopies(2);
OutputStream stream = new ByteArrayOutputStream();
task.getRenderOption().setOutputStream(stream);
task.render();
Getting the error below on task.render() call - please, see stack trace.
Thanks,
Aleksey
Jul 12, 2022 10:09:19 AM org.eclipse.birt.report.engine.api.impl.EngineTask handleFatalExceptions
SEVERE: An error happened while running the report. Cause:
java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.util.Properties (java.util.HashMap and java.util.Properties are in module java.base of loader 'bootstrap')
at org.eclipse.birt.report.engine.emitter.postscript.PostscriptWriter.getFontPath(PostscriptWriter.java:741)
at org.eclipse.birt.report.engine.emitter.postscript.PostscriptWriter.applyFont(PostscriptWriter.java:682)
at org.eclipse.birt.report.engine.emitter.postscript.PostscriptWriter.drawString(PostscriptWriter.java:538)
at org.eclipse.birt.report.engine.emitter.postscript.device.PostscriptPage.drawText(PostscriptPage.java:77)
at org.eclipse.birt.report.engine.layout.emitter.AbstractPage.drawText(AbstractPage.java:97)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.drawTextAt(PageDeviceRender.java:703)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.drawText(PageDeviceRender.java:696)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitText(PageDeviceRender.java:142)
at org.eclipse.birt.report.engine.nLayout.area.impl.TextArea.accept(TextArea.java:211)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:167)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:167)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:167)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:167)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:167)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitChildren(PageDeviceRender.java:176)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.addPage(PageDeviceRender.java:435)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitPage(PageDeviceRender.java:405)
at org.eclipse.birt.report.engine.layout.emitter.PageDeviceRender.visitContainer(PageDeviceRender.java:164)
at org.eclipse.birt.report.engine.nLayout.area.impl.ContainerArea.accept(ContainerArea.java:244)
at org.eclipse.birt.report.engine.layout.emitter.PageEmitter.startPage(PageEmitter.java:50)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.outputPage(LayoutEngine.java:730)
at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.outputPage(PageArea.java:555)
at org.eclipse.birt.report.engine.nLayout.area.impl.PageArea.close(PageArea.java:539)
at org.eclipse.birt.report.engine.nLayout.area.impl.RootArea.close(RootArea.java:192)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.closeContainer(LayoutEngine.java:301)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine._endContainer(LayoutEngine.java:378)
at org.eclipse.birt.report.engine.nLayout.LayoutEngine.endContainer(LayoutEngine.java:290)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter.endPage(ContentEmitterAdapter.java:72)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.endContent(ContentEmitterUtil.java:98)
at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageBuffer.endContainer(DummyPageBuffer.java:58)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.end(HTMLPageLM.java:167)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:97)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:97)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:547)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:273)
at com.deltek.enterprise.system.reporting.birt.engine.BirtNativeConnectionImpl.renderReportPostScript(BirtNativeConnectionImpl.java:1895)
at com.deltek.enterprise.system.reporting.birt.engine.BirtNativeConnectionImpl.getReportData(BirtNativeConnectionImpl.java:447)
at com.deltek.enterprise.system.reporting.birt.engine.BirtNativeConnectionImpl.print(BirtNativeConnectionImpl.java:385)
at com.deltek.enterprise.system.reporting.birt.engine.BirtConnectionImpl.print(BirtConnectionImpl.java:253)
at com.deltek.enterprise.system.reporting.birt.handlers.BirtPrintRequestHandler.print(BirtPrintRequestHandler.java:219)
at com.deltek.enterprise.system.reporting.birt.handlers.BirtPrintRequestHandler.handleRequest(BirtPrintRequestHandler.java:66)
at com.deltek.enterprise.system.reporting.handlers.RequestHandlerChain.handleRequest(RequestHandlerChain.java:38)
at com.deltek.enterprise.system.reporting.birt.application.BirtAppReportRuntime.startRpt(BirtAppReportRuntime.java:204)
at com.deltek.enterprise.system.reporting.birt.application.BirtAppReportRuntime.run(BirtAppReportRuntime.java:82)
at com.deltek.enterprise.system.appmanagement.ReportDispatcher.run(ReportDispatcher.java:328)
at com.deltek.enterprise.system.appmanagement.AppResultSet.doProcessReport(AppResultSet.java:2698)
at com.deltek.enterprise.system.appmanagement.AppResultSet.dispatcherMain(AppResultSet.java:498)
at com.deltek.enterprise.system.appmanagement.AppResultSet.dispatcher(AppResultSet.java:346)
at com.deltek.enterprise.system.appmanagement.Application.dispatcher(Application.java:466)
at com.deltek.enterprise.system.appmanagement.MasterServer.dispatcher(MasterServer.java:798)
at com.deltek.enterprise.system.serverapi.serverapiimpl.masterbean.MasterEJB.dispatcher(MasterEJB.java:34)
at com.deltek.enterprise.system.serverapi.serverapiimpl.masterbean.Master_k2sks9_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invokeInternal(SessionRemoteMethodInvoker.java:54)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:21)
at com.deltek.enterprise.system.serverapi.serverapiimpl.masterbean.Master_k2sks9_EOImpl.dispatcher(Unknown Source)
at com.deltek.enterprise.system.servlets.masterservlet.MasterServlet.service(MasterServlet.java:392)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:250)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3862)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3829)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.WebAppServletContext.processSecuredExecute(WebAppServletContext.java:2502)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2351)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2326)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2304)
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1779)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1733)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:651)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
The text was updated successfully, but these errors were encountered: