You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Du, David (US SSA)" <da...@baesystems.com> on 2007/08/17 16:32:09 UTC

How to turn on logging

Hi, all,

 

I am trying to developing a client for jaxws-calculator example, I got
an exception as following, it seems like the NullPointerException thrown
from this code block in file JAXBWrapperToolImpl.java: so from this
code, the propInfo object is null, which is not checked, I like to turn
on the log to see the childName, so I can check my wsdl file, my
question is how to turn on the log?

 

Thanks

 

David

 

 

        for (String childName : childNames) {

            PropertyDescriptorPlus propInfo = pdMap.get(childName);

            Object value = childObjects.get(childName);

            try {

                propInfo.set(jaxbObject, value);

            } catch (Throwable t) {

 

                if (log.isDebugEnabled()) {

                    log.debug("An exception " + t.getClass() +

                            "occurred while trying to call set() on  " +
propInfo);

                    log.debug("The corresponding xml child name is: " +
childName);

                    String name = (value == null) ? "<null>" :
value.getClass().getName();

                    log.debug("The corresponding value object is: " +
name);

                }                                           

                throw new JAXBWrapperException(t);

            }

        }

 

client:

     [java] Retrieving document at
'http://localhost:8080/axis2/services/CalculatorService?wsdl'.

     [java] Aug 17, 2007 10:23:33 AM
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl
buildAxisServiceFromWSDL

     [java] INFO: Building AxisService from wsdl:
http://localhost:8080/axis2/services/CalculatorService?wsdl

     [java] value1=[10] value2=[15]

     [java] Exception in thread "main" javax.xml.ws.WebServiceException:
org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException: 

java.lang.NullPointerException

     [java]            at
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(Except
ionFactory.java:172)

     [java]            at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio
nFactory.java:67)

     [java]            at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(Exceptio
nFactory.java:125)

     [java]            at
org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedPlusMethodMarsha
ller.marshalRequest(DocLitWrappedPlusMethodMarshaller.java:671)

     [java]            at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.createRequest(JAXW
SProxyHandler.java:328)

     [java]            at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JA
XWSProxyHandler.java:159)

     [java]            at
org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyH
andler.java:141)

     [java]            at $Proxy9.add(Unknown Source)

     [java]            at
org.apache.axis2.jaxws.calculator.Client.main(Client.java:27)

     [java] Caused by:
org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperException:
java.lang.NullPointerException

     [java]            at
org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl.wrap(JAXBWrapper
ToolImpl.java:155)

     [java]            at
org.apache.axis2.jaxws.marshaller.impl.alt.DocLitWrappedPlusMethodMarsha
ller.marshalRequest(DocLitWrappedPlusMethodMarshaller.java:637)

     [java]            ... 5 more

     [java] Caused by: java.lang.NullPointerException

     [java]            at
org.apache.axis2.jaxws.wrapper.impl.JAXBWrapperToolImpl.wrap(JAXBWrapper
ToolImpl.java:145)

     [java]            ... 6 more

     [java] Java Result: 1