zhfeng opened a new issue, #5189:
URL: https://github.com/apache/camel-quarkus/issues/5189

   ### Bug description
   
   Currently the saxon extension function does not support in native mode. It 
throws some error message at build time if we want to generate an class for the 
template. Something like
   ```
   2023-08-14 13:18:24,583 ERROR 
[org.apa.cam.qua.com.xsl.CamelXsltErrorListener] (build-2) The first argument 
to the non-static Java function 'myExtensionFunction1' is not a valid object 
reference.: javax.xml.transform.TransformerException: The first argument to the 
non-static Java function 'myExtensionFunction1' is not a valid object reference.
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.passErrorsToListener(TransformerFactoryImpl.java:661)
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:836)
        at 
org.apache.camel.quarkus.support.xalan.XalanTransformerFactory.newTemplates(XalanTransformerFactory.java:70)
        at 
org.apache.camel.quarkus.component.xslt.deployment.XsltProcessor.xsltResources(XsltProcessor.java:117)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   2023-08-14 13:18:24,586 ERROR 
[org.apa.cam.qua.com.xsl.CamelXsltErrorListener] (build-2) The first argument 
to the non-static Java function 'myExtensionFunction2' is not a valid object 
reference.: javax.xml.transform.TransformerException: The first argument to the 
non-static Java function 'myExtensionFunction2' is not a valid object reference.
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.passErrorsToListener(TransformerFactoryImpl.java:661)
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:836)
        at 
org.apache.camel.quarkus.support.xalan.XalanTransformerFactory.newTemplates(XalanTransformerFactory.java:70)
        at 
org.apache.camel.quarkus.component.xslt.deployment.XsltProcessor.xsltResources(XsltProcessor.java:117)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   2023-08-14 13:18:24,586 ERROR 
[org.apa.cam.qua.com.xsl.CamelXsltErrorListener] (build-2) The first argument 
to the non-static Java function 'myExtensionFunction2' is not a valid object 
reference.: javax.xml.transform.TransformerException: The first argument to the 
non-static Java function 'myExtensionFunction2' is not a valid object reference.
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.passErrorsToListener(TransformerFactoryImpl.java:661)
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:836)
        at 
org.apache.camel.quarkus.support.xalan.XalanTransformerFactory.newTemplates(XalanTransformerFactory.java:70)
        at 
org.apache.camel.quarkus.component.xslt.deployment.XsltProcessor.xsltResources(XsltProcessor.java:117)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   2023-08-14 13:18:24,587 ERROR 
[org.apa.cam.qua.com.xsl.CamelXsltErrorListener] (build-2) Could not compile 
stylesheet: javax.xml.transform.TransformerConfigurationException: Could not 
compile stylesheet
        at 
org.apache.xalan.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:832)
        at 
org.apache.camel.quarkus.support.xalan.XalanTransformerFactory.newTemplates(XalanTransformerFactory.java:70)
        at 
org.apache.camel.quarkus.component.xslt.deployment.XsltProcessor.xsltResources(XsltProcessor.java:117)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at 
io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:864)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at 
org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at 
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:833)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to