One Star

NullPointerException while running .bat file after job export

Hi All,
I created a simple Sql server connection job in Talend. It works fine inside TOS. I exported the job, copied the zip file to a windows machine and tried to run the .bat file. I get a nullpointerexception.
The nullpointerexception is as follows:
C:\Users\Administrator\Desktop\test_mssql_proc_1_0.1\test_mssql_proc_1>java -Xms256M -Xmx1024M -cp classpath.jar; test_schedule.test_mssql_proc_1_0_1.test_mssql_proc_1 --context=Default
Exception in component tMSSqlInput_2
java.lang.NullPointerException
at java.util.ArrayList.addAll(ArrayList.java:472)
at test_schedule.test_mssql_proc_1_0_1.test_mssql_proc_1.tMSSqlInput_2Process(test_mssql_proc_1.java:2000)
at test_schedule.test_mssql_proc_1_0_1.test_mssql_proc_1.tMSSqlInput_1Process(test_mssql_proc_1.java:980)
at test_schedule.test_mssql_proc_1_0_1.test_mssql_proc_1.runJobInTOS(test_mssql_proc_1.java:2297)
at test_schedule.test_mssql_proc_1_0_1.test_mssql_proc_1.main(test_mssql_proc_1.java:2192)
While exporting the job, I selected all the checkboxes (ie, shell launcher, system &user routines, required talend modules, java classes, source files, export dependencies, context scripts.
Can anyone tell me if I'm missing something.
Thanks in advance.
Paulina.
2 REPLIES
Seventeen Stars

Re: NullPointerException while running .bat file after job export

hi paulina
can we have more details about this tMSSqlInput_2 that to be "guilty" !?
regards
laurent
One Star

Re: NullPointerException while running .bat file after job export

Hi Laurent,
The tMSSqlInput_2 is just an input MS SQL input connection. I've attached the screenshot of the component.
The NullpointerException seems to be arising from the line
talendToDBList_tMSSqlInput_2.addAll(MetaDataTalendType.getTalendToDBList("mssql_id","id_Double"));
(Line #3 in the code below)

if (tmpContent_tMSSqlInput_2 != null) {
java.util.List<String> talendToDBList_tMSSqlInput_2 = new java.util.ArrayList();
talendToDBList_tMSSqlInput_2
.addAll(MetadataTalendType
.getTalendToDBList("mssql_id",
"id_Double"));
talendToDBList_tMSSqlInput_2
.addAll(MetadataTalendType
.getTalendToDBList("mssql_id",
"id_Float"));
if (talendToDBList_tMSSqlInput_2
.contains(rsmd_tMSSqlInput_2
.getColumnTypeName(2).toUpperCase(
java.util.Locale.ENGLISH))) {
row2.DEPT_NAME = FormatterUtils
.formatUnwithE(Double
.valueOf(tmpContent_tMSSqlInput_2));
} else {
row2.DEPT_NAME = tmpContent_tMSSqlInput_2;
}
} else {
row2.DEPT_NAME = null;
}

Really appreciate any help.
Thanks,
Paulina.
/Users/paulina/Desktop/mssql_input_2.png