I'm using Apache Camel in a project. When I needed to use the FTP component to transfer files to a remote server, I faced this exception:
com.jcraft.jsch.JSchException: Session.connect: java.security.NoSuchAlgorithmException: DH KeyPairGenerator not available
I was wondering what could have been the cause of this, because, theoretically, I did everything right as the documentation points out ... So, I decided to make a quick project just to test it, I just copied and pasted the code and it worked! But where it should work, it does not work at all! I looked at the settings and apparently everything is identical!
from("file:data/input?noop=true")
.log("Uploading file ${file:name}")
.to("sftp://www.mydestination.com:22/../opt/tmp?autoCreate=false&username=MyUser&password=MyPassword&passiveMode=true")
.log("Uploaded file ${file:name} complete.");
I'm using Apache Karaf to run OSGI Bundles (which is the case with my application). I do not know if that would influence, but I found it important to be healthy. In addition, I did the test in several environments, that is, the problem really is in the project: /
Honestly, I have no idea what it can be. Would anyone have any ideas or suggestions that could help?