One Star

[resolved] tWebservice - nullpointer exception

I'm trying to add a category via webservice to virtuemart.
I receive the following error:
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)
I'm not able to debug this error (or I don't know how).

My job looks like the following pictures:
any ideas?
Thank you!
Regards,
Robert
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] tWebservice - nullpointer exception

For everybody - I found it!
https://jira.talendforge.org/browse/TDI-25565 (Talend DI / TDI-25565)
The tWebservice components requires a JDK to work. Please select a JDK java.exe in the Preferences/Talend/Java interpreter in the studio.
24 REPLIES
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi,
Is there any compile error in "Code" field? From the error info, it seems that the setting of tWebservice component is not correct.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

Hi Sabrina,
Thank you very much for your answer!
Can you help me - what did you mean with: "compile error in "Code" field"
What can I do?
thx!
regards,
robert
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi.
We usually open the code tab and see if there has compile error. If the job has compile error, you are always required to fix the error before executing the job. The compile error in code tab can point where and what the error is.
See my screenshot
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

thank you for your explanation!
No there are no errors. It seems to be fine.
I tried to switch to tWebserviceInput - this works (disadvantage is I have to define all columns or I get a nillable exception)

Trying to investigate a little bit, the error seems to come from
ServiceInvokerHelper.invoke() line 235
=>Client client = getClient(serviceName, portName);
=>
protected Client createClient(QName service, QName port) {
// bug 8674
Client client = dynamicClientFactory.createClient(serviceDiscoveryHelper.getLocalWsdlUri(), service, Thread
.currentThread().getContextClassLoader(), port, bindingFiles);
// end
HTTPConduit conduit = (HTTPConduit) client.getConduit();
if (configuration != null) {
configuration.configureHttpConduit(conduit);
}
return client;
}
any other ideas?
Thank you!
regards,
robert
One Star

Re: [resolved] tWebservice - nullpointer exception

For everybody - I found it!
https://jira.talendforge.org/browse/TDI-25565 (Talend DI / TDI-25565)
The tWebservice components requires a JDK to work. Please select a JDK java.exe in the Preferences/Talend/Java interpreter in the studio.
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi,
It is very helpful feedback, thanks for the sharing.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

Does it work with java7?
I am running Windows 7/b4bit, and the java interpreter is set as C:\Program Files\Java\jre7\bin\java.exe, and I am still getting the NullPointer exception
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi,
For win7/64 bit, you'd better use java 6. Is it working in java 6 for your case?
TalendHelpCenter:Compatible Platforms
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

Using JDK1.6 gets rid of the NullPointer exception.
Now I have the following exception when trying to use tWebService to call a HTTPS web service developed with Microsoft WCF with user/password authentication.
Thanks
==============================
Exception in component tWebService_1
org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied.
at org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyImpl.java:166)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:145)
at org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
at org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:550)
at org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:296)
==============================
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi,
Here is a response for your related Forum 32424, could you please check it?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

For everybody - I found it!
(Talend DI / TDI-25565)
The tWebservice components requires a JDK to work. Please select a JDK java.exe in the Preferences/Talend/Java interpreter in the studio.

Can it not work with jre6 ??
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi sansri,
You'd better install compatible JDK instead of JRE only  which will probably cause compile error when execute job.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

Damn! I've just lost a lot of time troubleshooting this issue...
Sabrina, can you please add this information to the installation manual ("Please select a JDK java.exe in the Preferences/Talend/Java interpreter in the studio")?
One Star

Re: [resolved] tWebservice - nullpointer exception

In my opinion, its weired behavior - use a JRE instead of installed JDK (by default).
It's easier for user to just forget to select appropriate Java variant and waste a lot of time - trying to understand "what's wrong with a (for example) tWebService's configuration which he (she) just made...", while the trouble is not in a component configuration at all.
 
Sabrina, can you please add a feature request for JDK auto-detection, or detection of all available JRE/JDK instances and asking user which of them the talend should use?
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi Harliff,
Thanks for your suggestion!
Feel free to open a feature jira issue on Talend Bug Tracker.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] tWebservice - nullpointer exception

Thanks for your suggestion!
Feel free to open a feature jira issue on Talend Bug Tracker.

I've added new feature request: https://jira.talendforge.org/browse/TDI-32643
If there is grammatic mistakes in it - please forgive me, I'm not native English speaker.
One Star

Re: [resolved] tWebservice - nullpointer exception

For everybody - I found it!
(Talend DI / TDI-25565)
The tWebservice components requires a JDK to work. Please select a JDK java.exe in the Preferences/Talend/Java interpreter in the studio.

God bless you for that!!!!! I've nearly lost any hope! I would be most glad to be helpful if needed (zilbernstein@gmail.com)
Four Stars

Re: [resolved] tWebservice - nullpointer exception

Hi guys ,
I tried Java 7 and java 8 (JDK) for windows 10 64 bit .
Can any one advice which version is compatible with windows 10.
Moderator

Re: [resolved] tWebservice - nullpointer exception

Hi amit.dev.d9,
Have you already checked online documents about:TalendHelpCenter:Compatible Operating Systems and TalendHelpCenter:Java?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: [resolved] tWebservice - nullpointer exception

Hi Guys ,
I am getting the same error.
Environment:
                  OS : Windows 7 32 bit
               JAVA : JDK 8/JDK6/JRE8/JRE6.
Please see the details in snapshots ...
Can any one help me to find the correct JAVA version ...
I don't want to install JAVA 7 without any confirmation.
 
Twelve Stars

Re: [resolved] tWebservice - nullpointer exception

why You decide - You have problem with Java version?
all could be much more simple:
You have - tFlowToIterate from row8, but in tWebService use globalMap.get("row1.CountyName"), and of course it will be null
may be of course somewhere above You have row1 , but on all pictures - not
-----------
Four Stars

Re: [resolved] tWebservice - nullpointer exception

why You decide - You have problem with Java version?
all could be much more simple:
You have - tFlowToIterate from row8, but in tWebService use globalMap.get("row1.CountyName"), and of course it will be null
I am using (String)globalMap.get("row1.countryName") in tWebServiceInput and method name is "GetCurrencyByCountryResult"
There is no black row in tFixedFlowInput.

may be of course somewhere above You have row1 , but on all pictures - not
I am using the same process as shown in pictures.


Reposting the snapshot in case if its not visible ...
Twelve Stars

Re: [resolved] tWebservice - nullpointer exception

do not repost it (still bad), just look on it self, and read previous answer
-----------
Four Stars

Re: [resolved] tWebservice - nullpointer exception

why You decide - You have problem with Java version?
all could be much more simple:
You have - tFlowToIterate from row8, but in tWebService use globalMap.get("row1.CountyName"), and of course it will be null
I guess you wanted to point out at the flow line that is row 8 .
Thanks
I am creating a fresh job to avoid any confusion.

may be of course somewhere above You have row1 , but on all pictures - not