gpt4 book ai didi

sql-server-2005 - ColdFusion 异常帮助 : coldfusion. runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope

转载 作者:行者123 更新时间:2023-12-04 07:11:53 25 4
gpt4 key购买 nike

我遇到了由以下代码段的 CFINVOKEARGUMENT 行引起的异常:

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

异常的确切文本是:

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

注意事项:

  • cfmx.Messages 是一个在 CFPROCRESULT 中返回的对象,通过 CFDUMP 检查它确实包含预期的数据
  • com_VUI_RemoveIllegalChars 完全没有改变
  • TTSText 是结果集中的有效列
  • 我怀疑这可能是 ColdFusion 配置问题

提前感谢任何可以阐明可能导致此问题的原因的人。

编辑:从异常日志中完成转储:

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

上面的代码片段包含 proc_playsitestatus.cfm 的第 28 - 32 行

编辑:

本例中TTS文本的值为“The message for test is”

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>

最佳答案

你确定那行 # 吗?我认为错误出在 CFC 方法本身。您能否检查一下,如果我是对的,请发布 CFC 方法中的行?

关于sql-server-2005 - ColdFusion 异常帮助 : coldfusion. runtime.NoOperScope cannot be cast to coldfusion.runtime.ApplicationScope,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/417843/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com