Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18650

MethodNotFoundException when body.getClass is called in Quarkus Native

XMLWordPrintable

      Following route:

      from("direct:processor")
          .process(new TransformationProcessor())
          .log("Body is:\"${in.body}\" - ${body.getClass}"); 

      return correct classes for Quarkus and Camel-K but it is failing for Quarkus Native with the following error (integer class as an example, It fails for other classes as well):

      org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: getClass on null due to: org.apache.camel.component.bean.MethodNotFoundException: Method with name: getClass not found on bean: 342 of type: java.lang.Integer on the exchange: Exchange[0E2349EA2F7CD6C-0000000000000008] 

      RegisterForReflection is present:

      @RegisterForReflection(targets = {
          java.lang.Integer.class
      }) 

              jnethert@redhat.com James Netherton
              mmajerni@redhat.com Mario Majernik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: