You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "apupier (via GitHub)" <gi...@apache.org> on 2026/01/12 12:43:33 UTC
[PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
apupier opened a new pull request, #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132
<!-- Uncomment and fill this section if your PR is not trivial
[ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
[ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
[ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
[ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
[ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
[ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
-->
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2689999872
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
using automatic service loader registration, I wasn't able to find the correct service, or to initialize it correctly for the png image.
is it okay to go with that?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier merged PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2690117156
##########
pom.xml:
##########
@@ -159,6 +160,7 @@
<reactor-core.version>3.7.9</reactor-core.version><!-- @sync com.azure:azure-core:${azure-core.version} dep:io.projectreactor:reactor-core -->
<reactor-netty.version>${reactor-netty-version}</reactor-netty.version>
<retrofit.version>3.0.0</retrofit.version><!-- @sync org.kiwiproject:consul-client:${consul-client-version} prop:retrofit.version -->
+ <rhino.version>1.7.7</rhino.version><!-- Used by Apache FOP, to sync with transitive dependencies -->
Review Comment:
Can we try with 1.7.15.1? 1.7.7 is affected by CVE-2025-66453.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2690367838
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
Personally, I'm not sure I like it. Not sure what others think?
It forces auto service registration for everything on the classpath exposing services. Are we confident native apps will continue to work if some unexpected or unwanted service is loaded?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2693963834
##########
extensions/fop/deployment/src/main/java/org/apache/camel/quarkus/component/fop/deployment/FopProcessor.java:
##########
@@ -118,9 +178,29 @@ public void registerRuntimeInitializedClasses(
.map(RuntimeInitializedClassBuildItem::new)
.forEach(runtimeInitializedClass::produce);
- runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ImageImplRegistry.class.getName()));
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ColorUtil.class.getName()));
- runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ICCColorSpaceWithIntent.class.getName()));
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PDFSignature.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(JAIMonochromeBitmapConverter.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem("org.apache.fop.svg.font.ComplexGlyphVector"));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PCLPageDefinition.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PSImageHandlerSVG.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(BitmapRendererOption.class.getName()));
+ runtimeInitializedClass
+ .produce(new RuntimeInitializedClassBuildItem("org.apache.fop.render.bitmap.BitmapRendererConfig$1"));
+
+ // Using Random class
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(RtfList.class.getName()));
+
+ // batik
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(WMFPainter.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(GlyphIterator.class.getName()));
Review Comment:
Yeah - if we can push any of the batik specific native config to the Quarkiverse project, then it's less maintenance overhead for us.
I'd be ok with creating a follow up issue for that.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2690664009
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
Might be worth experimenting with `ServiceProviderBuildItem.allProvidersOfDependency`.
It should register all services from a given dependency and also take care of adding the native image resource for the `META-INF/services` files.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2689990996
##########
extensions/fop/deployment/src/main/java/org/apache/camel/quarkus/component/fop/deployment/FopProcessor.java:
##########
@@ -86,8 +175,23 @@ void addDependencies(BuildProducer<IndexDependencyBuildItem> indexDependency) {
@BuildStep
NativeImageResourceBuildItem initResources() {
return new NativeImageResourceBuildItem(
- "META-INF/services/org.apache.fop.fo.ElementMapping",
- "META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler",
+ // can be removed when auto-registration is activated - some are missing as it is not working without auto-registration
+ // "META-INF/services/org.apache.fop.events.EventExceptionManager$ExceptionFactory",
+ // "META-INF/services/org.apache.fop.fo.ElementMapping",
+ // "META-INF/services/org.apache.fop.fo.FOEventHandler",
+ // "META-INF/services/org.apache.fop.render.ImageHandler",
+ // "META-INF/services/org.apache.fop.render.intermediate.IFDocumentHandler",
+ // "META-INF/services/org.apache.fop.render.Renderer",
+ // "META-INF/services/org.apache.fop.render.XMLHandler",
+ // "META-INF/services/org.apache.fop.util.ContentHandlerFactory",
+ // "META-INF/services/org.apache.fop.text.AdvancedMessageFormat$Function",
+ // "META-INF/services/org.apache.fop.text.AdvancedMessageFormat$ObjectFormatter",
+ // "META-INF/services/org.apache.fop.text.AdvancedMessageFormat$PartFactory",
+ // "META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageConverter",
+ // "META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImageloaderFactory",
+ // "META-INF/services/org.apache.xmlgraphics.image.loader.spi.ImagePreloader",
+ // "META-INF/services/javax.xml.transform.URIResolver",
+ // "META-INF/services/org.apache.xmlgraphics.image.writer.ImageWriter",
Review Comment:
I keep it to show the list of services I tried to register and which were not enough. To be removed when globally ok on the PR
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2691143494
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
modified to use it to register all Services from xmlgraphics-fop and xmlgraphics-commons and it is working.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2689992642
##########
extensions/fop/runtime/pom.xml:
##########
@@ -40,6 +40,14 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkiverse.batik</groupId>
+ <artifactId>quarkus-batik</artifactId>
+ </dependency>
Review Comment:
I think this batik dependency is interesting as it is cutting a lot of configuration otherwise
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2689997037
##########
extensions/fop/runtime/pom.xml:
##########
@@ -40,6 +40,14 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.quarkiverse.batik</groupId>
+ <artifactId>quarkus-batik</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mozilla</groupId>
+ <artifactId>rhino</artifactId>
+ </dependency>
Review Comment:
this is an optional dependency of Apache fop.
When registering all services, we need it to have the compilation passing.
The downside is that now we have it all the time, even with JVM mode. The advantage is that it should cover more use case (even if I do not know which ones exactly)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#issuecomment-3749031974
Here is one version to make it working in Native with png image. i provided comments on the PR to clarify some choices in this version
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#issuecomment-3738379475
currently failing with:
```
2026-01-12 09:55:10,033 li-7347b8cc-26f4-11b2-a85c-d01aff6ae44a /home/apupier/git/camel-quarkus/integration-tests/fop/target/camel-quarkus-integration-test-fop-3.31.0-SNAPSHOT-runner[789169] ERROR [org.apa.fop.app.FOUserAgent] (executor-thread-1) : org.apache.xmlgraphics.image.loader.ImageException: Cannot load image (no suitable loader/converter combination available) for data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== (image/png)
at org.apache.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java:272)
at org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:165)
at org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:225)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:182)
at org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1306)
at org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1293)
at org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:1030)
at org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:836)
at org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:860)
at org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:877)
at org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:924)
at org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRenderer.java:845)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:704)
at org.apache.fop.render.AbstractRenderer.renderBlock(AbstractRenderer.java:758)
at org.apache.fop.render.intermediate.IFRenderer.renderBlock(IFRenderer.java:1004)
at org.apache.fop.render.AbstractRenderer.renderBlocks(AbstractRenderer.java:689)
at org.apache.fop.render.AbstractRenderer.renderFlow(AbstractRenderer.java:591)
at org.apache.fop.render.AbstractPathOrientedRenderer.renderFlow(AbstractPathOrientedRenderer.java:789)
at org.apache.fop.render.AbstractRenderer.renderMainReference(AbstractRenderer.java:568)
at org.apache.fop.render.AbstractRenderer.renderBodyRegion(AbstractRenderer.java:433)
at org.apache.fop.render.AbstractRenderer.renderRegionViewport(AbstractRenderer.java:380)
at org.apache.fop.render.intermediate.IFRenderer.renderRegionViewport(IFRenderer.java:735)
at org.apache.fop.render.AbstractRenderer.renderPageAreas(AbstractRenderer.java:345)
at org.apache.fop.render.AbstractRenderer.renderPage(AbstractRenderer.java:318)
at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:584)
at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:123)
at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:243)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:147)
at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:140)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:390)
at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:207)
at org.apache.fop.fo.FOTreeBuilder$3.run(FOTreeBuilder.java:204)
at java.base@21.0.9/java.security.AccessController.executePrivileged(AccessController.java:129)
at java.base@21.0.9/java.security.AccessController.doPrivileged(AccessController.java:319)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:203)
at java.xml@21.0.9/com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:263)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:618)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1728)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2899)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:114)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
at java.xml@21.0.9/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
at java.xml@21.0.9/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:667)
at java.xml@21.0.9/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:781)
at java.xml@21.0.9/com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:395)
at org.apache.camel.component.fop.FopProducer.transform(FopProducer.java:98)
at org.apache.camel.component.fop.FopProducer.process(FopProducer.java:66)
at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:65)
at org.apache.camel.impl.engine.SharedCamelInternalProcessor.processNonTransacted(SharedCamelInternalProcessor.java:156)
at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:133)
at org.apache.camel.impl.engine.SharedCamelInternalProcessor$1.process(SharedCamelInternalProcessor.java:89)
at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:82)
at org.apache.camel.impl.engine.SharedCamelInternalProcessor.process(SharedCamelInternalProcessor.java:86)
at org.apache.camel.support.cache.DefaultProducerCache.send(DefaultProducerCache.java:180)
at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:175)
at org.apache.camel.impl.engine.DefaultProducerTemplate.send(DefaultProducerTemplate.java:171)
at org.apache.camel.impl.engine.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:413)
at org.apache.camel.quarkus.component.fop.it.FopResource.post(FopResource.java:53)
at org.apache.camel.quarkus.component.fop.it.FopResource_ClientProxy.post(Unknown Source)
at java.base@21.0.9/java.lang.reflect.Method.invoke(Method.java:580)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:154)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:118)
at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:560)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:452)
at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:413)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:415)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:378)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:356)
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:70)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:429)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invokePropagateNotFound$6(SynchronousDispatcher.java:275)
at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:154)
at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:321)
at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:157)
at org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:260)
at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:86)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:97)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:645)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)
at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base@21.0.9/java.lang.Thread.runWith(Thread.java:1596)
at java.base@21.0.9/java.lang.Thread.run(Thread.java:1583)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:896)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:872)
2026-01-12 09:55:10,034 li-7347b8cc-26f4-11b2-a85c-d01aff6ae44a /home/apupier/git/camel-quarkus/integration-tests/fop/target/camel-quarkus-integration-test-fop-3.31.0-SNAPSHOT-runner[789169] INFO [org.apa.fop.app.FOUserAgent] (executor-thread-1)
2026-01-12 09:55:10,034 li-7347b8cc-26f4-11b2-a85c-d01aff6ae44a /home/apupier/git/camel-quarkus/integration-tests/fop/target/camel-quarkus-integration-test-fop-3.31.0-SNAPSHOT-runner[789169] INFO [org.apa.cam.qua.com.fop.it.FopResource] (executor-thread-1) Got response from fop.
[ERROR] [1;31mTests [0;1mrun: [0;1m3[m, Failures: 0, [1;31mErrors: [0;1;31m1[m, Skipped: 0, Time elapsed: 3.093 s[1;31m <<< FAILURE![m -- in org.apache.camel.quarkus.component.fop.it.[1mFopIT[m
[ERROR] org.apache.camel.quarkus.component.fop.it.FopIT.convertToPdfWithImage -- Time elapsed: 0.081 s <<< ERROR!
java.util.NoSuchElementException
at java.base/java.util.Collections$EmptyIterator.next(Collections.java:4311)
at org.apache.camel.quarkus.component.fop.it.FopTest.convertToPdfWithImage(FopTest.java:121)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:835)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
```
sounds like some SPI are not initialized correctly
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2690630310
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
I was hoping it was forcing only for the dependencies of this artifact but I have not found information on that.
If not okay, i will have to continue investigating which service and how it is is initialized that I must declare explicitly. Not found (yet) the information on what this automatic service is registering and how.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2693499535
##########
extensions/fop/deployment/src/main/java/org/apache/camel/quarkus/component/fop/deployment/FopProcessor.java:
##########
@@ -118,9 +178,29 @@ public void registerRuntimeInitializedClasses(
.map(RuntimeInitializedClassBuildItem::new)
.forEach(runtimeInitializedClass::produce);
- runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ImageImplRegistry.class.getName()));
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ColorUtil.class.getName()));
- runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(ICCColorSpaceWithIntent.class.getName()));
runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PDFSignature.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(JAIMonochromeBitmapConverter.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem("org.apache.fop.svg.font.ComplexGlyphVector"));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PCLPageDefinition.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(PSImageHandlerSVG.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(BitmapRendererOption.class.getName()));
+ runtimeInitializedClass
+ .produce(new RuntimeInitializedClassBuildItem("org.apache.fop.render.bitmap.BitmapRendererConfig$1"));
+
+ // Using Random class
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(RtfList.class.getName()));
+
+ // batik
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(WMFPainter.class.getName()));
+ runtimeInitializedClass.produce(new RuntimeInitializedClassBuildItem(GlyphIterator.class.getName()));
Review Comment:
I'm wondering if we should not add them to batik quarkiverse. If I understand well, it won't modify the native image in case the class are not referenced anyway but avoid having to reguister them for clients that are using them.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#issuecomment-3753806356
I validated with https://github.com/jdussouillez/quarkus-camel-fop-img/tree/master by using the locally built version and it is working too (project used as reproducer on the issue)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2690630310
##########
extensions/fop/runtime/src/main/resources/application.properties:
##########
@@ -0,0 +1,18 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+quarkus.native.auto-service-loader-registration=true
Review Comment:
I was hoping it was forcing only for the dependencies of this artifact and its dependencies but I have not found information on that.
If not okay, i will have to continue investigating which service and how it is is initialized that I must declare explicitly. Not found (yet) the information on what this automatic service is registering and how. Asked here https://quarkusio.zulipchat.com/#narrow/channel/187030-users/topic/How.20to.20see.20which.20services.20are.20auto.20registered.3F/with/567998287
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] WIP PDF generation with image in native with Apache fop [camel-quarkus]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier commented on code in PR #8132:
URL: https://github.com/apache/camel-quarkus/pull/8132#discussion_r2691144993
##########
pom.xml:
##########
@@ -159,6 +160,7 @@
<reactor-core.version>3.7.9</reactor-core.version><!-- @sync com.azure:azure-core:${azure-core.version} dep:io.projectreactor:reactor-core -->
<reactor-netty.version>${reactor-netty-version}</reactor-netty.version>
<retrofit.version>3.0.0</retrofit.version><!-- @sync org.kiwiproject:consul-client:${consul-client-version} prop:retrofit.version -->
+ <rhino.version>1.7.7</rhino.version><!-- Used by Apache FOP, to sync with transitive dependencies -->
Review Comment:
updated and it is working too
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org