camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [camel-k] athishsreeram edited a comment on issue #1073: java.lang.NoSuchMethodError: com.javainuse.route.SimpleRouteBuilder.getContext()Lorg/apache/camel/model/ModelCamelContext;
Date Sat, 23 Nov 2019 16:43:40 GMT
athishsreeram edited a comment on issue #1073: java.lang.NoSuchMethodError: com.javainuse.route.SimpleRouteBuilder.getContext()Lorg/apache/camel/model/ModelCamelContext;
URL: https://github.com/apache/camel-k/issues/1073#issuecomment-557737895
 
 
   It worked but 
   
   But now i am getting compilation error how can i pass DTO to my routes.
   
   https://github.com/athishsreeram/apache-camel-consume.git
   
   Repo published into
   https://oss.sonatype.org/content/repositories/snapshots/com/github/athishsreeram/apache-camel-consume/0.0.1-SNAPSHOT/
   
   Added repo to maven-settings.xml
   
   ```
   </repository>
      <repository>
        <id>oss.sonatype.org-snapshot</id> 
        <url>http://oss.sonatype.org/content/repositories/snapshots</url> 
        <releases> 
          <enabled>false</enabled> 
        </releases>
        <snapshots>
          <enabled>true</enabled> 
        </snapshots> 
     </repository>
   ```
   
   I am trying to run again
   
   kamel run -d mvn:com.github.athishsreeram:apache-camel-consume:0.0.1-SNAPSHOT SimpleRouteBuilder.java
