NullPointerException while handling date in SimpleTypeMapper.java 
------------------------------------------------------------------

                 Key: AXIS2-4641
                 URL: https://issues.apache.org/jira/browse/AXIS2-4641
             Project: Axis2
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.5.1
         Environment: WIndows/Solaris
            Reporter: Vasant Shirol
            Priority: Blocker
             Fix For: 1.5.1


NPE in SimpleTypeMapper.java while handling date attribute of Java bean. 
I convert a Javabean into an OMElement using BeanUtil.getPullParser() which 
internally uses the SimpleTypeMapper.getStringValue(). Below is the exception 
stack trace:

java.lang.NullPointerException
        at 
org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getStringValue(SimpleTypeMapper.java:297)
        at 
org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:154)
        at 
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:67)

All this occurs from here of SimpleTypeMapper.java:

MessageContext messageContext = MessageContext.getCurrentMessageContext();
            AxisService axisServce = messageContext.getAxisService();
            // if the user has given a pirticualr timezone we use it.
            if (axisServce.getParameter("TimeZone") != null){
               
zulu.setTimeZone(TimeZone.getTimeZone((String)axisServce.getParameter("TimeZone").getValue()));
            }
see? If your MessageContext.getCurrentMessageContext() is null then axisService 
is null too.

Can you please fix this ASAP in axis2-1.5.1?

Thanks in advance,
Vasant

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to