• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.reflect.InvocationException in tomcat

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I am doing a webservices application. I am calling a service called UserService which is deployed in Tomcat.In that service a method called upload is there.I am passing a SOAP request to that service with the help of XML.

But it is throwing a exception called

in tomcat java.lang.reflect.InvocationException

in eclipse javax.xml.SoapException :Exception occured while invoking method upload

I need help on breaking the above exception. can anyone suggest me the solution
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

srikanth Thandra wrote:I need help on breaking the above exception. can anyone suggest me the solution


I do not think anybody can help you if you do not give the details of the exception, your Soap API and the soap request.

Moving to webservices forum.
 
srikanth Thandra
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My SOAP request is shown below and the jars used are axis2-saaj-api-1.4.1.jar,axis2-saaj-1.4.1.jar

REQUEST:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body>

<ns:uploadFile xmlns:ns="http://services">
<ns:name>test123</ns:name>
<ns:attchmentID>1234</ns:attchmentID>
</ns:uploadFile>

</SOAP-ENV:Body></SOAP-ENV:Envelope>


generated Exception is.....

javax.xml.soap.SOAPException: Exception occurred while trying to invoke service method uploadFile
at org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:194)
at org.apache.axis2.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:128)
at com.posidex.saaj.Attachment.main(Attachment.java:72)
Caused by: org.apache.axis2.AxisFault: Exception occurred while trying to invoke service method uploadFile
at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:188)
... 2 more

and i have attached an image file which consists of exception in tomcat i underlined that exception.please find the attachment.

exception.JPG
[Thumbnail for exception.JPG]
exception generated in tomcat image file
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure about that exact exception? In the JavaDocs for java.lang.reflect in Java 1.5 and 1.6 I dont find a InvocationException.

I find InvocationTargetException - which has a getCause() method.

Which version of Java are you compiling with - which version is Tomcat running with?

Bill
reply
    Bookmark Topic Watch Topic
  • New Topic