[GitHub] [camel-quarkus] kazik666 opened a new issue #671: Camel routes with xslt does't work in native mode

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] kazik666 opened a new issue #671: Camel routes with xslt does't work in native mode

GitBox
kazik666 opened a new issue #671: Camel routes with xslt does't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671
 
 
   Hi,
   
   I've problem with running my camel quarkus application(Which contains route to xslt) in native mode. I've got an error:
   Caused by: org.apache.camel.RuntimeCamelException: java.lang.NoSuchMethodException: org.apache.camel.component.xslt.XsltBuilder.<init>
           at org.apache.camel.support.ObjectHelper.newInstance(ObjectHelper.java:222)
           at org.apache.camel.impl.engine.DefaultInjector.newInstance(DefaultInjector.java:66)
           at org.apache.camel.impl.engine.DefaultInjector.newInstance(DefaultInjector.java:45)
           at org.apache.camel.component.xslt.XsltEndpoint.createXsltBuilder(XsltEndpoint.java:340)
           at org.apache.camel.component.xslt.XsltEndpoint.doStart(XsltEndpoint.java:329)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:212)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87)
           at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1271)
           at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:56)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87)
           at org.apache.camel.processor.channel.DefaultChannel.doStart(DefaultChannel.java:134)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)
           at org.apache.camel.processor.FilterProcessor.doStart(FilterProcessor.java:116)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:73)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87)
           at org.apache.camel.processor.ChoiceProcessor.doStart(ChoiceProcessor.java:200)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87)
           at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1271)
           at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:56)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87)
           at org.apache.camel.processor.channel.DefaultChannel.doStart(DefaultChannel.java:134)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:73)
           at org.apache.camel.processor.Pipeline.doStart(Pipeline.java:135)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.support.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)
           at org.apache.camel.support.service.ServiceSupport.start(ServiceSupport.java:117)
           at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:70)
           at org.apache.camel.impl.engine.BaseRouteService.startChildService(BaseRouteService.java:336)
           at org.apache.camel.impl.engine.BaseRouteService.doWarmUp(BaseRouteService.java:181)
           at org.apache.camel.impl.engine.BaseRouteService.warmUp(BaseRouteService.java:129)
           ... 18 more
   Caused by: java.lang.NoSuchMethodException: org.apache.camel.component.xslt.XsltBuilder.<init>
           at java.lang.Class.getConstructor0(DynamicHub.java:3082)
           at java.lang.Class.getDeclaredConstructor(DynamicHub.java:2178)
           at org.apache.camel.support.ObjectHelper.newInstance(ObjectHelper.java:220)
   
   My pom looks like below:
   <?xml version="1.0"?>
   <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.example</groupId>
     <artifactId>camel-route</artifactId>
     <version>1.0-SNAPSHOT</version>
     <properties>
       <compiler-plugin.version>3.8.1</compiler-plugin.version>
       <maven.compiler.parameters>true</maven.compiler.parameters>
       <maven.compiler.source>1.8</maven.compiler.source>
       <maven.compiler.target>1.8</maven.compiler.target>
       <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
       <quarkus-plugin.version>1.2.0.Final</quarkus-plugin.version>
       <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
       <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
       <quarkus.platform.version>1.2.0.Final</quarkus.platform.version>
       <surefire-plugin.version>2.22.1</surefire-plugin.version>
       <lombok.version>1.18.10</lombok.version>
       <camel.version>3.0.1</camel.version>
     </properties>
     <dependencyManagement>
       <dependencies>
         <dependency>
           <groupId>${quarkus.platform.group-id}</groupId>
           <artifactId>${quarkus.platform.artifact-id}</artifactId>
           <version>${quarkus.platform.version}</version>
           <type>pom</type>
           <scope>import</scope>
         </dependency>
       </dependencies>
     </dependencyManagement>
     <dependencies>
       <dependency>
         <groupId>org.apache.camel.quarkus</groupId>
         <artifactId>camel-quarkus-platform-http</artifactId>
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-xslt</artifactId>
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
         <artifactId>camel-xpath</artifactId>
         <version>${camel.version}</version>
       </dependency>
       <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>${lombok.version}</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>io.quarkus</groupId>
         <artifactId>quarkus-junit5</artifactId>
         <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>io.rest-assured</groupId>
         <artifactId>rest-assured</artifactId>
         <scope>test</scope>
       </dependency>
     </dependencies>
     <build>
       <plugins>
         <plugin>
           <groupId>io.quarkus</groupId>
           <artifactId>quarkus-maven-plugin</artifactId>
           <version>${quarkus-plugin.version}</version>
           <executions>
             <execution>
               <goals>
                 <goal>build</goal>
               </goals>
             </execution>
           </executions>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>${compiler-plugin.version}</version>
         </plugin>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
           <version>${surefire-plugin.version}</version>
           <configuration>
             <systemProperties>
               <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
             </systemProperties>
           </configuration>
         </plugin>
       </plugins>
     </build>
     <profiles>
       <profile>
         <id>native</id>
         <activation>
           <property>
             <name>native</name>
           </property>
         </activation>
         <build>
           <plugins>
             <plugin>
               <artifactId>maven-failsafe-plugin</artifactId>
               <version>${surefire-plugin.version}</version>
               <executions>
                 <execution>
                   <goals>
                     <goal>integration-test</goal>
                     <goal>verify</goal>
                   </goals>
                   <configuration>
                     <systemProperties>
                       <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                     </systemProperties>
                   </configuration>
                 </execution>
               </executions>
             </plugin>
           </plugins>
         </build>
         <properties>
           <quarkus.package.type>native</quarkus.package.type>
           <quarkus.native.additional-build-args>-J-Xmx2G,-H:ResourceConfigurationFiles=resources-config.json</quarkus.native.additional-build-args>
         </properties>
       </profile>
     </profiles>
   </project>
   
   My Route class looks as below:
   public class MockRoute extends RouteBuilder {
   
       @Override
       public void configure() {
           Namespaces ns = new Namespaces("s", "http://schemas.xmlsoap.org/soap/envelope/")
                   .add("c", "http://www.deltavista.com/dspone/customerlist-if/V001")
                   .add("o", "http://www.deltavista.com/dspone/ordercheck-if/V001");
   
           from("platform-http:/dvs-test/services/CustomerListService?httpMethodRestrict=POST").streamCaching().log("${body}")
                   .choice()
                   .when(xpath("/s:Envelope/s:Body/c:addCustomerRequest", ns)).to("xslt:xslt/add_customer.xslt")
                   .when(xpath("/s:Envelope/s:Body/c:removeCustomerRequest", ns)).to("xslt:xslt/remove_customer.xslt")
                   .otherwise().to("xslt:xslt/unknown_operation.xslt");
   
           from("platform-http:/dvs-soap/services/OrderCheckService?httpMethodRestrict=POST").streamCaching().log("${body}")
                   .choice()
                   .when(xpath("/s:Envelope/s:Body/o:orderCheckRequest", ns)).to("xslt:xslt/order_check.xslt")
                   .otherwise().to("xslt:xslt/unknown_operation.xslt");
       }
   }
   
   Regards,
   Ćukasz
   

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] oscerd commented on issue #671: Camel routes with xslt doesn't work in native mode

