Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-960

Null Pointer exc. when getting xmlAttributes from an xml object

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      When I add '.xmlRoot' in the path, everything works:
      <cfdump var="#testXml.xmlRoot.xmlattributes#" />
      Which seems strange to me, but anyway, it works.

      Show
      When I add '.xmlRoot' in the path, everything works: <cfdump var="#testXml.xmlRoot.xmlattributes#" /> Which seems strange to me, but anyway, it works.

      Description

      Using the following example code, an error is thrown:
      <cfset testXml = xmlParse('<?xml version="1.0"?><test id="1" />') />
      <cfdump var="#testXml.xmlattributes#" />

      The stacktrace:
      java.lang.NullPointerException
      at railo.runtime.text.xml.XMLAttributes.keysAsString(XMLAttributes.java:100):100
      at railo.runtime.text.xml.XMLAttributes.toDumpData(XMLAttributes.java:69):69
      at railo.runtime.dump.DumpUtil.toDumpData(DumpUtil.java:58):58
      at railo.runtime.functions.other.DumpStruct.call(DumpStruct.java:62):62
      at railo.runtime.functions.other.DumpStruct.call(DumpStruct.java:51):51
      at dump_cfc$cf.udfCall(/developing/tools/WEB-INF/lib/railo-server/context/library/tag/Dump.cfc:74):74
      at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:226):226
      at railo.runtime.type.UDFImpl._call(UDFImpl.java:399):399
      at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:357):357
      at railo.runtime.ComponentImpl._call(ComponentImpl.java:528):528
      at railo.runtime.ComponentImpl._call(ComponentImpl.java:456):456
      at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1698):1698
      at railo.runtime.tag.CFTag.cfcStartTag(CFTag.java:461):461
      at railo.runtime.tag.CFTag.doStartTag(CFTag.java:175):175
      at xmlproblem_cfm$cf.call(/developing/tools/xmlproblem.cfm:4):4
      at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:753):753
      at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:35):35
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:24):24
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1900):1900
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:280):280
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233):233
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298):298
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190):190
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291):291
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774):774
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703):703
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896):896
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690):690
      at java.lang.Thread.run(Thread.java:637):637
      at railo.runtime.op.Caster.toPageException(Caster.java:2967):2967
      at railo.runtime.type.UDFImpl._call(UDFImpl.java:405):405
      at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:357):357
      at railo.runtime.ComponentImpl._call(ComponentImpl.java:528):528
      at railo.runtime.ComponentImpl._call(ComponentImpl.java:456):456
      at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1698):1698
      at railo.runtime.tag.CFTag.cfcStartTag(CFTag.java:461):461
      at railo.runtime.tag.CFTag.doStartTag(CFTag.java:175):175
      at xmlproblem_cfm$cf.call(/developing/tools/xmlproblem.cfm:4):4
      at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:753):753
      at railo.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:35):35
      at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:24):24
      at railo.runtime.PageContextImpl.execute(PageContextImpl.java:1900):1900
      at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:280):280
      at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:32):32
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233):233
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298):298
      at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190):190
      at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291):291
      at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774):774
      at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703):703
      at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896):896
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690):690
      at java.lang.Thread.run(Thread.java:637):637

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                frinky Paul Klinkenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: