[KNIME 4.6] GET Request not working on Batch Mode "ExceptionInInitializerError"

Hi team, can someone help on this one?

I recently updated to 4.6 and since then my workflows that have a GET Request are not working when in batch mode. When I open Knime and manually run them they are working ok. I have already tried reinstalling the REST Client extension but the same issue happens.

Below is the error.

Thanks for any help,

2022-06-28 08:19:56,217 : ERROR : GET Request : Execute failed: ("ExceptionInInitializerError"): null
java.lang.ExceptionInInitializerError
	at org.knime.rest.nodes.common.RestNodeModel.invoke(RestNodeModel.java:562)
	at org.knime.rest.nodes.common.RestNodeModel.lambda$0(RestNodeModel.java:406)
	at org.knime.rest.util.DelayPolicy.doWithDelays(DelayPolicy.java:184)
	at org.knime.rest.nodes.common.RestNodeModel.makeFirstCall(RestNodeModel.java:406)
	at org.knime.rest.nodes.common.RestNodeModel.execute(RestNodeModel.java:365)
	at org.knime.core.node.NodeModel.execute(NodeModel.java:758)
	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)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private static volatile java.net.Authenticator java.net.Authenticator.theAuthenticator accessible: module java.base does not "opens java.net" to unnamed module @2b3cbc2c
	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.core.util.ThreadLocalHTTPAuthenticator.<clinit>(ThreadLocalHT

What is the exact command line that you use to run the workflow in batch mode? It seems some of the options defined in the knime.ini are not applied when running in batch mode.

Thanks for any help, the command is below.

I pass the Workflow Name as Parameter 1, the Directory to where Knime is, and where I want the log. But those are all ok.

%KNIME_DIR%\knime.exe -consoleLog -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -reset --launcher.suppressErrors -workflowDir="%WORKFLOW_DIR%\%~1" -preferences=%BATCH_DIR%\Defaults\default.epf -vmargs -Xms2048m -Xmx3072m -Dlog4j.configuration=%BATCH_DIR%\Defaults\log4j3.xml

You are using -vmargs on the command line. This option overrides any VM arguments that are defined in the knime.ini including the ones that prevent the error you are seeing from happening. Either you don’t pass -vmargs on the command line or you need to add all options that are in the knime.ini as well.

1 Like

Thank you. Adding all the -vmargs from the .ini file solved this. It is interesting that before Knime 4.6 this didn’t happen in my particular case, I think it is around one of the --add-opens that fixes this for the REST nodes.

Thanks again!

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