NPE when reading binding with unprefixed type-name using StAX parser
--------------------------------------------------------------------

                 Key: JIBX-152
                 URL: http://jira.codehaus.org/browse/JIBX-152
             Project: JiBX
          Issue Type: Bug
          Components: core
    Affects Versions: JiBX 1.1.3
            Reporter: Dennis Sosnoski
         Assigned To: Dennis Sosnoski


JiBX throws a NullPointerException when using a StAX parser to read a binding 
definition that include type-names without a namespace prefix. This may occur 
when JiBX is used with Axis2 WSDL2Java, since the StAX parser is normally used 
in that environment. Here's a partial stack trace (from 
http://issues.apache.org/jira/browse/AXIS2-2088):

Caused by: java.lang.NullPointerException
        at org.jibx.runtime.impl.StAXReaderWrapper.getNamespace(StAXReaderWrappe
r.java:455)
        at org.jibx.runtime.impl.UnmarshallingContext.getNamespaceUri(Unmarshall
ingContext.java:3125)
        at org.jibx.runtime.QName.deserialize(QName.java:234)
        at org.jibx.binding.model.MappingElement.setQualifiedTypeName(MappingEle
ment.java:261)
        at org.jibx.binding.model.MappingElement.JiBX_binding_unmarshalAttr_5_0(
MappingElement.java)
        at org.jibx.binding.model.JiBX_bindingMappingElement_access.unmarshal()
        at org.jibx.binding.model.BindingElement.JiBX_binding_unmarshal_3_0(Bind
ingElement.java)
        at org.jibx.binding.model.JiBX_bindingBindingElement_access.unmarshal()
        at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(Unmarshal
lingContext.java:2538) 

The StAXReaderWrapper.getNamespace() method needs to be changed to handle a 
null prefix value correctly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to