aldettinger opened a new issue #2395:
URL: https://github.com/apache/camel-quarkus/issues/2395


   Looks there is an issue starting with camel-quarkus 1.8.0, with a route like 
below:
   ```
           from("platform-http:/hello").
           choice().when().jsonpath("$.room[?(@.temperature > 20)]").
               setBody(simple("HOT")).
           otherwise().
               setBody(constant("WARM")).
           end();
   ```
   
   when invoking with restassured:
   ```
   
given().body("{room:{temperature:30}}").when().post("/hello").then().statusCode(200);
   ```
   
   It produces the stack trace below:
   ```
   2021-03-29 10:41:24,828 WARN  [io.qua.arc.impl] (vert.x-worker-thread-0) 
   
================================================================================
   CDI: programmatic lookup problem detected
   -----------------------------------------
   At least one bean matched the required type and qualifiers but was marked as 
unused and removed during build
   Removed beans:
        - PRODUCER_METHOD bean 
io.quarkus.jackson.runtime.ObjectMapperProducer#objectMapper() 
[types=[interface com.fasterxml.jackson.core.Versioned, class 
com.fasterxml.jackson.core.TreeCodec, interface java.io.Serializable, class 
com.fasterxml.jackson.databind.ObjectMapper, class 
com.fasterxml.jackson.core.ObjectCodec], 
qualifiers=[@javax.enterprise.inject.Default(), @javax.enterprise.inject.Any()]]
   Required type: class com.fasterxml.jackson.databind.ObjectMapper
   Required qualifiers: []
   Solutions:
        - Application developers can eliminate false positives via the 
@Unremovable annotation
        - Extensions can eliminate false positives via build items, e.g. using 
the UnremovableBeanBuildItem
        - See also https://quarkus.io/guides/cdi-reference#remove_unused_beans
   
================================================================================
   
   2021-03-29 10:41:24,913 ERROR [org.apa.cam.pro.err.DefaultErrorHandler] 
(vert.x-worker-thread-0) Failed delivery for (MessageId: 
032BD1354638674-0000000000000000 on ExchangeId: 
032BD1354638674-0000000000000000). Exhausted after delivery attempt: 1 caught: 
org.apache.camel.ExpressionEvaluationException: 
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['room']
   
   Message History (complete message history is disabled)
   
---------------------------------------------------------------------------------------------------------------------------------------
   RouteId              ProcessorId          Processor                          
                                              Elapsed (ms)
   [route1            ] [route1            ] [from[platform-http:///hello]      
                                            ] [       172]
        ...
   [route1            ] [choice1           ] 
[choice[when[jsonpath{$.room[?(@.temperature > 
20)]}],otherwise[setBody[constan] [         0]
   
   Stacktrace
   
---------------------------------------------------------------------------------------------------------------------------------------
   : org.apache.camel.ExpressionEvaluationException: 
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['room']
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
        at 
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:35)
        at 
org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
        at 
org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:77)
        at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:71)
        at 
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:439)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:62)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:167)
        at 
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:388)
        at 
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$2(VertxPlatformHttpConsumer.java:184)
        at 
io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: com.jayway.jsonpath.PathNotFoundException: Missing property in 
path $['room']
        at 
com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:72)
        at 
com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79)
        at 
com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:53)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:61)
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:187)
        at 
org.apache.camel.jsonpath.JsonPathEngine.readWithAdapter(JsonPathEngine.java:258)
        at 
org.apache.camel.jsonpath.JsonPathEngine.doRead(JsonPathEngine.java:186)
        at 
org.apache.camel.jsonpath.JsonPathEngine.read(JsonPathEngine.java:106)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluateJsonPath(JsonPathExpression.java:190)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:144)
        ... 15 more
   
   2021-03-29 10:41:24,918 WARN  
[org.apa.cam.com.pla.htt.ver.VertxPlatformHttpConsumer] 
(vert.x-eventloop-thread-9) Failed handling platform-http endpoint /hello. 
Caused by: [org.apache.camel.ExpressionEvaluationException - 
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['room']]: 
org.apache.camel.ExpressionEvaluationException: 
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['room']
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
        at 
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:35)
        at 
org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
        at 
org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:77)
        at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:71)
        at 
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:439)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:62)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:167)
        at 
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:388)
        at 
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$2(VertxPlatformHttpConsumer.java:184)
        at 
io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: com.jayway.jsonpath.PathNotFoundException: Missing property in 
path $['room']
        at 
com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:72)
        at 
com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79)
        at 
com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:53)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:61)
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:187)
        at 
org.apache.camel.jsonpath.JsonPathEngine.readWithAdapter(JsonPathEngine.java:258)
        at 
org.apache.camel.jsonpath.JsonPathEngine.doRead(JsonPathEngine.java:186)
        at 
org.apache.camel.jsonpath.JsonPathEngine.read(JsonPathEngine.java:106)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluateJsonPath(JsonPathExpression.java:190)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:144)
        ... 15 more
   
   2021-03-29 10:41:24,920 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] 
(vert.x-eventloop-thread-9) HTTP Request to /hello failed, error id: 
4ad630d5-1ff3-40c8-98c5-afe67b4160cc-1: 
org.apache.camel.ExpressionEvaluationException: 
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['room']
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:159)
        at 
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:35)
        at 
org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:36)
        at 
org.apache.camel.processor.FilterProcessor.matches(FilterProcessor.java:77)
        at 
org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:71)
        at 
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:439)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:181)
        at 
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:62)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:167)
        at 
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:388)
        at 
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$2(VertxPlatformHttpConsumer.java:184)
        at 
io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: com.jayway.jsonpath.PathNotFoundException: Missing property in 
path $['room']
        at 
com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:72)
        at 
com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79)
        at 
com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:53)
        at 
com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:61)
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:187)
        at 
org.apache.camel.jsonpath.JsonPathEngine.readWithAdapter(JsonPathEngine.java:258)
        at 
org.apache.camel.jsonpath.JsonPathEngine.doRead(JsonPathEngine.java:186)
        at 
org.apache.camel.jsonpath.JsonPathEngine.read(JsonPathEngine.java:106)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluateJsonPath(JsonPathExpression.java:190)
        at 
org.apache.camel.jsonpath.JsonPathExpression.evaluate(JsonPathExpression.java:144)
        ... 15 more
   ```
   
   At first sight, it seems to occur when mixing platform-http and jsonpath, so 
maybe linked to how the JsonPathEngine resolve the body. Or maybe the 
ObjectMapper warning indicates that the engine mess up with jackson...


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


Reply via email to