Skip to content
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

Not implemented yet for GraalVM native images (LCMS.getTagNative(LCMS.java:28)) #2850

Closed
JiriOndrusek opened this issue Sep 15, 2020 · 4 comments
Assignees

Comments

@JiriOndrusek
Copy link

JiriOndrusek commented Sep 15, 2020

Describe the issue
I'm implementing camel-quarkus extension for FOP (apache/camel-quarkus#1642).

I ran into following error using native-image:

Caused by: java.lang.UnsupportedOperationException: Not implemented yet for GraalVM native images
at sun.java2d.cmm.lcms.LCMS.getTagNative(LCMS.java:28)
at sun.java2d.cmm.lcms.LCMSProfile$TagCache.getTag(LCMSProfile.java:70)
at sun.java2d.cmm.lcms.LCMSProfile.getTag(LCMSProfile.java:51)
at sun.java2d.cmm.lcms.LCMS.getTagSize(LCMS.java:88)
at java.awt.color.ICC_Profile.getData(ICC_Profile.java:1355)
at java.awt.color.ICC_Profile.getData(ICC_Profile.java:1343)
at org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil.getICCProfileDescription(ColorProfileUtil.java:46)
at org.apache.fop.pdf.PDFResources.addColorSpace(PDFResources.java:160)
at org.apache.fop.pdf.PDFFactory.makeICCBasedColorSpace(PDFFactory.java:1550)
at org.apache.fop.pdf.PDFICCBasedColorSpace.setupsRGBAsDefaultRGBColorSpace(PDFICCBasedColorSpace.java:116)
at org.apache.fop.render.pdf.PDFRenderingUtil.addsRGBColorSpace(PDFRenderingUtil.java:187)
at org.apache.fop.render.pdf.PDFRenderingUtil.setupPDFDocument(PDFRenderingUtil.java:604)
at org.apache.fop.render.pdf.PDFDocumentHandler.startDocument(PDFDocumentHandler.java:159)
at org.apache.fop.render.intermediate.util.IFDocumentHandlerProxy.startDocument(IFDocumentHandlerProxy.java:105)
at org.apache.fop.render.intermediate.IFRenderer.startRenderer(IFRenderer.java:263)
at org.apache.fop.area.RenderPagesModel.(RenderPagesModel.java:81)
at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
at org.apache.fop.area.AreaTreeHandler.(AreaTreeHandler.java:105)
at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:363)
at org.apache.fop.fo.FOTreeBuilder.(FOTreeBuilder.java:107)
at org.apache.fop.apps.Fop.createDefaultHandl

Steps to reproduce the issue

There are two possible ways:

  1. Once issue FOP native support apache/camel-quarkus#1642 is solved. You can use integration test in camel-quarkus fop extension - https://github.com/apache/camel-quarkus/blob/master/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java
    To make test fail with the reported issues, you have to change value in substitution to false (https://github.com/apache/camel-quarkus/blob/master/extensions/fop/runtime/src/main/java/org/apache/camel/quarkus/component/fop/PDFRendererOptionsConfigSubstitution.java#L29)
  2. If mentioned issue is not closed yet. You can use my branch https://github.com/JiriOndrusek/camel-quarkus/tree/1642-FOP-native-reproducer-for-graal (there is no need to disable substitution) and execute test https://github.com/JiriOndrusek/camel-quarkus/blob/1642-FOP-native-reproducer-for-graal/integration-tests/fop/src/test/java/org/apache/camel/quarkus/component/fop/it/FopTest.java.

For both cases you can use command mvn clean verify -Pnative -f integration-tests/fop/ to run test in native mode.

@fernando-valdez
Copy link
Member

Hello @JiriOndrusek, I will take a look at this issue.
Thanks for reporting it.

@JiriOndrusek
Copy link
Author

JiriOndrusek commented Sep 15, 2020

@fernando-valdez thanks for looking at it.
In case you need some help (to verify, ...), please add comment for me.


For reproducing you can use also changes from this PR - apache/camel-quarkus#1793 + you have to change value in substitution to false

@cstancu
Copy link
Member

cstancu commented Sep 23, 2020

@JiriOndrusek that doesn't seem to be a GraalVM bug. The error message seems to come from Quarkus https://github.com/quarkusio/quarkus/pull/3246/files to work around AWT limitations.

@JiriOndrusek
Copy link
Author

Thanks @cstancu , I've reported this missing feature to quarkus: quarkusio/quarkus#12393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants