Details
-
Bug
-
Resolution: Won't Do
-
Major
-
fuse-7.11.1-GA
-
None
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