empty boolean attribute -> NPE
------------------------------
Key: AXIS-2189
URL: http://issues.apache.org/jira/browse/AXIS-2189
Project: Apache Axis
Type: Bug
Components: Serialization/Deserialization
Versions: 1.2.1
Environment: Fedora Core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Reporter: toby cabot
Priority: Minor
If a document has a boolean attribute, an empty instance of that attribute will
trigger a NullPointerException during deserialization. For example, one of the
schemas I use has
<attribute name="reportIfEmpty" type="xsd:boolean" default="false" />
If the inbound document contains
<reportSpec reportIfEmpty="" reportName="1" reportOnlyOnChange="false">
then I get
{http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142)
at
org.apache.axis.encoding.ser.BeanDeserializer.onStartElement(BeanDeserializer.java:464)
at
org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:393)
at
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154)
at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:615)
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
at
org.apache.geronimo.jetty.JettyServletHolder.handle(JettyServletHolder.java:100)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:832)
at
org.mortbay.jetty.servlet.JSR154Filter.doFilter(JSR154Filter.java:171)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationHandler.java:823)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:623)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira