Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Running batch file Error

Hi everyone,
When I run the batch file of an exported job, java.lang.NullPointerException occurs.
I have used "tWebService" item in that job.When I run that job in Talend, everything works fine.
When I run the batch file, the error "java.lang.NullPointerException" occurs.
When I run the batch file of job without using tWebService item, everything works fine.
I think some java setting I have made is wrong. But I don't exactly know which setting is the reason.
Other Informations:
TDI 5.5.0
Java : jdk1.7.0_17
Talend Java Interpreter Setting : C:\Program Files\Java\jdk1.7.0_17\bin\java.exe
Build Job  -> Bulid Type -> Standalone Job.
Error Details:
Exception in component tWebService_1
java.lang.NullPointerException
        at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:19
0)
        at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:144)
        at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:139)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.compileJavaSrc(D
ynamicClientFactory.java:610)
        at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(Dyn
amicClientFactory.java:369)
        at org.talend.webservice.helper.ServiceInvokerHelper.createClient(Servic
eInvokerHelper.java:144)
        at org.talend.webservice.helper.ServiceInvokerHelper.getClient(ServiceIn
vokerHelper.java:135)
        at org.talend.webservice.helper.ServiceInvokerHelper.invoke(ServiceInvok
erHelper.java:236)
        at ws_test.customermasterupdatews_1_1.CustomerMasterUpdateWS.tFileInputD
elimited_1Process(CustomerMasterUpdateWS.java:1559)
        at ws_test.customermasterupdatews_1_1.CustomerMasterUpdateWS.runJobInTOS
(CustomerMasterUpdateWS.java:1905)
        at ws_test.customermasterupdatews_1_1.CustomerMasterUpdateWS.main(Custom
erMasterUpdateWS.java:1788)
Labels (3)
1 Solution

Accepted Solutions
Jcs19
Creator II
Creator II

Hi Jcs19,
It occurs another error.
.
Regards, May T.

Use \ instead of /
and make sure you didn't forget quotes

View solution in original post

14 Replies
Anonymous
Not applicable
Author

Hi May,
Can you show the webservices screenshot and job design?
Vaibhav
Anonymous
Not applicable
Author

Hi  Vaibhav,
This is my job design.
0683p000009MEd8.png

Regards, May T.
Jcs19
Creator II
Creator II

Hello,
1) Is your batch file on the same machine ? 
2) Sometimes the batch file exported by Talend is not using the same java as in Talend Open Studio and it may create bugs
To force the batch file to use the same version : 
go to TOS, click on window -> preferences -> talend -> Java interpreter and copy the path (ex : C:\Program Files (x86)\Java\jre7\bin\java.exe)
Now right click your batch file, edit it and replace "java" by "C:\Program Files (x86)\Java\jre7\bin\java.exe" (or your path)
retry
Anonymous
Not applicable
Author

Hi,
Did you install studio on a machine then execute .bat file in another one? If so, in order to execute Exported Talend Job outside of Talend studio, you also need compatible java version.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
1)Yes.
2)Do you mean manually edit the batch file?
eg; My batch is..
%~d0
 cd %~dp0
 java -Xms256M -Xmx1024M -cp ../lib/activation.jar;../lib/asm-3.3.1.jar;../lib/commons-beanutils-1.8.3.jar;../lib/commons-codec-1.7.jar;../lib/commons-collections-3.2.1.jar;../lib/commons-httpclient-3.1.jar;../lib/commons-lang-2.6.jar;../lib/commons-logging-1.1.1.jar;../lib/cxf-2.7.7-modified.jar;../lib/cxf-xjc-boolean-2.6.2.jar;../lib/cxf-xjc-bug671-2.6.2.jar;../lib/cxf-xjc-dv-2.6.2.jar;../lib/cxf-xjc-runtime-2.6.2.jar;../lib/cxf-xjc-ts-2.6.2.jar;../lib/dom4j-1.6.1.jar;../lib/geronimo-jaxws_2.2_spec-1.1.jar;../lib/httpasyncclient-4.0-beta3.jar;../lib/httpclient-4.2.5.jar;../lib/httpcore-4.2.4.jar;../lib/httpcore-nio-4.2.4.jar;../lib/javax.ws.rs-api-2.0-m10.jar;../lib/jaxb-impl-2.2.6-modified.jar;../lib/jaxb-xjc-2.2.6-modified.jar;../lib/jaxp-api.jar;../lib/jaxp-ri.jar;../lib/mail.jar;../lib/neethi-3.0.2.jar;../lib/serializer-2.7.1.jar;../lib/stax2-api-3.1.1.jar;../lib/talend-ws-1.0.jar;../lib/talendcsv.jar;../lib/talend_file_enhanced_20070724.jar;../lib/velocity-1.7.jar;../lib/woodstox-core-asl-4.2.0.jar;../lib/wsdl4j-1.6.3.jar;../lib/xalan-2.7.1.jar;../lib/xmlschema-core-2.0.3.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;customermasterupdatews_1_1.jar; ws_test.customermasterupdatews_1_1.CustomerMasterUpdateWS --context=Default %*
