"Java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024" When Uploading File to FTP Server (Doc ID 2126138.1)

Last updated on JUNE 27, 2017

Applies to:

Oracle WebLogic Server - Version 10.3.6 and later
Information in this document applies to any platform.

Symptoms

Getting error when doing an FTP file upload from application servlet in WebLogic 10.3.6 with JDK 1.7 to remote FTP server:

2016-02-04 00:26:04,482 | FATAL
com.******.processor.iso.FTPRequestProcessor:getFtpSession(903) : Error creating FTP session. Exception is Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive)
2016-02-04 00:26:04,484 | FATAL
com.******.processor.iso.FTPRequestProcessor:uploadFileToSFTP(686) : Error in uploading file to FTP server. Exception is
com.******.exceptions.SettlementException: CRITICAL_SFTP_CONNECTION_FAILED
at com.******.processor.iso.FTPRequestProcessor.getFtpSession(FTPRequestProcessor.java:907)
at com.******.processor.iso.FTPRequestProcessor.uploadFileToSFTP(FTPRequestProcessor.java:646)
at com.******.processor.iso.FTPRequestProcessor.createSettlementFileAndAppendData(FTPRequestProcessor.java:402)
at com.******.processor.iso.FTPRequestProcessor.processRequest(FTPRequestProcessor.java:134)
at com.******.processor.iso.RequestProcessorFactory.processRequest(RequestProcessorFactory.java:49)

......

Caused by: com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive)
at com.jcraft.jsch.Session.connect(Session.java:495)
at com.jcraft.jsch.Session.connect(Session.java:150)
at com.******.processor.iso.FTPRequestProcessor.getFtpSession(FTPRequestProcessor.java:896)
... 32 more
2016-02-04 00:26:04,488 | ERROR
com.******.processor.iso.FTPRequestProcessor:createSettlementFileAndAppendData(415) : ERROR_SFTP_Upload_File

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms