ColdFusion Exception help: coldfusion.runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope

StackOverflow https://stackoverflow.com/questions/417843

  •  03-07-2019
  •  | 
  •  

Question

I am encountering an exception cause by the CFINVOKEARGUMENT line of the following snippet:

<CFOUTPUT query="cfmx.Messages"><CFSILENT>
<CFINVOKE component="com_VUI_RemoveIllegalChars" method="formatString" returnvariable="cfmx.formattedMessage">
   <CFINVOKEARGUMENT name="inString" value="#TTSText#">
</CFINVOKE>
</CFSILENT>

The exact text of the exception is:

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

Notes:

  • cfmx.Messages is an object returned in a CFPROCRESULT, and upon examination via CFDUMP it does contain the expected data
  • com_VUI_RemoveIllegalChars has not changed at all
  • TTSText is a valid column in the result set
  • My suspicion is that this may be a ColdFusion configuration issue

Thanks in advance to anyone who can shed any light on what may be causing this problem.

EDIT: Complete dump from the exception log:

"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)

The above code snippet contains lines 28 - 32 of proc_playsitestatus.cfm

EDIT:

The value of TTS text is this case is "The message for test is"

The source of com_VUI_RemoveIllegalChars:

<CFCOMPONENT displayname="Format a string for use in VoiceXML" hint="returns a string formatted for voiceXML" output="yes">
    <CFFUNCTION name="formatString" access="public" returntype="string" displayname="Format String" hint="Formats String for VoiceXML">
        <cfargument name="inString" type="string" required="true" displayname="input string" hint="pass in the string to be formatted">
        <CFSET v.messageWithoutChars = replace(inString, "<", "", "all")>
        <CFSET v.messageWithoutChars = replace(v.messageWithoutChars, ">", "", "all")>
        <CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "&", "and", "all")>
        <CFSET v.messageWithoutChars = REReplace(v.messageWithoutChars, "\.+", ".", "all")>
        <CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "!", ".", "all")>
        <CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "\", " ", "all")>
        <CFSET v.messageWithoutChars = replace(v.messageWithoutChars, "/", " ", "all")>
        <CFSET v.messageWithoutChars = REReplace(v.messageWithoutChars, "[[:punct:]]{2,}", " ", "all")>
        <cfreturn v.messageWithoutChars>
    </CFFUNCTION>
</CFCOMPONENT>
Was it helpful?

Solution 2

The setting "Enable Application Variables" was not enabled in the ColdFusion configuration.

OTHER TIPS

Are you sure about that line #? I'm thinking the error is in the CFC method itself. Can you check that, and if I'm right, post the line from the CFC method?

Without the contents of the com_VUI_RemoveIllegalChars component and the value of the TTSText variable, you're not giving us a lot to go on, here. Could you post those? (I understand that sometimes you can't for NDA/etc reasons)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top