• 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

NullPointer Exception by apache axis stub at client side

 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am using apache axis 1.3.My Problem is that when I send request to server,server receives the request but at client side I get NullPointer exception by the stub class.The response send by the server does not come to the client calling class but before that the stub class at the client generates a null pointer exception.

AxisFault
faultCode:{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultString:java.lang.NullPointerException

Please help

with regards,
ajse
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The service successfully processed the request? No null exception was thrown in the server?
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,you are correct.

The server has processed the request but at the client side,instead of response,i have got NullPointer Exception.

My client application is deployed on tomcat and I am starting the client side by clicking on an executable icon on the desktop.Is it a multiple jvm instance problem becouse,clicking on icon statrs a jvm and tomcat server has also a jvm associated with it,so the server might be sending the response to the client application which is deployed on tomcat and the other jvm instance is not receiving the response at all and throwing the exception.Please express your views.

with regards,
ajse
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the exception thrown? That is to say: show us the full stack trace.
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Following is the stackTrace:
---------------------------------------------------------------------------------------------------------------------------
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:test1

java.lang.NullPointerException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
ationContext.java:1087)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1963)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1691)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:667)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
Context.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
tandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.set.ops.application.service.WebService
s.WebServicesSoapBindingStub.WebServices(Unknown Source)
at com.set.ops.application.DataReceiver.Registration(Unknown Source)
at com.set.ops.application.DataReceiver.main(Unknown Source)
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The exception is thrown on the client side instead of response.
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have found out the solution.When Tomcat is running as a service at the server side ,I am getting NullPointerException on the client side.But if I start Tomcat manually through batch file(%TOMCAT_HOME%/bin/startup.bat),it is working fine.There is no exception on client side.

Can anybody tell me what is the difference between above two ways of starting tomcat.I will be thankful.

with regards,
ajse
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ajse roy:
Can anybody tell me what is the difference between above two ways of starting tomcat.



The problem is probably less Tomcat and more the account that Tomcat is operating under when it runs as a service.
You should be able to configure the service to run under your account. If the problem goes away - then your job really starts - finding the significant difference(s) between your account and the service account. It could be the class path or other environment variables but more likely it's something to do with access rights and privileges (or the lack thereof).
Check the Tomcat logs directory it may contain some logs that could give you a clue about what is missing.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic