Re: Problem using duplicate() on xml data type
Possibly by a node or two, but not for some time prior to the issue happening. Each site has a different size too, the smallest being around 20-30 nodes or so. I suppose parsing directly into the request scope may work around the issue, but I wanted to avoid that hit. Guess we'll see, thanks for the insight though. Has the packet grown over those 16 months? Might just be a memory consumption issue. In my experience null null errors often are cause by memory errors, and the infrequency and nonrepeatability also point that way. cheers, barneyb --- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com On Sep 2, 2008, at 5:44 PM, Mike Vierow [EMAIL PROTECTED] wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312004 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Problem using duplicate() on xml data type
The duplicate call is made in a separate readonly lock. The exclusive lock is only used when the application hasn't been loaded yet (application.cfm). Is the duplicate() call inside the same exclusive lock? -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312005 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Problem using duplicate() on xml data type
For the past 16 months I've been reading an XML document with cffile and parsing it into an application variable, all within an exclusive cflock on the application scope. From there, I copied the parsed document using duplicate() into the request scope for use throughout my application. About three weeks ago this duplicate call began throwing errors. Since then several other of my sites began throwing this error, all of them are hosted at HostMySite CF+ shared hosting. The issue is intermittent, happening for around 3-6% of the requests to the site, depending upon which one. The errors encountered are (and they usually appear in this order): * The typical null null NPE error, java.lang.NullPointerException. * INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. null --- Stack trace --- org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at coldfusion.xml.XmlNodeList.Duplicate(XmlNodeList.java:319) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:105) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:63) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:126) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:63) at coldfusion.runtime.CFPage.Duplicate(CFPage.java:4775) at cfApplication2ecfm703397020._factor8(C:\Websites\162552du7\Application.cfm:118) at cfApplication2ecfm703397020.runPage(C:\Websites\162552du7\Application.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) * NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. null --- Stack trace --- org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. at org.apache.xerces.dom.ElementNSImpl.setName(Unknown Source) at org.apache.xerces.dom.ElementNSImpl.init(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.createElementNS(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at coldfusion.xml.XmlNodeList.Duplicate(XmlNodeList.java:319) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:105) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:63) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java:126) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java:63) at coldfusion.runtime.CFPage.Duplicate(CFPage.java:4775) at cfApplication2ecfm1694192392._factor8(C:\Websites\169704wt9\Application.cfm:118) at cfApplication2ecfm1694192392.runPage(C:\Websites\169704wt9\Application.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) I've tried replacing the XML documents to make sure they haven't become corrupt, but despite this I've never run into any issues reading or parsing the file, only when trying to duplicate it. Here's the guts of the application file. cflock scope=APPLICATION type=readonly timeout=60 cfset request.apploaded = IsDefined('APPLICATION.apploaded') /cflock cfif NOT request.apploaded OR isDebugMode() cflock scope=APPLICATION type=exclusive timeout=45 cfif fileExists(expandPath('./themes/templates.xml')) cffile action=read file=#expandPath('./themes/templates.xml')# variable=xTemplate/ cfset APPLICATION.templates = xmlParse(xTemplate)/ /cfif cfset APPLICATION.apploaded = TRUE /cflock /cfif cflock scope=APPLICATION type=readonly timeout=60 cfset request.application = duplicate(APPLICATION)/ /cflock Has anyone seen any of these issues? HMS support has not be helpful in resolving the issue. I am forcing the application scope to rebuild itself at this point to limit the effect of the issue, but even still it's getting out of hand. Any help would be highly appreciated. Thanks, Mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311959 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Re: Problem using duplicate() on xml data type
Has the packet grown over those 16 months? Might just be a memory consumption issue. In my experience null null errors often are cause by memory errors, and the infrequency and nonrepeatability also point that way. cheers, barneyb --- Barney Boisvert [EMAIL PROTECTED] http://www.barneyb.com On Sep 2, 2008, at 5:44 PM, Mike Vierow [EMAIL PROTECTED] wrote: For the past 16 months I've been reading an XML document with cffile and parsing it into an application variable, all within an exclusive cflock on the application scope. From there, I copied the parsed document using duplicate() into the request scope for use throughout my application. About three weeks ago this duplicate call began throwing errors. Since then several other of my sites began throwing this error, all of them are hosted at HostMySite CF+ shared hosting. The issue is intermittent, happening for around 3-6% of the requests to the site, depending upon which one. The errors encountered are (and they usually appear in this order): * The typical null null NPE error, java.lang.NullPointerException. * INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. null --- Stack trace --- org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified. at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at coldfusion.xml.XmlNodeList.Duplicate(XmlNodeList.java:319) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java: 105) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java: 63) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java: 126) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java: 63) at coldfusion.runtime.CFPage.Duplicate(CFPage.java:4775) at cfApplication2ecfm703397020._factor8(C:\Websites \162552du7\Application.cfm:118) at cfApplication2ecfm703397020.runPage(C:\Websites \162552du7\Application.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) * NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. null --- Stack trace --- org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces. at org.apache.xerces.dom.ElementNSImpl.setName(Unknown Source) at org.apache.xerces.dom.ElementNSImpl.init(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.createElementNS(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at org.apache.xerces.dom.CoreDocumentImpl.importNode(Unknown Source) at coldfusion.xml.XmlNodeList.Duplicate(XmlNodeList.java:319) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java: 105) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java: 63) at coldfusion.runtime.ObjectDuplicator._duplicate(ObjectDuplicator.java: 126) at coldfusion.runtime.ObjectDuplicator.duplicate(ObjectDuplicator.java: 63) at coldfusion.runtime.CFPage.Duplicate(CFPage.java:4775) at cfApplication2ecfm1694192392._factor8(C:\Websites \169704wt9\Application.cfm:118) at cfApplication2ecfm1694192392.runPage(C:\Websites \169704wt9\Application.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) I've tried replacing the XML documents to make sure they haven't become corrupt, but despite this I've never run into any issues reading or parsing the file, only when trying to duplicate it. Here's the guts of the application file. cflock scope=APPLICATION type=readonly timeout=60 cfset request.apploaded = IsDefined('APPLICATION.apploaded') /cflock cfif NOT request.apploaded OR isDebugMode() cflock scope=APPLICATION type=exclusive timeout=45 cfif fileExists(expandPath('./themes/templates.xml')) cffile action=read file=#expandPath('./themes/templates.xml')# variable=xTemplate/ cfset APPLICATION.templates = xmlParse(xTemplate)/ /cfif cfset APPLICATION.apploaded = TRUE /cflock /cfif cflock scope=APPLICATION type=readonly timeout=60 cfset request.application = duplicate(APPLICATION)/ /cflock Has anyone seen any of these issues? HMS support has not be helpful in resolving the issue. I am forcing the application scope to rebuild itself at this point to limit the effect of the issue, but even still it's getting out of
Re: Problem using duplicate() on xml data type
Is the duplicate() call inside the same exclusive lock? On Wed, Sep 3, 2008 at 8:44 AM, Mike Vierow [EMAIL PROTECTED] wrote: For the past 16 months I've been reading an XML document with cffile and parsing it into an application variable, all within an exclusive cflock on the application scope. From there, I copied the parsed document using duplicate() into the request scope for use throughout my application. About three weeks ago this duplicate call began throwing errors. Since then several other of my sites began throwing this error, all of them are hosted at HostMySite CF+ shared hosting. The issue is intermittent, happening for around 3-6% of the requests to the site, depending upon which one. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311962 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Problem using duplicate() on xml data type
cfif fileExists(expandPath('./themes/templates.xml')) cffile action=read file=#expandPath('./themes/templates.xml')# variable=xTemplate/ cfset APPLICATION.templates = xmlParse(xTemplate)/ /cfif Doesn't have anything to do with your problem I think, but if you're CF7+, you can drop the whole cffile read, and just xmlParse() the file itself. Will ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311963 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4