Java Exit Code 2

Hi,

I'm trying to execute a set of Knime Work Flows from a batch file.  The batch file has these lines:
cd c:\Knime_3.3.1

knime -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\users\opolyakov\knime-orkspaceAcademicData_LDAP"

knime -nosplash -reset -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir="C:\users\opolyakov\knime-workspace\K4_HWT_Load"

The 2nd line in the batch file executes fine.  The first line, which is the one I've recently added, throws the error message shown in the attached screenshot.  The workflow executes fine when I run it from within Knime.

Does anybody know what my error is?
Many Thanks,

Olga

1 Like

Hey Olga,

Is the path "C:\users\opolyakov\knime-orkspaceAcademicData_LDAP" to the workflow correct? There seems to be a "w" missing at orkspace and maybe a "\" after workspace?

Best regards,

Christian

1 Like

Hi Christian,

Thanks for the response!  Yes, one of the errors was a typo. 

The other one seems to be a that the nodes that read the file are disappearing.  That is, when I reopen the workflow, there is blank space where I had the ndoes, and only the concatanate nodes and everything downstream is left in place. I just posted question about it.  https://tech.knime.org/forum/knime-general/disappearing-excel-nodes

Maybe you have an idea of what might be causing this?  

Thanks,
Olga

1 Like

i have the same issue . I am trying to workflow like ;

knime -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION workflowDir=“C:\Users\user314\knime-workspace\KNIME_project2”

But getting Java was started but returned exit code=2

i am able to run with knime gui . but not able to on windows terminal.

Hi Omer, did you able to solve this issue ?

Hello,

I get the Java Exit Code 2

“C:\Program Files\KNIME\KNIME Analytics Platform\knime” -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\Users\sus\knime-workspace5\Sol_Server”

Any idea what is wront.

the Gui and on the Knime Server, it runs.

Occasionally I’ve had bugs (can’t remember if it was Java code 2 though) due to file reference type I was using as knime batch doesn’t like certain reference types (eg. Knime.mountpoint).

Try pointing your workflow to read/write to local paths (eg. C:/Docs/…) to see if that may be the cause of the error.

Good luck!

Hi,

try this one:

“C:\Program Files\KNIME\KNIME Analytics Platform\knime.exe” -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowDir=“C:\Users\sus\knime-workspace5\Sol_Server”

no, this is not working.

I added the message as PDF.

What I also did, due to, I can write stupid things behind “workflowDir” → I got always the same error.

I tried to change the “profileLocation” (in the first try, it looks to a server) – now there are two “profileLocation”.

Not sure, but, the error comes up soon, could it be, the timeout to call KNIME is to small?

KNIME_Batch_Error.docx (1.2 MB)

Here is the screenshot (Word instead of PDF)

Hi everyone,
I have the same issue with “returned code = 2”
my code is:

set workflow=“C:\user\Desktop\Batch.knwf”
set knimepath=“C:\Program Files\KNIME\knime.exe”
%knimepath% -nosave -reset -nosplash -application org.knime.product.KNIME_BATCH_APPLICATION -workflowFile=%workflow%

can someone help me with my issue?