Java Edit Variable Node error Configure failed (RuntimeException): An error occured in an expression with output flow variables.

I have a Java Edit Variable node in a simple workflow (KNIME 4.3.2) that calls a method in an external jar which returns a string. The external jar allows us to connect to a password repository which returns a password and then we put the password into a flow variable which is provided to a Variable to Credentials node. We have added the jar file under the workflow folder in a data folder and reference it via the Additional Libraries tab in the node via the KNIME URL: knime://knime.workflow/data/PasswordManager.jar.

On my laptop I am able to run it successfully. When I try to run it on the KNIME server via a scheduled task, we receive the error:

There are messages for workflow “PWManager_Test 2021-11-05 13.46.00”

  • Java Edit Variable 0:12 - ERROR: Configure failed (RuntimeException): An error occured in an expression with output flow variables.*

It looks like it is a configuration failure with either reading the jar or something else. Since the workflow runs properly (connecting and retrieving the password successfully from the password repository and putting it in a flow variable) on my local KNIME, it does not seem to be an issue with the definition or use of the flow variables themselves.

I included the code below from the Java Edit Variable. I cannot share the jar file due to proprietary reasons. The jar does expect a certain environment variable to exist for the user running the workflow, which we have setup for the server knime account. In the past if the environment variable was missing, we would have a different variable. Also when the jar file was not available we had a different error message, than this one.

Any suggestions as to where to look or focus on to fix this would be greatly appreciated.


A version of the code within the Java Snippet window is here:
// system imports
import org.knime.base.node.jsnippet.expression.AbstractJSnippet;
import org.knime.base.node.jsnippet.expression.Abort;
import org.knime.base.node.jsnippet.expression.Cell;
import org.knime.base.node.jsnippet.expression.ColumnException;
import org.knime.base.node.jsnippet.expression.TypeException;
import static org.knime.base.node.jsnippet.expression.Type.*;
import java.util.Date;
import java.util.Calendar;
import org.w3c.dom.Document;

// Your custom imports:
import com.test.passwordManager.PasswordManager;
// system variables
public class JSnippet extends AbstractJSnippet {
// Fields for input flow variables
/** Input flow variable: “knime.workspace” */
public String v_knimeworkspace;

// Fields for output flow variables
/** Output flow variable: “v_dbPassword” /
public String out_dbPassword;
* Output flow variable: “v_dbUserName” */
public String out_dbUserName;

// Your custom variables:

// expression start
public void snippet() throws TypeException, ColumnException, Abort {
// Enter your code here:
//Note: PasswordManager assumes that the PWR_USER_KEY environment variable is set on the
// machine where this code is run. It uses this key to connect and authenticate with
// the password Manager.

//set username – test username
String dbUserName = “test123”;

//Populate the knime output flow variables
//Call to PasswordManager with the test parameters
out_dbPassword = PasswordManager.getPassword(“Development”, “test”, dbUserName);
out_dbUserName = dbUserName;

// expression end


Hi @leslies,

I hope i understood your problem correctly.
You just need help to make your error message visible?

try to output a new string variable
out_error ="";
in the snippet and put it at the beginning of the java snippet execution and put your whole execution logic in a try/catch block with catch(Exception e)
out_error = e.getMessage();

then you should be able to at least see what your problem is :slight_smile:
Additionally you should be able to see the error message in the knime log on the server but this might be harder to find.


Hi @leslies,

Have you tried starting the job on the server and connecting to it with the remote workfow editor?
This should allow you to quickly iterate while debugging. I also suggest looking into the debug log of the executor the workflow is running on.



Hi @gab1one,

Thank you for your suggestion. Unfortunately, we do not have the server level that includes remote editing.


Hi Leslie,

you may be missing the “Remote Workflow Editor” extension. You can install it under File → Install KNIME Extensions…

Installing will take a while, but after a restart you should be able to select workflows on the server: right-click → Open → as new Job on Server.

Kind regards

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