GitBox
oscerd commented on issue #671: Camel routes with xslt doesn't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-579837722
 
 
   You need to use the camel-quarkus-xslt extension and not the plain camel-xslt component as dependency. You're using plain Camel in that way and that's normal that it doesn't work in native.

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on issue #671: Camel routes with xslt doesn't work in native mode

GitBox
In reply to this post by GitBox
ppalaga commented on issue #671: Camel routes with xslt doesn't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-579842956
 
 
   > You need to use the camel-quarkus-xslt extension
   
   Yes, here is an example: https://github.com/apache/camel-quarkus/blob/master/integration-tests/xslt/pom.xml#L33-L36

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] kazik666 commented on issue #671: Camel routes with xslt doesn't work in native mode

GitBox
In reply to this post by GitBox
kazik666 commented on issue #671: Camel routes with xslt doesn't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-579906737
 
 
   
   Thanks for the clarification.

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] kazik666 commented on issue #671: Camel routes with xslt doesn't work in native mode

GitBox
In reply to this post by GitBox
kazik666 commented on issue #671: Camel routes with xslt doesn't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-580166535
 
 
   It's work fine when i'am running application using runner in java or native mode, but there is a problem when i'am running application using dev mode:
   ./mvnw compile quarkus:dev
   I've got an error:
   Caused by: java.lang.IllegalStateException: Could not find the XSLT resource xslt/add_customer.xslt in the classpath

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on issue #671: Camel routes with xslt doesn't work in native mode

GitBox
In reply to this post by GitBox
ppalaga commented on issue #671: Camel routes with xslt doesn't work in native mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-580189846
 
 
   > here is a problem when i'am running application using dev mode
   
   That might be a real problem. Could you please rename the issue accordingly?
   Let me try to reproduce.

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] kazik666 commented on issue #671: Camel routes with xslt doesn't work in dev mode

GitBox
In reply to this post by GitBox
kazik666 commented on issue #671: Camel routes with xslt doesn't work in dev mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-580655501
 
 
   Sure.

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on issue #671: Camel routes with xslt doesn't work in dev mode

GitBox
In reply to this post by GitBox
ppalaga commented on issue #671: Camel routes with xslt doesn't work in dev mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-586287686
 
 
   I have hit a different issue when I tried to reproduce https://github.com/apache/camel-quarkus/issues/721

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


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [camel-quarkus] ppalaga commented on issue #671: Camel routes with xslt doesn't work in dev mode

GitBox
In reply to this post by GitBox
ppalaga commented on issue #671: Camel routes with xslt doesn't work in dev mode
URL: https://github.com/apache/camel-quarkus/issues/671#issuecomment-590837364
 
 
   I cannot reproduce with the current Camel Quarkus master branch.
   
   @kazik666 could you please confirm that the following steps should reproduce your issue?
   
   ```
   git clone https://github.com/apache/camel-quarkus.git
   cd camel-quarkus
   mvn clean install -DskipTests
   cd integration-tests/xslt
   mvn clean compile quarkus:dev
   ```
   
   The above starts the app properly in the dev mode
   
   Check whether the app works, in a separate terminal:
   
   ```
   curl -vv -d '<mail><subject>Hey</subject><body>Hello world!</body></mail>' -X POST http://localhost:8080/xslt/classpath-xsl
   ```
   
   The output contains `<cheese>` as expected.
   
   The live reload after changing the source of the app works 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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services