NullPointerException parsing XML in

In upgrading from Lucee to either or, I get the following error message in a function that is trying to parse some XML. If I downgrade to, things work again without errors.

"ERROR","cfthread-0","07/21/2017","13:18:13","","cfthread-0;java.lang.NullPointerException;lucee.runtime.exp.NativeException: java.lang.NullPointerException
        at lucee.runtime.text.xml.XMLUtil.childNodesLength(
        at lucee.runtime.text.xml.XMLNodeList.getLength(
        at lucee.runtime.text.xml.XMLNodeList.size(
        at server.somedir.mycode_cfc$cf.udfCall(/app/server/somedir/mycode.cfc:226)
        at lucee.runtime.type.UDFImpl.implementation(
        at lucee.runtime.type.UDFImpl._call(
        at lucee.runtime.ComponentImpl._call(
        at lucee.runtime.ComponentImpl._call(
        at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(
        at lucee.runtime.PageContextImpl.getFunction(
        at server.somedir.downloadinfo_cfm$
        at lucee.runtime.PageContextImpl._doInclude(
        at lucee.runtime.PageContextImpl._doInclude(
        at lucee.runtime.PageContextImpl.doInclude(
        at server.demo.stepforward_cfm$cf.threadCall(/app/server/demo/stepforward.cfm:35)
        at lucee.runtime.thread.ChildThreadImpl.execute(
Caused by: java.lang.NullPointerException
        ... 20 more

Please open a ticket in JIRA and provide the information that you posted here. Thank you.

I coludn’t able to reproduce the issue in version. XML parse works fine. I’ve added my test zip file in

I added to the code you provided to reproduce the issue. The bug occurs when trying to use array related function on an XmlChildren node.

I had been using the xmlToStruct function (various versions at and , which I imagine some other CF developers are also using.

FYI, this issue occurred before in a much older build and then disappeared in a release version. It seems to have cropped up once more in these builds…


Thanks for the speedy fix! Works beautifully now!