Five Stars

tWebservice: Nullpointer exception

Hi all,

 

the problem described here tWebservice - nullpointer exception is not solved for me at all. I'm still getting a nullpointer exception when I try to run the talend example job for the tWebservice component.

 

Exception in component tWebService_1
java.lang.NullPointerException
    at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:190)
    at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:144)
    at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:139)

Like suggested in previous posts, I switched to Java JDK 6 (u45) with no improvements (same error). I'm using talend open studio 6.4.0 on Windows 10.

 

Could you please help!

 

Kind regards

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: tWebservice: Nullpointer exception

Hi TalendDIUser

I have tested the scenario Getting country names trhrough a web service in the component document and it works. Below is my JRE configuration in preferences page.

1.png2.png

As I suggested, have a try to copy the jar file tools.jar from <jdk installation dir>/lib to <jre installation dir>/lib, let me know if it works.

 

Regards

Shong

 

----------------------------------------------------------
Talend | Data Agility for Modern Business
14 REPLIES
Nine Stars

Re: tWebservice: Nullpointer exception

First of all - JDK6(!!!) it was actual in 2013 and may be 2015 .. 

 

Talend newer than 6.4 require 1.8

 

please attach Your screenshots , because at least in last part of previous thread - error do not have nothing common with Java version 

 

regards, Vlad

-----------
Six Stars

Re: tWebservice: Nullpointer exception

I am also facing the same issue,i posted in the community stil with nohelpSmiley Sad. Itried using twebserviceinput and twebservice and setting the JDK path etc.

 

Also tried with tsoap component also, no luck,But tht is giving a different error.Please help wht might be gng wrong.Screenshots are mentioned in the post "Twebserviceinput-giving-NUllpointer-exception"

 

 

Community Manager

Re: tWebservice: Nullpointer exception

Hello sanjana
Try to copy the jar file tools.jar from <JDK installation dir>/lib to <JRE installation dir>/lib.
Let me know if it works.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Nine Stars

Re: tWebservice: Nullpointer exception


sanjana wrote:

I am also facing the same issue,i posted in the community stil with nohelpSmiley Sad. Itried using twebserviceinput and twebservice and setting the JDK path etc.

 

Also tried with tsoap component also, no luck,But tht is giving a different error.Please help wht might be gng wrong.Screenshots are mentioned in the post "Twebserviceinput-giving-NUllpointer-exception"

 

 


do You try to do suggested by Sabrina?

-----------
Six Stars

Re: tWebservice: Nullpointer exception

yes vapukov  i did tried it long back only mapping the ports,but still the same error

Six Stars

Re: tWebservice: Nullpointer exception

Shong,

 

After dng this shd i set the jre path in prefereneces/talend/java-jre path? 

Six Stars

Re: tWebservice: Nullpointer exception

After dng this instead of job getting failed with null pointer exception,the ouput is displayed as null in tlogrow .
tarting job j_webservice at 10:18 08/06/2017.

[statistics] connecting to socket on port 3714
[statistics] connected
.----------------------------.
| #1. tLogRow_1 |
+--------------------+-------+
| key | value |
+--------------------+-------+
| GetTrackingDataXML | null |
+--------------------+-------+
Community Manager

Re: tWebservice: Nullpointer exception

Hi sanjana
Can you paste the link of tutorial which you are practicing? I will check and test it.
----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

Re: tWebservice: Nullpointer exception

Shong,

 

This is not somehting which i am practising,actually ,this is one of the usecase from my project.

Five Stars

Re: tWebservice: Nullpointer exception

Okay, this is how I configured ther tWebservice component:

 

image.pngimage.pngimage.png

 

Overall Job and Java config:

image.png

image.pngimage.png

 

And again the error log:

 

Exception in component tWebService_1
java.lang.NullPointerException
	at org.apache.cxf.common.util.Compiler.useJava6Compiler(Compiler.java:187)
	at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:141)
	at org.apache.cxf.common.util.Compiler.compileFiles(Compiler.java:136)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.compileJavaSrc(DynamicClientFactory.java:611)
	at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:370)
...

 

Like you can see in screenshots above I switched back to JDK 1.8.0_131.

So, what is the matter with tWebService? Any ideas?

Five Stars

Re: tWebservice: Nullpointer exception

BTW: When you mark the tWebservice component and press F1 you can see the help page with an example related to that component. I tried the example step by step in talend di (Commercial Version!) and facing the same error. How can that be? talend please fix that bug!

Community Manager

Re: tWebservice: Nullpointer exception

Hi TalendDIUser

I have tested the scenario Getting country names trhrough a web service in the component document and it works. Below is my JRE configuration in preferences page.

1.png2.png

As I suggested, have a try to copy the jar file tools.jar from <jdk installation dir>/lib to <jre installation dir>/lib, let me know if it works.

 

Regards

Shong

 

----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: tWebservice: Nullpointer exception

Shong, thanks a lot! Now I'm able to run tWebService with no errors!

 

 

Starte Job myFirstJob am 15:04 08/06/2017.

[statistics] connecting to socket on port 3568
[statistics] connected
<NewDataSet>
  <Table>
    <countrycode>cn</countrycode>
    <name>China</name>
  </Table>
  <Table>
    <countrycode>cn</countrycode>
    <name>China</name>
  </Table>
</NewDataSet>
[statistics] disconnected
Job myFirstJob endet am 15:04 08/06/2017. [exit code=0]

So everybody: Just copy the tools.jar file from jdk to jre lib folder like shong suggested!

 

Community Manager

Re: tWebservice: Nullpointer exception

Great, thanks for your feedback!
----------------------------------------------------------
Talend | Data Agility for Modern Business