You will find Talend Errors and solutions, Optimization, Tips & Tricks, Performance, Components Explanations ... and much more.
Tuesday, 5 June 2018
Wednesday, 25 April 2018
Handling NULL POINTER EXCEPTION
1ST WAY USAGE:
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
2ND WAY USAGE:
( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
? "HAVING NULL" : "HAVING DATA"
=======================================================
Below is the Tested Talend code in DETAIL with various ways of NULL data:
=======================================================
String test_string="TALEND";
System.out.println("\ntest_string=\"TALEND\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string="null";
System.out.println("\ntest_string=\"null\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string="";
System.out.println("\ntest_string=\"\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string=null;
System.out.println("\ntest_string=null;");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
2ND WAY USAGE:
( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
? "HAVING NULL" : "HAVING DATA"
=======================================================
Below is the Tested Talend code in DETAIL with various ways of NULL data:
=======================================================
String test_string="TALEND";
System.out.println("\ntest_string=\"TALEND\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string="null";
System.out.println("\ntest_string=\"null\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string="";
System.out.println("\ntest_string=\"\";");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
test_string=null;
System.out.println("\ntest_string=null;");
if( (Relational.ISNULL(test_string)) || ("null".equals(test_string)) || ("".equals(test_string)) )
System.out.println("HAS GOT A NULL VALUE ");
else
System.out.println("HAS GOT A VALID VALUE ");
Relational.ISNULL() USAGE WITH RESULTS
System.out.println("Relational.ISNULL(null) : "+Relational.ISNULL(null));
System.out.println("Relational.ISNULL(\"null\") : "+Relational.ISNULL("null"));
System.out.println("Relational.ISNULL(\"\") :"+Relational.ISNULL(""));
System.out.println("Relational.ISNULL(false) : "+Relational.ISNULL(false));
System.out.println("Relational.ISNULL(true) : "+Relational.ISNULL(true));
============
OUTPUT :
===========
Relational.ISNULL(null) : true
Relational.ISNULL("null") : false
Relational.ISNULL("") :false
Relational.ISNULL(false) : false
Relational.ISNULL(true) : false
System.out.println("Relational.ISNULL(\"null\") : "+Relational.ISNULL("null"));
System.out.println("Relational.ISNULL(\"\") :"+Relational.ISNULL(""));
System.out.println("Relational.ISNULL(false) : "+Relational.ISNULL(false));
System.out.println("Relational.ISNULL(true) : "+Relational.ISNULL(true));
============
OUTPUT :
===========
Relational.ISNULL(null) : true
Relational.ISNULL("null") : false
Relational.ISNULL("") :false
Relational.ISNULL(false) : false
Relational.ISNULL(true) : false
TALEND CURRENT DATE FORMAT
Various ways of getting Current Date :
===============================
TalendDate.getDate("yyyy-MM-dd HH:mm:ss")
new Date()
TalendDate.getDate("yyyy-MM-dd'T'HH:mm:ss")
===============================
TalendDate.getDate("yyyy-MM-dd HH:mm:ss")
new Date()
TalendDate.getDate("yyyy-MM-dd'T'HH:mm:ss")
Exception in component tDecryptColumn_1
Exception in component tDecryptColumn_1
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:922)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2165)
at unified_platform_git.test_ram_0_1.TEST_RAM.tFixedFlowInput_8Process(TEST_RAM.java:2937)
at unified_platform_git.test_ram_0_1.TEST_RAM.runJobInTOS(TEST_RAM.java:5782)
at unified_platform_git.test_ram_0_1.TEST_RAM.main(TEST_RAM.java:5201)
Sol : Sol : The sequence of columns (in Edit Schema) used in tDecryptColumn_1 component should be same as the column sequence in the prior component.
Eg : Say, like you got the SCHEMA in tDecryptColumn_1 component as name,class,sharedsecret,password as the sequence.
Say like , we have used XMLMAP component prior to tDecryptColumn_1 component that has
sequence of columns(in Edit Schema) as name,class,password,,sharedsecret.
Then we will be getting the above error.
In order to avoid the error, we just need change the sequence of columns as below.
name,class,sharedsecret,password in EDIT SCHEMA of XMLMAP component.
javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:922)
at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:833)
at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446)
at javax.crypto.Cipher.doFinal(Cipher.java:2165)
at unified_platform_git.test_ram_0_1.TEST_RAM.tFixedFlowInput_8Process(TEST_RAM.java:2937)
at unified_platform_git.test_ram_0_1.TEST_RAM.runJobInTOS(TEST_RAM.java:5782)
at unified_platform_git.test_ram_0_1.TEST_RAM.main(TEST_RAM.java:5201)
Sol : Sol : The sequence of columns (in Edit Schema) used in tDecryptColumn_1 component should be same as the column sequence in the prior component.
Eg : Say, like you got the SCHEMA in tDecryptColumn_1 component as name,class,sharedsecret,password as the sequence.
Say like , we have used XMLMAP component prior to tDecryptColumn_1 component that has
sequence of columns(in Edit Schema) as name,class,password,,sharedsecret.
Then we will be getting the above error.
In order to avoid the error, we just need change the sequence of columns as below.
name,class,sharedsecret,password in EDIT SCHEMA of XMLMAP component.
Saturday, 20 January 2018
TALEND ERROR : DEBUGGING/TROUBLESHOOTING in TALEND
Sometimes, Talend (JAVA) works wierdly(To us, Actually it works correctly only by its nature).
It gives a ERROR specifying a COMPONENT name.
you/I will go to that specified COMPONENT and check the code.
All of the code is 100% correct.
Even it gives the ERROR in that COMPONENT only.
In this case How are we going to HANDLE?
SOL:
For Example :
A talend job consists of 3 flows.
Say,Each flow consists of 4 to 5 components.
In order to debug any kind of ERROR, just follow the BASIC thumb rule i am going to tell you.
and Most of the time 99.99% you will definitely find , where the job is EXACTLY failing.
you just got to DISABLE/DE-ACTIVATE the COMPONENTS one by one from the STARTING COMPONENT TO THE COMPONENT where it is giving ERROR.
MOSTLY, the ERROR occurs with the PRIOR component adjacent to the ERRORED component.
TALEND/TAC ERROR : CONNECTION TO THE SERVER FAILED in TAC (Talend Adminstrator Center)
0)Check the SERVERS section in the left hand pane whether the corresponding JOB SERVER is in RUNNING state or not.
If the JOBSERVER is not RUNNING, then RESTART the VM in which TAC is installed.
1)The job you deployed in TAC, might have been corrupted.
Hence BUILD the talend job again and re-deploy the job in TAC.
2)Check for the HARDDISK capacity in the VM in which TAC is installed.
If the HARDDISK size/capacity is very LOW then try to delete some of the UNNECESSARY data and try to RE-DEPLOY the job.
If the JOBSERVER is not RUNNING, then RESTART the VM in which TAC is installed.
1)The job you deployed in TAC, might have been corrupted.
Hence BUILD the talend job again and re-deploy the job in TAC.
2)Check for the HARDDISK capacity in the VM in which TAC is installed.
If the HARDDISK size/capacity is very LOW then try to delete some of the UNNECESSARY data and try to RE-DEPLOY the job.
Subscribe to:
Posts (Atom)
get it
http://hinekv1.ddns.net:8008/get.php?username=Varga_Florentina1tv&password=j5MgWBs18t&type=m3u_plus&output=mpegts http://www.lo...