One Star

Error while processing web services: soapenv:InvocationTargetException

I have a complex job that runs fine of TOS and create several output files.
When I create a webservice (export) and invoke the service from my java app I have the following error message:
soapenvSmiley Frustratederver.userExceptionjava.lang.reflect.InvocationTargetExceptiondur-cnestor-2xp
the call is the following:
http://localhost:8081/SMS_0.1/services/SMS?method=runJob&arg0=--context_param WXFile=C:/_temp/TapeTest.txt&arg1=--context_param Header3000=C:/_temp/3000.csv&arg2=--context_param Details3000=C:/_temp/3000Trailer.csv&arg3=--context_param Errors=C:/_temp/errors.csv&arg4=--context_param logFile=C:/_temp/logs_file.txt&arg5=--context_param Record1=C:/_temp/Record1.csv&arg6=--context_param Record2=C:/_temp/Record2.csv&arg7=--context_param Record5Details=C:/_temp/Record5Detail.csv&arg8=--context_param Record5Raw=C:/_temp/record5Raw.csv&arg9=--context_param Record5Single=C:/_temp/Record5Single.csv&arg10=--context_param Record7=C:/_temp/Record7.csv&arg11=--context_param Record8=C:/_temp/Record8.csv
When I run the debugger in Eclipse I can extract the following message:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenvSmiley Frustratederver.user... xmlns:ns1="http://xml.apache.org/axis/">dur-cnestor-2xp</ns1:hostname></detail></soapenv:Fault></soapenv:Body><...>
I don't have any other indication that tells me what exception creates this error. The service is started and creates all the output files but load 9 out of 10 before it fails.
It seems that the axis service is failing without throwing an exception. I tried to add the following statement in the deploy.wsdd file to get more info from axis, but no luck.
<handler name="log" type="javaSmiley Surprisedrg.apache.axis.handlers.LogHandler"/>
<globalConfiguration>
<requestFlow>
<handler type="log"/>
</requestFlow>
<responseFlow>
<handler type="log"/>
</responseFlow>
</globalConfiguration>
<transport name="http" pivot="javaSmiley Surprisedrg.apache.axis.transport.http.HTTPSender"/>
Please help.
Thanks
Cyril
7 REPLIES
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

I finally found the error. In my tmap I used the isempty() method which is supported by tomcat 6 but not tomcat 5.5.
The main issue was that the Axis service doesn't throw back the exception to the tomcat log file, leaving you with the cryptic message "InvocationTargetException".
In order to find the exception, you have to do a bit of hacking in the server-config.wsdd file generated by TOS for your job (under webapp/yourjob/web-inf).
This post was very helpful: http://blogmines.com/blog/2007/02/09/how-to-log-soap-messages-for-a-tomcataxis-web-service/
If you have a web service running under Tomcat using Axis framework and you would like to log all the soap requests and responses, and this can be done by adding the following entries in the sever-config.wsdd file
Add Handler entries
<handler name=?log? type=?javaSmiley Surprisedrg.apache.axis.handlers.LogHandler?> <parameter name=?LogHandler.fileName? value=?axis.log? /> </handler>
under Global Configuration tag
<parameter name=?disablePrettyXML? value=?false? />
<requestFlow> <handler type=?log? />
</requestFlow> <responseFlow>
<handler type=?log? />
</responseFlow>
transport elements
<transport name=?http? pivot=?javaSmiley Surprisedrg.apache.axis.transport.http.HTTPSender? /> <transport name=?local? pivot=?javaSmiley Surprisedrg.apache.axis.transport.local.LocalSender? /> <transport name=?java? pivot=?javaSmiley Surprisedrg.apache.axis.transport.java.JavaSender? />
The axis.log will get created under the tomcat/bin directory.
Once the previous step is done, the axis log file will tell you what is the exception causing the issue:
Caused by: java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at talenddemosjava.sms_0_1.SMS.tFileInputDelimited_1Process(SMS.java:56822)
at talenddemosjava.sms_0_1.SMS.runJobInTOS(SMS.java:21778)
at talenddemosjava.sms_0_1.SMS.runJob(SMS.java:21664)
Hope that helps.
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

thank you for your information
i have modified the server-config.wsdd file and now i get the following error when i run the job
----------------------
<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1Smiley Frustratederver.NoService</faultcode>
<faultstring>AXIS????????????????????????????????targetService?null?? / -(The AXIS engine could not find a target service to invoke! targetService is null)</faultstring>
- <detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">SSJNET0035</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
----------------------------
did you have the same problem?
how can i fix this?
thanks
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

