Skip to main content

Greetings, IFS Community.

 

I am attempting to create a KNOWNHOST using the following command

 

java -cp C:\IFS\repository\server\javaruntime\ifs-fnd-connect.jar;C:\IFS\repository\server\dist\lib\jsch-0.1.53.jar ifs.fnd.connect.ftp.SftpClient -CreateKnownHosts=C:\IFS\knownhosts -hostname=EXAMPLE -username=EXAMPLE -password=EXAMPLE    

 

Please note the word EXAMPLE was used in place of the real words.

The following error has been encountered:

 

Error: Could nor find or load main class ifs.fnd.connect.ftp.SftpClient

 

 

Thanks,

JL

The error above was passed.

However, I am experiencing another error

 

Error: could not find or load main class C:\ifs\respository\server\javaruntime\jsch-0.1.50.jar

 

If I change jsch-0.1.53.jar, I will receive the same error

 

  Currently, I am trying to create a KNOWNHOST for a middleware running IFS 9.  

 

I am following the instructions from 

 

  Is there any way I can pass the error described above?  

 

Thanks,

JL


The error above was passed.

However, I am experiencing another error

 

Error: could not find or load main class C:\ifs\respository\server\javaruntime\jsch-0.1.50.jar

 

If I change jsch-0.1.53.jar, I will receive the same error

 

  Currently, I am trying to create a KNOWNHOST for a middleware running IFS 9.  

 

I am following the instructions from 

 

  Is there any way I can pass the error described above?  

 

Thanks,

JL

 

 

Hi @ZTC ZTC JGOTA 

Can you go to the C:\IFS\repository\server\dist\lib\ location and check what’s the exact file name for jsch-xxxx.jar jar and use it in the knownhost creation. I remember in somewhere in Apps10, there was an upgrade to use a newer version from of jsch.

 

Cheers!

Damith


Hello @dsj 

 

Thanks so much for your answer.

 

The following jars are located in the directory C:/ifs/javaruntime/ and the directory C:\IFS\repository\server\dist\lib\

jsch-0.1.31.jar

jsch-0.1.50.jar

jsch-0.1.53.jar

 

When I run the Java compilation code

 

java -cp C:\ifs\javaruntime\ifs-connector-sftp.jar; C:\ifs\javaruntime\jsch-0.1.53.jar ifs.fnd.connectserver.sftp.SftpCreateFiles -CreateKnownHosts=C:\ifs\KNOWNHOSTS  - hostname=ftp.pageroonline.com  -username=XXXXXXX  -password=XXXXXXXX

 

There is still the same error message: "Could not find or load the main class C:/ifs/javaruntime/jsch-0.1.53.jar"

 

No matter the jar version I still receive the same error, I even pointed the jsch-0.1.53.jar using the path you provided in your answer

java -cp C:\ifs\javaruntime\ifs-connector-sftp.jar; C:\IFS\repository\server\dist\lib\jsch-0.1.53.jar ifs.fnd.connectserver.sftp.SftpCreateFiles -CreateKnownHosts=C:\ifs\KNOWNHOSTS  - hostname=ftp.pageroonline.com  -username=XXXXXXX  -password=XXXXXXXX

Same error “Could not find or load main class C:\ifs\javaruntime\jsch-0.1.53.jar”

 

Any idea?


Hi @ZTC ZTC JGOTA 

sometimes knownhost generation jars can not identify certain characters in SFTP password. For example ‘<’ and ’>’ are such characters. can you check changing password if required?


Hello @Ruchira   @dsj 

 

The password does not have any special Characters. Just number and letters. 

Any idea why I am keeping getting  the same error

“Could not find or load main class \javaruntime\jsch-0.1.50.jar”

or 

“Could not find or load main class \javaruntime\jsch-0.1.53.jar”

 

Thanks,

JL


Hi again,

Looks like your jars are from different versions. Can you try downloading the latest jars from the documentation web site? It’s from the cloud version but should not be a problem for the KNOWHOSTS file generation


https://docs.ifs.com/techdocs/21r2/045_administration_aurena/240_integration/300_ifs_connect/010_configure_connect/060_transport_connectors/configure_sftp_transport_connector/#server-authentication-settings

 


Hello @Ruchira  @dsj 

 

I was able to accomplished this task using help from both of you.

I needed to point to jsch using the path C:\ifs\repository\server\dist\lib\ (Recommendation from @dsj )

I download the JSCH-0.1.55.jar version following the recommendation from @Ruchira 

 

java -cp C:\ifs\repository\server\javaruntime\ifs-connector-sftp.jar;C:\ifs\repository\server\dist\lib\jsch-0.1.53.jar ifs.fnd.connectserver.sftp.SftpCreateFiles -CreateKnownHosts=C:\ifs\knownhosts.txt -hostname=ftp.EXAMPLE.com -username=USERNAME  -password= “PASSWORD”

 

The script above is how I was able to accomplish the task. 

 

Thanks,

JL


 


Reply