【问题标题】:Could not find the ColdFusion Component that exists找不到存在的 ColdFusion 组件
【发布时间】:2012-03-17 07:16:39
【问题描述】:

当我在本地使用以下代码进行开发时,它可以工作,当它在生产中时,它大部分时间都可以工作,但是我们经常使用此代码得到以下错误:

代码

CreateObject("component", "model.mThing.Thing");

现在model 映射是在Application.cfc 中创建的,所以model.mThing.Thing 路径应该始终指向一个存在的cfc,并且ww 应该永远不会出现以下错误。那么这里出了什么问题?

环境是使用fusebox和coldspring的CF8,这个错误是在我们开始使用coldspring存储我们的工厂cfcs之后才开始出现的,它执行上面的CreateObject代码会导致下面的错误。

错误:

"Error","jrpp-839","02/xx/12","xx:yy:zz","appName","Could not find the ColdFusion Component or Interface model.mThing.Thing.  Ensure that the name is correct and that the component or interface exists. The specific sequence of files included or processed is: Z:\domains\x.y.com\root\index.cfm, line: 11 "
coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion Component or Interface model.mThing.Thing.                                                                                                                                                                                  
               at coldfusion.runtime.TemplateProxyFactory.getResolvedFile(TemplateProxyFactory.java:1173)                                                                                                                                                                                                       
               at coldfusion.runtime.TemplateProxyFactory.getTemplateFileHelper(TemplateProxyFactory.java:1346)                                                                                                                                                                                                 
               at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:1289)                                                                                                                                                                                                           
               at coldfusion.cfc.ComponentProxyFactory.getProxy(ComponentProxyFactory.java:38)                                                                                                                                                                                                                  
               at coldfusion.runtime.ProxyFactory.getProxy(ProxyFactory.java:65)                                                                                                                                                                                                                                
               at coldfusion.runtime.CFPage.createObjectProxy(CFPage.java:4707)                                                                                                                                                                                                                                 
               at coldfusion.runtime.CFPage.CreateObject(CFPage.java:4552)                                                                                                                                                                                                                                      
               at cfThingFactory2ecfc633415381$funcCREATEthings.runFunction(Z:\domains\x.y.com\approot\_Model\mThing\ThingFactory.cfc:11)                                                                                                                                                                       
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)                                                                                                                                                                                                                                       
               at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)                                                                                                                                                                                                                      
               at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)                                                                                                                                                                                                              
               at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)                                                                                                                                                                                                                   
               at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)                                                                                                                                                                                                                               
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)                                                                                                                                                                                                                                       
               at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471)                                                                                                                                                                                                                                  
               at cfThingFactory2ecfc633415381$funcGETthings.runFunction(Z:\domains\x.y.com\approot\_Model\mThing\ThingFactory.cfc:66)                                                                                                                                                                          
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)                                                                                                                                                                                                                                       
               at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)                                                                                                                                                                                                                      
               at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)                                                                                                                                                                                                              
               at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)                                                                                                                                                                                                                   
               at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)                                                                                                                                                                                                                               
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463)                                                                                                                                                                                                                                       
               at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453)                                                                                                                                                                                                                               
               at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320)                                                                                                                                                                                                                               
               at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222)                                                                                                                                                                                                                                     
               at cfjs2ethings2dphotos2ecfm1184443389._factor5(Z:\domains\x.y.com\approot\parsed\js.things-photos.cfm:146)                                                                                                                                                                                      
               at cfjs2ethings2dphotos2ecfm1184443389._factor12(Z:\domains\x.y.com\approot\parsed\js.things-photos.cfm:136)                                                                                                                                                                                     
               at cfjs2ethings2dphotos2ecfm1184443389._factor15(Z:\domains\x.y.com\approot\parsed\js.things-photos.cfm:5)                                                                                                                                                                                       
               at cfjs2ethings2dphotos2ecfm1184443389.runPage(Z:\domains\x.y.com\approot\parsed\js.things-photos.cfm:1)                                                                                                                                                                                         
               at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)                                                                                                                                                                                                                                       
               at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)                                                                                                                                                                                                                             
               at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)                                                                                                                                                                                                                                
               at cffusebox52ecfm1103700220.runPage(Z:\domains\x.y.com\coreroot\fusebox5\fusebox5.cfm:188)                                                                                                                                                                                                      
               at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)                                                                                                                                                                                                                                       
               at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)                                                                                                                                                                                                                             
               at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)                                                                                                                                                                                                                                
               at cffusebox42eruntime2ecfmx2ecfm2039615664.runPage(Z:\domains\x.y.com\coreroot\fusebox5\fusebox4.runtime.cfmx.cfm:1)                                                                                                                                                                            
               at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)                                                                                                                                                                                                                                       
               at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)                                                                                                                                                                                                                             
               at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)                                                                                                                                                                                                                                
               at cfindex2ecfm2041455050.runPage(Z:\domains\x.y.com\wwwroot\index.cfm:4)                                                                                                                                                                                                                        
               at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)                                                                                                                                                                                                                                       
               at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)                                                                                                                                                                                                                             
               at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661)                                                                                                                                                                                                                                
               at cfApplication2ecfc594211230$funcONREQUEST.runFunction(Z:\domains\x.y.com\wwwroot\Application.cfc:112)                                                                                                                                                                                         
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)                                                                                                                                                                                                                                       
               at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)                                                                                                                                                                                                                      
               at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)                                                                                                                                                                                                              
               at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59)                                                                                                                                                                                                                   
               at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)                                                                                                                                                                                                                               
               at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192)                                                                                                                                                                                                                                       
               at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:448)                                                                                                                                                                                                                               
               at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:308)                                                                                                                                                                                                                               
               at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:74)                                                                                                                                                                                                                            
               at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:243)                                                                                                                                                                                                                        
               at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:269)                                                                                                                                                                                                                        
               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.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 com.intergral.fusionreactor.filter.FusionReactorFilter.b(FusionReactorFilter.java:376)                                                                                                                                                                                                        
               at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:254)                                                                                                                                                                                                        
               at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:164)                                                                                                                                                                                                 
               at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)                                                                                                                                                                                                                                        
               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:286)                                                                                                                                                                                                                     
               at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)                                                                                                                                                                                                                     
               at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)                                                                                                                                                                                                                  
               at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)                                                                                                                                                                                                                 
               at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)                                                                                                                                                                                                                                        

