• 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

Null Pointer exception during run client code using Axis 1.4 on weblogic 8.1

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created my web service using Axis 1.4 and it's sussces fully deployed on weblogic 8.1.
I have created WSDL file through Java2WSDL tool of Axis.However i run my client it 's throws following exception

Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.NullPointerException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:xss-444

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(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.content(Unknown Source)
at org.apache.crimson.parser.Parser2.maybeElement(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
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.xav.wssample.ws.generated.CalculatorSoapBindingStub.add(Calculato
rSoapBindingStub.java:118)
at com.xav.wsclient.CalcClient.main(CalcClient.java:24)

I am not able to understands what is reason behind it...?
Client code is ---

CalculatorService service = new CalculatorServiceLocator();
Calculator calc = service.getcalculator();
System.out.println("15 + 6 = " + calc.add(15, 6));
System.out.println("15 - 6 = " + calc.subtract(15, 6));
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please check Calculator class. I dint see any null pointer exceptions can be raised at client side because of Client code...as requried classes and methods are generated by AXIS.


 
Sam Dec
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for suggestion but Sammeta Calculator class is simple interface...so from my side there is no fault in the Calculator ...it might be some thing else....
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Have you tried to access your service using some web service testing tool, like soapUI or the one in Eclipse (at least in my installation)?
It looks like the problem is on the server side, since you receive a SOAP fault response with the fault code Server from it:


faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException


Best wishes!
 
Sam Dec
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked on server and found Axis was not prperly configured whenver i open http://localhost:7001/axis/happyaxis.jsp
likn say Error 503--Service Unavailable and on the weblogic console i am getting following exception

<Aug 13, 2009 12:53:43 PM IST> <Error> <Deployer> <BEA-149231> <Unable to set th
e activation state to true for the application _appsdir_axis_dir.
org.apache.commons.logging.LogConfigurationException: Invalid class loader hiera
rchy. You have more than one version of 'org.apache.commons.logging.Log' visibl
e, which is not allowed.
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogF
actoryImpl.java:385)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactory
Impl.java:529)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactory
Impl.java:235)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:370)
at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:3
7)
at org.apache.axis.transport.http.AxisHTTPSessionListener.><clinit>(AxisH
TTPSessionListener.java:33)


Even i have set <prefer-web-inf-classes>true</prefer-web-inf-classes> into weblogic.xml file in Axis application and copy /web-inf/lib folder (xml-apis.jar,xercesImpl.jar) after that it's not able to set.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I made a long research on this kind of issue, and the only solution for this kind of issue is:
you just remove the .wsdl file from the soapui and andadd the wsdl after restarting the the soap. the same solution is also working for me.
reply
    Bookmark Topic Watch Topic
  • New Topic