You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/03 08:01:35 UTC

[GitHub] [camel-quarkus] JiriOndrusek commented on issue #1642: FOP native support

JiriOndrusek commented on issue #1642:
URL: https://github.com/apache/camel-quarkus/issues/1642#issuecomment-686325091


   It s not possible to creative native extension for camel-fop.
   The effort is blocked by this error (during native execution):
   
   >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)
   
   I was able to debug some calls to TrueTypeFont (in case of conversion into pcl, png). This showed me some calls from fop, which causes initialization of these classes.
   E.g.: https://github.com/apache/xmlgraphics-fop/blob/trunk/fop-core/src/main/java/org/apache/fop/render/java2d/InstalledFontCollection.java#L79, https://github.com/apache/xmlgraphics-fop/blob/trunk/fop-core/src/main/java/org/apache/fop/render/java2d/Java2DFontMetrics.java#L318
   But unfortunately there are a lot of other calls to similar awt classes from fop (or from batik - which is dependency of fop)
   
   
   My WIP is here: https://github.com/JiriOndrusek/camel-quarkus/tree/1642-FOP-native
   (JVM test is working, native fails with above error)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org