【问题讨论】:

  • 您的 Fusebox 应用设置为什么模式?生产?
  • 是的,但我认为这并不重要。

标签: coldfusion coldfusion-8 application.cfc fusebox coldspring


【解决方案1】:

我最近遇到了同样的问题,不同的上下文。

原来管理员设置在生产之间有所不同。

启用每个应用程序设置 选中后,每个应用程序设置在服务器范围内启用。如果未选中,则在服务器范围内禁用每个应用程序设置。

如果没有该设置,应用程序将无法设置应用程序特定的映射。

【讨论】:

  • 该设置在生产和本地启用,所以这不是问题,你猜对了!
  • 在 id 不起作用的服务器上,转储 this 范围以确保设置了映射。还要确保管理员中没有冲突的映射设置
  • 服务器管理员中没有设置映射,我正在考虑尝试。
  • 我确定应用映射大部分时间都设置好了,失败只是间歇性的,看似随机的。
【解决方案2】:

This blog post 提到了与我们类似的问题,我们已经在 cf 服务器管理员中设置了映射,看看是否有帮助。

【讨论】:

    【解决方案3】:

    为了帮助像我这样的人找到解决方案:

    我遇到了同样的问题,通过进一步测试,我推断 CFC 被应用程序服务器以复杂的方式缓存,重命名文件没有按预期工作。我尝试重新启动应用服务器服务(ColdFusion Application Server),它开始按预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-10-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多