Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am actually using Talend DI for ESB (6.3.1), and I have some routes connecting to a SFTP Server, thus I have properties defined in route, such as the SFTP password.
I wish to encrypt those properties, so I am trying to use jasypt for that.
But the route can not load the jasypt library
Cannot find class [org.apache.camel.component.jasypt.JasyptPropertiesParser] for bean with name 'jasypt' defined in class path resource [META-INF/spring/simpleroute.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.camel.component.jasypt.JasyptPropertiesParser org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.camel.component.jasypt.JasyptPropertiesParser] for bean with name 'jasypt' defined in class path resource [META-INF/spring/simpleroute.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.camel.component.jasypt.JasyptPropertiesParser
Here is what I done, based on multiple sources from internet;
- I made 2 beans in the spring xml : jasypt, to define the jasypt properties parser, and properties, a properties component (file attached : simpleRoute_springConfig.xml)
To include the jasypt library, I tried those methods :
1/ include via the route dependencies - creating a jasypt resources, and using it in the route dependencies (file attached : jasypt_dependencies.png)
2/ include the jasypt library in the Talend directory "container/lib/ext"
Both methods did not work.
Can you please explain to me how to include jasypt properly in a route?
Thanks in advance!
I could use jasypt putting the jar in ...\Studio\plugins\org.talend.libraries.esb_your_version\lib
No need to change the spring configuration or route dependancies, I just call a java bean that imports import org.jasypt.util.text.BasicTextEncryptor;
Hello,
thanks for the reply, but this is not solving my problem, or I am doing it wrong.
Following your instructions, I made a Bean "jasypt", including the jasypt import and a function to decrypt the values of a parameter. ==> this works in java.
But the values I need to decrypt are camel properties.
Those properties are loaded by the route in a cConfig component, using a PropertiesComponent (org.apache.camel.component.properties.PropertiesComponent) and the .setLocation() function.
I can then use the {{property}} syntax to use my properties, but this cannot be used/called for java functions => I cannot use the jasypt bean to decode those properties.
I saw on some sources that I define a jasypt property parser on my PropertiesComponent, but nothing works at the moment.