Do I need to replace "java" to the path "C:\Program Files\Java\jdk1.7.0_17\bin\java.exe"  in above codes?
Regards, May T.
Anonymous
Not applicable
Author

Hi  Sabrina,

It's same machine.

Regards, May T.
Jcs19
Creator II
Creator II

Hi,
1)Yes.
2)Do you mean manually edit the batch file?
eg; My batch is..
%~d0
 cd %~dp0
 java -Xms256M -Xmx1024M -cp ../lib/activation.jar;../lib/asm-3.3.1.jar;../lib/commons-beanutils-1.8.3.jar;../lib/commons-codec-1.7.jar;../lib/commons-collections-3.2.1.jar;../lib/commons-httpclient-3.1.jar;../lib/commons-lang-2.6.jar;../lib/commons-logging-1.1.1.jar;../lib/cxf-2.7.7-modified.jar;../lib/cxf-xjc-boolean-2.6.2.jar;../lib/cxf-xjc-bug671-2.6.2.jar;../lib/cxf-xjc-dv-2.6.2.jar;../lib/cxf-xjc-runtime-2.6.2.jar;../lib/cxf-xjc-ts-2.6.2.jar;../lib/dom4j-1.6.1.jar;../lib/geronimo-jaxws_2.2_spec-1.1.jar;../lib/httpasyncclient-4.0-beta3.jar;../lib/httpclient-4.2.5.jar;../lib/httpcore-4.2.4.jar;../lib/httpcore-nio-4.2.4.jar;../lib/javax.ws.rs-api-2.0-m10.jar;../lib/jaxb-impl-2.2.6-modified.jar;../lib/jaxb-xjc-2.2.6-modified.jar;../lib/jaxp-api.jar;../lib/jaxp-ri.jar;../lib/mail.jar;../lib/neethi-3.0.2.jar;../lib/serializer-2.7.1.jar;../lib/stax2-api-3.1.1.jar;../lib/talend-ws-1.0.jar;../lib/talendcsv.jar;../lib/talend_file_enhanced_20070724.jar;../lib/velocity-1.7.jar;../lib/woodstox-core-asl-4.2.0.jar;../lib/wsdl4j-1.6.3.jar;../lib/xalan-2.7.1.jar;../lib/xmlschema-core-2.0.3.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;customermasterupdatews_1_1.jar; ws_test.customermasterupdatews_1_1.CustomerMasterUpdateWS --context=Default %*
Do I need to replace "java" to the path "C:\Program Files\Java\jdk1.7.0_17\bin\java.exe"  in above codes?
Regards, May T.

yes, tell me if its working
Anonymous
Not applicable
Author

Hi   Jcs19,
It occurs another error.
.
Regards, May T.
Jcs19
Creator II
Creator II

Hi Jcs19,
It occurs another error.
.
Regards, May T.

Use \ instead of /
and make sure you didn't forget quotes