Error: Could not create the Java Virtual Machine: Ubuntu

Highlighted
Seven Stars

Error: Could not create the Java Virtual Machine: Ubuntu

Hi,

I know there are a lot of question like this, but I cannot find a solution. I am executing a shell I have created to run my Talend Job. I got the following error:

 

error.png

I have other shell created in the same way which work with Talend Job, but I never got this error. 

After build the job, I tried to run the unix shell auto-generated and it works fine. I also pass three external parameters as --context param ...

 

This is the .sh I am using in unix:

 

#parametri che passo a Talend#
fileDirectory=$1
CODE_TIPO_ELAB=$2
ATTR_EXT_UID_ELAB=$3

ROOT_PATH="/myRootPath/"

echo "Eseguo mainImpA_Prodotto_Fasce"

java -Xms256M -Xmx1024M -cp $ROOT_PATH/lib/*:/mainImpA_Prodotto_Fasce/mainimpa_prodotto_fasce_0_1/acq/mainimpa_prodotto_fasce_0_1/mainImpA_Prodotto_Fasce -context_param fileDirectory=$1 -context_param CODE_TIPO_ELAB=$2 -context_param ATTR_EXT_UID_ELAB=$3

 

Why I am geting this error?

 

Seven Stars JGM
Seven Stars

Re: Error: Could not create the Java Virtual Machine: Ubuntu

change "-context_param" to "--context_param" (two dashes instead of one)
Seven Stars

Re: Error: Could not create the Java Virtual Machine: Ubuntu

I already tried this, but it does not works. I got the same error. I noted that in the shell made of my own (calling talend) I have to use single dashes instead of two. Otherwise I got error. I do not know the reason.

In this case, if I use Talend shell auto-generated by building job I am able to pass --context param with no errors.

But, I need my own shell because I have a java process behind Talend. So, I still facing the error.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download