You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "zhfeng (via GitHub)" <gi...@apache.org> on 2023/08/16 07:51:13 UTC

[GitHub] [camel-quarkus] zhfeng opened a new issue, #5189: camel-quarkus-xslt-saxon does not support extension functions in native mode

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: commits-unsubscribe@camel.apache.org.apache.org

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


Re: [I] camel-quarkus-xslt-saxon does not support extension functions in native mode [camel-quarkus]

Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
zhfeng commented on issue #5189:
URL: https://github.com/apache/camel-quarkus/issues/5189#issuecomment-1757584898

   @JiriOndrusek sorry for the late reply. The test has been disabled in native build. You need to uncomment this line https://github.com/apache/camel-quarkus/blob/main/integration-test-groups/xml/native/xslt-classpath/src/test/java/org/apache/camel/quarkus/component/xml/it/XsltTest.java#L111 and run the native test to see the 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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

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


[GitHub] [camel-quarkus] JiriOndrusek commented on issue #5189: camel-quarkus-xslt-saxon does not support extension functions in native mode

Posted by "JiriOndrusek (via GitHub)" <gi...@apache.org>.
JiriOndrusek commented on issue #5189:
URL: https://github.com/apache/camel-quarkus/issues/5189#issuecomment-1725583606

   Hi @zhfeng , what need to be done to simulate the error? I tried local test execution of `xslt-saxon` module, and it succeeded. I can look at this issue and try to fix it.


-- 
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