javaandroidftpsapache-commons-netnosuchfileexception

No field sessionHostPortCache - Apache Commons Net store file


I have a Problem with storing files to a FTPS server. I'm using the Apache Commons Net FTPSClient to store the files.

First I got the following problem: "522 SSL connection failed: session reuse required". I was able to solve this problem with the following website: How to connect to FTPS server with data connection using same TLS session?

But with this solution I got a new error and I dont know how to solve this error:

"I/System.out: java.lang.NoSuchFieldException: No field sessionHostPortCache in class Lcom/android/org/conscrypt/ClientSessionContext; (declaration of 'com.android.org.conscrypt.ClientSessionContext' appears in /apex/com.android.conscrypt/javalib/conscrypt.jar)"

I know its exists already a very similar Question Android - FTPS Session Reuse - No field sessionHostPortCache. I think I have the exact same problem. But the answer didn't helped me.

I hope someone can help me. Thank you!


Solution

  • So finally I found a Solution, wich work for me. I found a Solution for my first Problem "522 SSL connection failed: session reuse required". The Problem was not my Code, it was a Property on the server side. In my Case the Property require_ssl_reuse was activated, but not necessary, so i set the Value of the Property to false and now it worked