--dev
   
   ```
   Compilation error: /com/camelexample/main/route/SimpleRouteBuilder.java:45
   
   com/camelexample/main/route/SimpleRouteBuilder.java:126: error: cannot find symbol
   [1]                             EmployeeDTO emp = mapper.readValue(jsonGotFromCall, EmployeeDTO.class);
   ```
   
   
   ```
   ➜  route git:(master) ✗ kamel run -d mvn:com.github.athishsreeram:apache-camel-consume:0.0.1-SNAPSHOT
SimpleRouteBuilder.java --dev
   integration "simple-route-builder" created
   integration "simple-route-builder" in phase Initialization
   integration "simple-route-builder" in phase Building Kit
   integration "simple-route-builder" in phase Deploying
   integration "simple-route-builder" in phase Running
   [1] Monitoring pod simple-route-builder-b485f5fcd-xxtpc[1] Starting the Java application
using /opt/run-java/run-java.sh ...
   [1] exec java -XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MinHeapFreeRatio=20
-XX:MaxHeapFreeRatio=40 -XX:+ExitOnOutOfMemoryError -cp ./resources:/etc/camel/conf:/etc/camel/resources:/etc/camel/sources/i-source-000:dependencies/com.fasterxml.jackson.core.jackson-annotations-2.10.0.jar:dependencies/com.fasterxml.jackson.core.jackson-core-2.10.0.jar:dependencies/com.fasterxml.jackson.core.jackson-databind-2.10.0.jar:dependencies/com.fasterxml.jackson.dataformat.jackson-dataformat-xml-2.10.0.jar:dependencies/com.fasterxml.jackson.dataformat.jackson-dataformat-yaml-2.10.0.jar:dependencies/com.fasterxml.jackson.datatype.jackson-datatype-joda-2.10.0.jar:dependencies/com.fasterxml.jackson.jaxrs.jackson-jaxrs-base-2.10.0.jar:dependencies/com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider-2.10.0.jar:dependencies/com.fasterxml.jackson.module.jackson-module-jaxb-annotations-2.10.0.jar:dependencies/com.fasterxml.woodstox.woodstox-core-5.0.3.jar:dependencies/com.github.athishsreeram.apache-camel-consume-0.0.1-SNAPSHOT.jar:dependencies/com.github.ben-manes.caffeine.caffeine-2.8.0.jar:dependencies/com.google.code.findbugs.jsr305-3.0.2.jar:dependencies/com.google.errorprone.error_prone_annotations-2.2.0.jar:dependencies/com.google.guava.failureaccess-1.0.1.jar:dependencies/com.google.guava.guava-27.1-jre.jar:dependencies/com.google.guava.listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:dependencies/com.google.j2objc.j2objc-annotations-1.1.jar:dependencies/com.sun.activation.javax.activation-1.2.0.jar:dependencies/com.sun.istack.istack-commons-runtime-3.0.8.jar:dependencies/com.sun.xml.bind.jaxb-core-2.3.0.jar:dependencies/com.sun.xml.bind.jaxb-impl-2.3.0.jar:dependencies/com.sun.xml.fastinfoset.FastInfoset-1.2.16.jar:dependencies/commons-codec.commons-codec-1.11.jar:dependencies/commons-io.commons-io-2.6.jar:dependencies/commons-logging.commons-logging-1.2.jar:dependencies/commons-pool.commons-pool-1.6.jar:dependencies/io.netty.netty-all-4.1.31.Final.jar:dependencies/io.swagger.swagger-annotations-1.5.23.jar:dependencies/io.swagger.swagger-core-1.5.23.jar:dependencies/io.swagger.swagger-jaxrs-1.5.23.jar:dependencies/io.swagger.swagger-models-1.5.23.jar:dependencies/io.swagger.swagger-parser-1.0.46.jar:dependencies/jakarta.activation.jakarta.activation-api-1.2.1.jar:dependencies/jakarta.ws.rs.jakarta.ws.rs-api-2.1.5.jar:dependencies/jakarta.xml.bind.jakarta.xml.bind-api-2.3.2.jar:dependencies/javax.annotation.javax.annotation-api-1.3.2.jar:dependencies/javax.servlet.javax.servlet-api-3.1.0.jar:dependencies/javax.validation.validation-api-1.1.0.Final.jar:dependencies/javax.ws.rs.jsr311-api-1.1.1.jar:dependencies/javax.xml.bind.jaxb-api-2.3.0.jar:dependencies/joda-time.joda-time-2.9.9.jar:dependencies/org.apache.camel.camel-api-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-attachments-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-base-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-bean-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-browse-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-caffeine-lrucache-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-cloud-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-controlbus-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-core-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-core-engine-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-core-xml-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-cxf-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-cxf-transport-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-dataformat-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-dataset-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-direct-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-directvm-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-endpointdsl-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-file-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-http-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-http-common-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-jackson-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-jaxp-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-language-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-log-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-main-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-management-api-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-mock-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-netty4-2.23.1.jar:dependencies/org.apache.camel.camel-netty4-http-2.23.1.jar:dependencies/org.apache.camel.camel-ref-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-rest-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-saga-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-scheduler-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-seda-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-spring-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-stub-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-support-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-swagger-java-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-timer-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-util-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-util-json-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-validator-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-vm-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-xpath-3.0.0-RC3.jar:dependencies/org.apache.camel.camel-xslt-3.0.0-RC3.jar:dependencies/org.apache.camel.k.camel-k-loader-java-1.0.7.jar:dependencies/org.apache.camel.k.camel-k-runtime-core-1.0.7.jar:dependencies/org.apache.camel.k.camel-k-runtime-main-1.0.7.jar:dependencies/org.apache.camel.spi-annotations-3.0.0-RC3.jar:dependencies/org.apache.commons.commons-lang3-3.9.jar:dependencies/org.apache.cxf.cxf-core-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-bindings-soap-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-bindings-xml-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-databinding-jaxb-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-features-logging-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-frontend-jaxrs-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-frontend-jaxws-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-frontend-simple-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-rs-client-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-security-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-transports-http-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-ws-addr-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-ws-policy-3.3.3.jar:dependencies/org.apache.cxf.cxf-rt-wsdl-3.3.3.jar:dependencies/org.apache.httpcomponents.httpclient-4.5.10.jar:dependencies/org.apache.httpcomponents.httpcore-4.4.12.jar:dependencies/org.apache.logging.log4j.log4j-api-2.11.2.jar:dependencies/org.apache.logging.log4j.log4j-core-2.11.2.jar:dependencies/org.apache.logging.log4j.log4j-slf4j-impl-2.11.2.jar:dependencies/org.apache.neethi.neethi-3.1.1.jar:dependencies/org.apache.ws.xmlschema.xmlschema-core-2.2.4.jar:dependencies/org.checkerframework.checker-qual-2.5.2.jar:dependencies/org.codehaus.mojo.animal-sniffer-annotations-1.17.jar:dependencies/org.codehaus.woodstox.stax2-api-4.2.jar:dependencies/org.glassfish.jaxb.jaxb-runtime-2.3.2.jar:dependencies/org.glassfish.jaxb.txw2-2.3.2.jar:dependencies/org.javassist.javassist-3.21.0-GA.jar:dependencies/org.jooq.joor-java-8-0.9.12.jar:dependencies/org.jvnet.staxex.stax-ex-1.8.1.jar:dependencies/org.ow2.asm.asm-7.1.jar:dependencies/org.reflections.reflections-0.9.11.jar:dependencies/org.slf4j.slf4j-api-1.7.28.jar:dependencies/org.slf4j.slf4j-ext-1.7.28.jar:dependencies/org.springframework.spring-aop-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-beans-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-context-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-core-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-expression-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-jcl-5.1.10.RELEASE.jar:dependencies/org.springframework.spring-tx-5.1.10.RELEASE.jar:dependencies/org.yaml.snakeyaml-1.24.jar:dependencies/wsdl4j.wsdl4j-1.6.3.jar:dependencies/xml-resolver.xml-resolver-1.2.jar
org.apache.camel.k.main.Application
   [1] OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase
from one, then you should configure the number of parallel GC threads appropriately using
-XX:ParallelGCThreads=N
   [1] [                          main] ApplicationRuntime             INFO  Add listener:
org.apache.camel.k.listener.ContextConfigurer@6e4784bc
   [1] [                          main] ApplicationRuntime             INFO  Add listener:
org.apache.camel.k.listener.RoutesConfigurer@5c30a9b0
   [1] [                          main] ApplicationRuntime             INFO  Add listener:
org.apache.camel.k.listener.RoutesDumper@7a69b07
   [1] [                          main] RuntimeSupport                 INFO  Looking up loader
for language: java
   [1] [                          main] RuntimeSupport                 INFO  Found loader
org.apache.camel.k.loader.java.JavaSourceRoutesLoader@795cd85e for language java from service
definition
   [1] Exception in thread "main" org.apache.camel.RuntimeCamelException: org.joor.ReflectException:
Compilation error: /com/camelexample/main/route/SimpleRouteBuilder.java:45: error: cannot
find symbol
   [1]                 .get("/emp/{id}").outType(EmployeeDTO.class).to("direct:getEmployee");
   [1]                                           ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] /com/camelexample/main/route/SimpleRouteBuilder.java:126: error: cannot find symbol
   [1]                             EmployeeDTO emp = mapper.readValue(jsonGotFromCall, EmployeeDTO.class);
   [1]                             ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] /com/camelexample/main/route/SimpleRouteBuilder.java:126: error: cannot find symbol
   [1]                             EmployeeDTO emp = mapper.readValue(jsonGotFromCall, EmployeeDTO.class);
   [1]                                                                                 ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] Note: /com/camelexample/main/route/SimpleRouteBuilder.java uses or overrides a deprecated
API.
   [1] Note: Recompile with -Xlint:deprecation for details.
   [1] 3 errors
   [1]
   [1] 	at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52)
   [1] 	at org.apache.camel.k.listener.RoutesConfigurer.load(RoutesConfigurer.java:69)
   [1] 	at org.apache.camel.k.listener.RoutesConfigurer.accept(RoutesConfigurer.java:51)
   [1] 	at org.apache.camel.k.listener.AbstractPhaseListener.accept(AbstractPhaseListener.java:32)
   [1] 	at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.lambda$invokeListeners$0(ApplicationRuntime.java:152)
   [1] 	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
   [1] 	at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
   [1] 	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
   [1] 	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
   [1] 	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
   [1] 	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
   [1] 	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   [1] 	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
   [1] 	at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.invokeListeners(ApplicationRuntime.java:151)
   [1] 	at org.apache.camel.k.main.ApplicationRuntime$MainListenerAdapter.beforeStart(ApplicationRuntime.java:125)
   [1] 	at org.apache.camel.main.MainSupport.beforeStart(MainSupport.java:114)
   [1] 	at org.apache.camel.main.MainSupport.run(MainSupport.java:76)
   [1] 	at org.apache.camel.k.main.ApplicationRuntime.run(ApplicationRuntime.java:70)
   [1] 	at org.apache.camel.k.main.Application.main(Application.java:42)
   [1] Caused by: org.joor.ReflectException: Compilation error: /com/camelexample/main/route/SimpleRouteBuilder.java:45:
error: cannot find symbol
   [1]                 .get("/emp/{id}").outType(EmployeeDTO.class).to("direct:getEmployee");
   [1]                                           ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] /com/camelexample/main/route/SimpleRouteBuilder.java:126: error: cannot find symbol
   [1]                             EmployeeDTO emp = mapper.readValue(jsonGotFromCall, EmployeeDTO.class);
   [1]                             ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] /com/camelexample/main/route/SimpleRouteBuilder.java:126: error: cannot find symbol
   [1]                             EmployeeDTO emp = mapper.readValue(jsonGotFromCall, EmployeeDTO.class);
   [1]                                                                                 ^
   [1]   symbol:   class EmployeeDTO
   [1]   location: class SimpleRouteBuilder
   [1] Note: /com/camelexample/main/route/SimpleRouteBuilder.java uses or overrides a deprecated
API.
   [1] Note: Recompile with -Xlint:deprecation for details.
   [1] 3 errors
   [1]
   [1] 	at org.joor.Compile.compile(Compile.java:100)
   [1] 	at org.joor.Reflect.compile(Reflect.java:102)
   [1] 	at org.joor.Reflect.compile(Reflect.java:77)
   [1] 	at org.apache.camel.k.loader.java.JavaSourceRoutesLoader.load(JavaSourceRoutesLoader.java:45)
   [1] 	at org.apache.camel.k.listener.RoutesConfigurer.load(RoutesConfigurer.java:67)
   [1] 	... 17 more
   [1] [ad #0 - CamelHangupInterceptor] MainSupport$HangupInterceptor  INFO  Received hang
up - stopping the main instance.
   ```

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


With regards,
Apache Git Services

Mime
View raw message