I have the same problem, although I have modified the server-config.wsdd I can not see any error log and error messages but have the same response:
<?xml version="1.0" encoding="UTF-8" ?>
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soapenv:Body>
- <soapenv:Fault>
<faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1Smiley Frustratederver.NoService</faultcode>
<faultstring>The AXIS engine could not find a target service to invoke! targetService is null</faultstring>
- <detail>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">TEKKER-NB</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Any Ideas?
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

I have corrected the URL, now I get a HTTP 500 response...
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

Hi everybody,
i had the same Problem when i exported a Talend Job including a tWebService Component. I deployed the war file on a bea application server and got the following message: <faultstring>The AXIS engine could not find a target service to invoke! targetService is null</faultstring>
I followed the recommondation in this forum and modified the server-config.wsdd. Cause i am using BEA the modification of the server-config.wsdd was a little bit different:
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="false"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="sendXsiTypes" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<requestFlow>
<handler type="javaSmiley Surprisedrg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="javaSmiley Surprisedrg.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
<handler type="log"/>
</requestFlow>
<responseFlow>
<handler type="log"/>
</responseFlow>
</globalConfiguration>
<handler name="LocalResponder" type="javaSmiley Surprisedrg.apache.axis.transport.local.LocalResponder"/>
<handler name="URLMapper" type="javaSmiley Surprisedrg.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="javaSmiley Surprisedrg.apache.axis.handlers.SimpleAuthenticationHandler"/>
<handler name="log" type="javaSmiley Surprisedrg.apache.axis.handlers.LogHandler">
<parameter name="LogHandler.fileName" value="axis.log" />
</handler>
<service name="xxx" provider="java:RPC" style="document" use="literal">
<parameter name="wsdlTargetNamespace" value="http://talend.org"/>
<parameter name="wsdlServiceElement" value="xxx"/>
<parameter name="schemaQualified" value="http://talend.org"/>
<parameter name="wsdlServicePort" value="xxx"/>
<parameter name="className" value="xxx"/>
<parameter name="wsdlPortType" value="xxx"/>
<parameter name="typeMappingVersion" value="1.2"/>
<operation xmlns:retNS="http://talend.org" xmlns:rtns="http://talend.org" xmlns:tns="http://talend.org" name="runJob" qname="runJob" returnQName="retNS:runJobReturn" returnType="rtnsSmiley EmbarassedrunJobReturn" returnItemQName="tns:item" soapAction="">
<parameter xmlnsSmiley Tonguens="http://talend.org" xmlns:itns="http://talend.org" qname="pns:args" type="tnsSmiley Embarassedargs" itemQName="itns:item"></parameter>
</operation>
<parameter name="allowedMethods" value="runJob"/>
<arrayMapping xmlns:ns="http://talend.org" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema" type="java:java.lang.String[]" innerType="cmp-ns:string" encodingStyle="" qname="ns:args"></arrayMapping>
<arrayMapping xmlns:ns="http://talend.org" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema" type="java:java.lang.String[]" innerType="cmp-ns:string" encodingStyle="" qname="ns:ArrayOf_xsd_string"></arrayMapping>
<arrayMapping xmlns:ns="http://talend.org" xmlns:cmp-ns="http://talend.org" type="java:java.lang.String[][]" innerType="cmp-ns:ArrayOf_xsd_string" encodingStyle="" qname="ns:runJobReturn"></arrayMapping>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="javaSmiley Surprisedrg.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
<transport name="java" pivot="javaSmiley Surprisedrg.apache.axis.transport.java.JavaSender"/>
</deployment>
After the modification i was able to track the error and find a solution:
The axis.log told me that the error was caused by:
java.lang.IncompatibleClassChangeError: Class com.ibm.wsdl.DefinitionImpl does not implement the requested interface javax.wsdl.extensions.AttributeExtensible
It turned out that Talend put 2 versions of wsdl4j into the war.
In WEB-INF\lib i found the following files:
wsdl4j-1.5.1.jar
wsdl4j-1.6.2.jar
I deleted the file wsdl4j-1.5.1.jar and deployed the modified war. Now everything works fine.
One Star

Re: Error while processing web services: soapenv:InvocationTargetException

Hi,
Still I m facing the same problem, When I m deploying my war in jboss 4.2 it works fine. but when i am deploying the same war in jboss 7.1. i get the below error response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenvSmiley Frustratederver.userException</faultcode>
<faultstring>java.lang.reflect.InvocationTargetException</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">User2-THINK</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
even I tried modifing: server_config.wsdd ,no use. Can any1 please help me on this.
Thanks
Chaya
Four Stars

Re: Error while processing web services: soapenv:InvocationTargetException