Note that there are some explanatory texts on larger screens.

plurals
  1. POColdFusion Exception help: coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope
    text
    copied!<p>I am encountering an exception cause by the CFINVOKEARGUMENT line of the following snippet:</p> <pre><code>&lt;CFOUTPUT query="cfmx.Messages"&gt;&lt;CFSILENT&gt; &lt;CFINVOKE component="com_VUI_RemoveIllegalChars" method="formatString" returnvariable="cfmx.formattedMessage"&gt; &lt;CFINVOKEARGUMENT name="inString" value="#TTSText#"&gt; &lt;/CFINVOKE&gt; &lt;/CFSILENT&gt; </code></pre> <p>The exact text of the exception is:</p> <blockquote> <p>Error casting an object of type coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed. coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope</p> </blockquote> <p>Notes: </p> <ul> <li>cfmx.Messages is an object returned in a CFPROCRESULT, and upon examination via CFDUMP it does contain the expected data</li> <li>com_VUI_RemoveIllegalChars has not changed at all</li> <li>TTSText is a valid column in the result set</li> <li>My suspicion is that this may be a ColdFusion configuration issue</li> </ul> <p>Thanks in advance to anyone who can shed any light on what may be causing this problem.</p> <p>EDIT: Complete dump from the exception log:</p> <blockquote> <p>"Error","jrpp-11","01/06/09","15:11:37",,"coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope The specific sequence of files included or processed is: C:\Inetpub\wwwroot\ermsvui\proc_playsitestatus.cfm, line: 30 " java.lang.ClassCastException: coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope at coldfusion.runtime.RuntimeServiceImpl.getFullTagName(RuntimeServiceImpl.java:625) at coldfusion.runtime.TemplateProxyFactory.getFullName(TemplateProxyFactory.java:1082) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:184) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:157) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:1267) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:1218) at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:358) at cfproc_playsitestatus2ecfm1824676963.runPage(C:\Inetpub\wwwroot\ermsvui\proc_playsitestatus.cfm:30) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)</p> </blockquote> <p>The above code snippet contains lines 28 - 32 of proc_playsitestatus.cfm</p> <p>EDIT:</p> <p>The value of TTS text is this case is "The message for test is"</p> <p>The source of com_VUI_RemoveIllegalChars:</p> <pre><code>&lt;CFCOMPONENT displayname="Format a string for use in VoiceXML" hint="returns a string formatted for voiceXML" output="yes"&gt; &lt;CFFUNCTION name="formatString" access="public" returntype="string" displayname="Format String" hint="Formats String for VoiceXML"&gt; &lt;cfargument name="inString" type="string" required="true" displayname="input string" hint="pass in the string to be formatted"&gt; &lt;CFSET v.messageWithoutChars = replace(inString, "&lt;", "", "all")&gt; &lt;CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "&gt;", "", "all")&gt; &lt;CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "&amp;", "and", "all")&gt; &lt;CFSET v.messageWithoutChars = REReplace(v.messageWithoutChars, "\.+", ".", "all")&gt; &lt;CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "!", ".", "all")&gt; &lt;CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "\", " ", "all")&gt; &lt;CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "/", " ", "all")&gt; &lt;CFSET v.messageWithoutChars = REReplace(v.messageWithoutChars, "[[:punct:]]{2,}", " ", "all")&gt; &lt;cfreturn v.messageWithoutChars&gt; &lt;/CFFUNCTION&gt; &lt;/CFCOMPONENT&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload