You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "turing85 (via GitHub)" <gi...@apache.org> on 2023/04/29 11:28:42 UTC

[GitHub] [camel-quarkus] turing85 opened a new issue, #4860: Using simple("${exchange.getMessage().getBody()}") results in exception at runtime when compiling natively

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

   # Bug description
   Using `simple("${exchange.getMessage().getBody()}"` throws an exception at runtime when compiling natively:
   
   ```
   Caused by: org.apache.camel.component.bean.MethodNotFoundException: Method with name: getMessage() not found on bean: Exchange[ED6D02F79FBB419-0000000000000000] of type: org.apache.camel.support.DefaultExchange on the exchange: Exchange[ED6D02F79FBB419-0000000000000000]
   ...
   ```
   
   # Affected versions:
   Quarkus,  at least from `2.13.x.Final` up to the current version (`3.0.1.Final`). 
   
   # Reproducer:
   - clone [this repository (`github.com`)](https://github.com/turing85/camel-simple-language-bug):
       ```bash
       git clone https://github.com/turing85/camel-simple-language-bug.git
       cd camel-simple-language-bug
       ```
   - Build the application:
       ```bash
       ./mvnw clean verify
       ```
   - Observe that the tests pass:
       ```bash
       ...
       [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
       ...
       ```
   - Build the application natively:
       ```bash
       ./mvn --define native clean verify
       ```
   - Observe that the tests fail with the above mentioned error in the application log, and an unexpected status code on the tests, reporting a status of `500` instead of the expected `200`:
       ```bash
       ...
       Caused by: org.apache.camel.component.bean.MethodNotFoundException: Method with name: getMessage() not found on bean: Exchange[FD7D7D11C0B4B98-0000000000000000] of type: org.apache.camel.support.DefaultExchange on the exchange: Exchange[FD7D7D11C0B4B98-0000000000000000]
       ...
       Expected status code <200> but was <500>.
       ...
       ```
   
   # Workaround
   Add the following to `application.yml`
   
   ```yaml
   quarkus:
     camel:
       native:
         reflection:
           include-patterns:
             - org.apache.camel.support.AbstractExchange
             - org.apache.camel.support.MessageSupport
   ```
   
   # Possible solution
   The corresponding extension should register those classes for reflection by default. This, however, begs the question: what else should be registered. Thus, we should analyze all relevant classes used by the `simple(...)` language and ensure that they all work as expected.


-- 
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] simple("${exchange.getMessage().getBody()}") causes a MethodNotFoundException in native mode [camel-quarkus]

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

   Yes, thanks for the reminder, @turing85!


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


Re: [I] simple("${exchange.getMessage().getBody()}") causes a MethodNotFoundException in native mode [camel-quarkus]

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

   @ppalaga can this issue be closed?


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


Re: [I] simple("${exchange.getMessage().getBody()}") causes a MethodNotFoundException in native mode [camel-quarkus]

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga closed issue #4860: simple("${exchange.getMessage().getBody()}") causes a MethodNotFoundException in native mode
URL: https://github.com/apache/camel-quarkus/issues/4860


-- 
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] ppalaga commented on issue #4860: Using simple("${exchange.getMessage().getBody()}") results in exception at runtime when compiling natively

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

   Thanks for the report, @turing85!


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