Transfer File Node: Unable to make field private final (since 4.6.0)

Hi,

I get the following error when I try to transfer a file to a FTP folder. I haven’t had this issue with versions before 4.6.0.

Is there anything I could do? Thanks!

ERROR Transfer Files       3:41       Execute failed: Unable to make field private final sun.security.util.Cache sun.security.ssl.SSLSessionContextImpl.sessionHostPortCache accessible: module java.base does not "opens sun.security.ssl" to unnamed module @3c865a8

Hi @Awiener

Sorry to hear you encounter problems! Could you share some more details?
I’ll create a ticket for that.

Best,
Alice

2 Likes

Hi Alice,

thanks! It’s a pretty simple workflow: I want to upload a CSV to a FTP folder. I use the following workflow:

Issue FTP

And there I get the error message from my first post:

ERROR CSV Writer           4:16       Execute failed: Unable to make field private final sun.security.util.Cache sun.security.ssl.SSLSessionContextImpl.sessionHostPortCache accessible: module java.base does not "opens sun.security.ssl" to unnamed module @69231cd1

Same with Transfer File Node.

BTW, I use JDK 17.0.3.1. Could that be an issue?

Thanks for your help! Cheers!

The problem is likely related to the Java 17 update. Can you post the complete stack trace of the error from KNIME’s log file? This will be helpful to narrow down the issue.

2 Likes

here you go:

2022-06-30 21:01:04,376 : WARN  : KNIME-Worker-10-Excel Reader 3:39 :  : Node : Transfer Files : 3:41 : No connection available. Execute the connector node first.
2022-06-30 21:01:04,917 : ERROR : KNIME-Worker-5-CSV Writer 3:16 :  : Node : CSV Writer : 3:16 : Execute failed: Unable to make field private final sun.security.util.Cache sun.security.ssl.SSLSessionContextImpl.sessionHostPortCache accessible: module java.base does not "opens sun.security.ssl" to unnamed module @26d2b53e
java.lang.reflect.InaccessibleObjectException: Unable to make field private final sun.security.util.Cache sun.security.ssl.SSLSessionContextImpl.sessionHostPortCache accessible: module java.base does not "opens sun.security.ssl" to unnamed module @26d2b53e
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(Unknown Source)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Unknown Source)
	at java.base/java.lang.reflect.Field.setAccessible(Unknown Source)
	at org.knime.ext.ftp.filehandling.fs.FtpsClientWithSslSessionReuse._prepareDataSocket_(FtpsClientWithSslSessionReuse.java:148)
	at org.apache.commons.net.ftp.FTPSClient._openDataConnection_(FTPSClient.java:623)
	at org.apache.commons.net.ftp.FTPClient._storeFileStream(FTPClient.java:719)
	at org.apache.commons.net.ftp.FTPClient.storeFileStream(FTPClient.java:706)
	at org.apache.commons.net.ftp.FTPClient.storeFileStream(FTPClient.java:2060)
	at org.knime.ext.ftp.filehandling.fs.FtpClient.openForRewrite(FtpClient.java:258)
	at org.knime.ext.ftp.filehandling.fs.FtpFileSystemProvider.newOutputStreamInternal(FtpFileSystemProvider.java:208)
	at org.knime.ext.ftp.filehandling.fs.FtpFileSystemProvider.newOutputStreamInternal(FtpFileSystemProvider.java:1)
	at org.knime.filehandling.core.connections.base.BaseFileSystemProvider.newOutputStream(BaseFileSystemProvider.java:500)
	at java.base/java.nio.file.Files.newOutputStream(Unknown Source)
	at org.knime.filehandling.core.connections.FSFiles.newOutputStream(FSFiles.java:136)
	at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeModel.createOutputStream(CSVWriter2NodeModel.java:214)
	at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeModel.writeToFile(CSVWriter2NodeModel.java:167)
	at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeModel.execute(CSVWriter2NodeModel.java:147)
	at org.knime.base.node.io.filehandling.csv.writer.CSVWriter2NodeModel.execute(CSVWriter2NodeModel.java:1)
	at org.knime.core.node.NodeModel.executeModel(NodeModel.java:549)
	at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1267)
	at org.knime.core.node.Node.execute(Node.java:1041)
	at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:595)
	at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
	at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
	at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
	at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:367)
	at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:221)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
	at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)

Does that help?

I got the same error. Since I really needed that workflow to work I downgraded back to the latest 4.5 release and its working like a champ again.

Hi @Awiener, hi @jguidera

Can you try adding the following line to the knime.ini file of your 4.6 installation?
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED

This should fix this issue. We will release a fix with 4.6.1.

best,
Gabriel

1 Like

thanks, got a new error message now:

Execute failed: Unable to make public synchronized void sun.security.util.MemoryCache.put(java.lang.Object,java.lang.Object) accessible: module java.base does not "opens sun.security.util" to unnamed module @235d7467

Hi @Awiener,

thank you for the quick response, in that case add the following line as well:
--add-opens=java.base/sun.security.util=ALL-UNNAMED

best,
Gabriel

1 Like

Hi Gabriel,

thanks, that helped, works now :+1:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.