You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by "Jiri Ondrusek (Jira)" <ji...@apache.org> on 2020/09/09 14:12:00 UTC

[jira] [Comment Edited] (FOP-2967) Quarkus support of FOP

    [ https://issues.apache.org/jira/browse/FOP-2967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192890#comment-17192890 ] 

Jiri Ondrusek edited comment on FOP-2967 at 9/9/20, 2:11 PM:
-------------------------------------------------------------

[~ssteiner] I can not give you simple eproducer without my app. Problem is caused by native compilation.

Building into *native* image for *graal vm* means, that all accessible classes will be inspected and compiled. This means, that if there is a configuration/use case/special circumstance when  sun.awt.X11FontManager is being used, it will be compiled. I think that I've seen it in debug mode during conversion to png or pcl but I'm not able o repeat this now.

To solve the issue, point in FOP code (or any dependency) which leads to  sun.awt.X11FontManager has to be found and fixed. From my point of view it would be better to fix it in FOP side (to make FOP accessible for other users using graal vm or similar technologies). But once the problematic code is found there could be a simple workaround or configuration on 3rd sides (like camel-quarkus)


was (Author: jondruse):
[~ssteiner] I can not give you simple eproducer without my app.

Building into *native* image for *graal vm* means, that all accessible classes will be inspected and compiled. This means, that if there is a configuration/use case/special circumstance when  sun.awt.X11FontManager is being used, it will be compiled. I think that I've seen it in debug mode during conversion to png or pcl but I'm not able o repeat this now.

To solve the issue, point in FOP code (or any dependency) which leads to  sun.awt.X11FontManager has to be found and fixed. From my point of view it would be better to fix it in FOP side (to make FOP accessible for other users using graal vm or similar technologies). But once the problematic code is found there could be a simple workaround or configuration on 3rd sides (like camel-quarkus)

> Quarkus support of FOP
> ----------------------
>
>                 Key: FOP-2967
>                 URL: https://issues.apache.org/jira/browse/FOP-2967
>             Project: FOP
>          Issue Type: Improvement
>            Reporter: Jiri Ondrusek
>            Priority: Major
>
> I tried to create camel-quarkus extension for fop (see [https://github.com/apache/camel-quarkus/issues/1642])
> I was not able to finish it successfully as I was facing issues with fonts:
> {quote}Error: No instances of sun.nio.ch.FileChannelImpl are allowed in the image heap as this class should be initialized at image runtime. Object has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked.
>  Trace: Object was reached by 
>  reading field sun.font.TrueTypeFont$TTDisposerRecord.channel of
>  constant sun.font.TrueTypeFont$TTDisposerRecord@2c7b7d19 reached by 
>  reading field java.util.Hashtable$Entry.value of
>  constant java.util.Hashtable$Entry@66aeea4 reached by 
>  indexing into array
>  constant java.util.Hashtable$Entry[]@7be2410f reached by 
>  reading field java.util.Hashtable.table of
>  constant java.util.Hashtable@33cc3b6c reached by 
>  scanning method sun.java2d.Disposer.addObjectRecord(Disposer.java:250)
> {quote}
> I spent some time with debugging of the fop and I discovered that fonts are inseparable part of some rendering. Which makes it impossible to "avoid".
> I'm not sure how this could be solved. But it would be nice to have support for quarkus.
> (I can imagine that for example only some features could be supported in quarkus)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)