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

Camel on EAP: bean substitution into Camel endpoint does not work with Spring XML DSL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • fuse-7.13-GA
    • fuse-7.11.1-GA
    • Camel
    • None
    • False
    • None
    • False
    • % %
    • Todo
    • Hide

      Workaround is to define routes and proxies using the Java DSL.

      Show
      Workaround is to define routes and proxies using the Java DSL.
    • Important
    • Very Likely

    Description

      There is problem with substituting values from the Camel registry when a Camel
      route is defined in Spring XML on JBoss EAP. The same method works fine when the
      exact same Spring code is used in a Spring Boot application.

      Although the problem manifests itself when using the camel-ftp endpoint with an
      SFTP proxy, I don't think the specifics of the application are particularly
      relevant. Rather, I think there's a general problem with endpoint value substitution
      with Fuse on EAP.

      The Camel route uses the exact method of defining a proxy that is given in the
      camel-sftp documentation[1]. That is, it uses `<bean>` to create an instance of
      `com.jcraft.jsch.ProxyHTTP`, and then uses the endpoint attribute `proxy=`
      to try to load the bean from the Camel registry. Unfortunately, this fails:
      although the proxy bean has the id `proxy`, using `proxy=#proxy` on the
      camel-ftp endpoint leads to the `setProxy()` method being called with the string
      `#proxy`, and not the value of the bean. That is, the substitution of values
      into the Camel endpoint is not taking place.

      The error message has the form:

       

      Caused by: java.lang.IllegalArgumentException: Could not find a suitable setter
      for property: proxy as there isn't a setter method with same type:
      java.lang.String nor type conversion possible: No type converter available to
      convert from type: java.lang.String to the required type: com.jcraft.jsch.Proxy
      with value #proxy"
       

      Steps to reproduce:

      1. Unpack and build `pocFuseProxyINT.zip`
      2. Deploy the WAR on EAP
      3. Look for the error message in the log

       

      Attachments

        Activity

          People

            rnetuka@redhat.com Radovan Netuka
            rhn-support-kboone Kevin Boone
            Branislav Smolicek Branislav Smolicek
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: