jamesnetherton opened a new issue #670: PDF itest fails in native mode with 
Camel 3.1.0-SNAPSHOT
URL: https://github.com/apache/camel-quarkus/issues/670
 
 
   Having worked around 
[CAMEL-14452](https://issues.apache.org/jira/browse/CAMEL-14452), I now see the 
following when the PDF test is run in native mode with Camel 3.1.0. I think 
PDFBox tries to do some local font caching, which may be the cause of this.
   
   ```
   Error: Detected a FileDescriptor in the image heap. File descriptors opened 
during image generation are no longer open at image run time, and the files 
might not even be present anymore at image run time.  To see how this object 
got instantiated use -H:+TraceClassInitialization. The object was probably 
created by a class initializer and is reachable from a static field. You can 
request class initialization at image run time by using the option 
--initialize-at-build-time=<class-name>. Or you can write your own 
initialization methods and call them explicitly from your main entry point.
   Trace:       object org.apache.fontbox.ttf.BufferedRandomAccessFile
        object org.apache.fontbox.ttf.RAFDataStream
        object org.apache.fontbox.ttf.TrueTypeFont
        object java.lang.ref.SoftReference
        object java.util.concurrent.ConcurrentHashMap$Node
        object java.util.concurrent.ConcurrentHashMap$Node[]
        object java.util.concurrent.ConcurrentHashMap
        object org.apache.pdfbox.pdmodel.font.FontCache
        object org.apache.pdfbox.pdmodel.font.FileSystemFontProvider
        method 
org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.access$100()
   Call path from entry point to 
org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.access$100(): 
        at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl$DefaultFontProvider.access$100(FontMapperImpl.java:126)
        at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getProvider(FontMapperImpl.java:147)
        at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.findFont(FontMapperImpl.java:411)
        at 
org.apache.pdfbox.pdmodel.font.FontMapperImpl.getTrueTypeFont(FontMapperImpl.java:319)
        at 
org.apache.pdfbox.pdmodel.font.PDTrueTypeFont.<init>(PDTrueTypeFont.java:219)
        at 
org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:89)
        at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:146)
        at 
org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:66)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:875)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:509)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:483)
        at 
org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:156)
        at 
org.apache.pdfbox.text.LegacyPDFStreamEngine.processPage(LegacyPDFStreamEngine.java:139)
        at 
org.apache.pdfbox.text.PDFTextStripper.processPage(PDFTextStripper.java:391)
        at 
org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
        at 
org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
        at 
org.apache.pdfbox.text.PDFTextStripper.getText(PDFTextStripper.java:227)
        at 
org.apache.camel.component.pdf.PdfProducer.doExtractText(PdfProducer.java:109)
        at 
org.apache.camel.component.pdf.PdfProducer.process(PdfProducer.java:71)
        at 
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:67)
        at 
org.apache.camel.processor.Resequencer.processExchange(Resequencer.java:318)
        at 
org.apache.camel.processor.Resequencer$BatchSender.sendExchanges(Resequencer.java:546)
        at 
org.apache.camel.processor.Resequencer$BatchSender.run(Resequencer.java:471)
        at 
com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:460)
        at 
com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
        at 
com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)
   Error: No instances of org.apache.pdfbox.pdmodel.font.PDType1Font are 
allowed in the image heap as this class should be initialized at image runtime. 
To see how this object got instantiated use -H:+TraceClassInitialization.
   Trace:       object java.util.HashMap$Node
        object java.util.HashMap$Node[]
        object java.util.HashMap
        method org.apache.camel.component.pdf.Standard14Fonts.getByName(String)
   Call path from entry point to 
org.apache.camel.component.pdf.Standard14Fonts.getByName(String): 
        at 
org.apache.camel.component.pdf.Standard14Fonts.getByName(Standard14Fonts.java:58)
        at 
org.apache.camel.component.pdf.PdfConfiguration.setFont(PdfConfiguration.java:171)
        at 
com.oracle.svm.reflect.PdfConfiguration_setFont_a95db4db2b78c2f69d084e6eac2d7ac87bee3c00_1326.invoke(Unknown
 Source)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
javax.enterprise.util.AnnotationLiteral.invoke(AnnotationLiteral.java:288)
        at 
javax.enterprise.util.AnnotationLiteral.getMemberValue(AnnotationLiteral.java:276)
        at 
javax.enterprise.util.AnnotationLiteral.hashCode(AnnotationLiteral.java:246)
        at java.util.HashMap.hash(HashMap.java:339)
        at java.util.HashMap.get(HashMap.java:557)
        at 
com.oracle.svm.jni.access.JNIReflectionDictionary.getClassObjectByName(JNIReflectionDictionary.java:123)
        at 
com.oracle.svm.jni.functions.JNIFunctions.FindClass(JNIFunctions.java:326)
        at 
com.oracle.svm.core.code.IsolateEnterStub.JNIFunctions_FindClass_3ec1032c6cb9443725d1e68194130533bfb04076(generated:0)
   
        at 
com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:133)
        at com.oracle.graal.pointsto.BigBang.finish(BigBang.java:565)
        at 
com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:688)
        ... 7 more
   ```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to