2012-02-27 28 views
5

我在CFC的init()方法中有一個隱式setter。我觀察過(使用Fusion Reactor,並通過錯誤消息),簡單地調用setActive(false)最終進行聯網。我不知道爲什麼ColdFusion會在使用ColdFusion 9引入的隱式設置器來設置此值時做這麼多工作。爲什麼ColdFusion Implicit Setter最終會進行聯網調用?

我正在運行最新的ColdFusion 9.01並應用了所有修補程序更新。

你知道爲什麼ColdFusion會經歷所有這些麻煩嗎?

謝謝。

我CFC

/* Constructor 
    @user_id A valid User_ID. If provided, the User will self-populate. 
*/ 
public shared.models.objects.User function init (numeric user_id = -1) { 
    super.init(argumentCollection=arguments); 

    // Prepare structs required for 'adding' methods 
    clearRoles(); 
    setActive(false); // <--- THIS IS THE LINE 

    setUser_ID(user_id); 

    settings = {}; 

    defaultLanguage = new shared.models.objects.Language(); 

    setLanguages([defaultLanguage]); 
    setLanguage(defaultLanguage); 

    if (user_id == -1) { 
     // Construct a 'blank' User 
     // addRole('Contributor'); 
     setRequirePasswordChange(false); 
    } else { 
     // Attempt to populate a user 
     populate(); 
    } 

    return this; 
} 

堆棧跟蹤的init方法顯示網絡

java.net.SocketTimeoutException: Read timed out 
     at java.net.SocketInputStream.socketRead0(Native Method) 
     at java.net.SocketInputStream.read(SocketInputStream.java:129) 
     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) 
     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) 
     at java.io.BufferedInputStream.read(BufferedInputStream.java:317) 
     at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:581) 
     at jrun.servlet.jrpp.ProxyEndpoint.readFully(ProxyEndpoint.java:573) 
     at jrun.servlet.jrpp.ProxyEndpoint.readInt(ProxyEndpoint.java:591) 
     at jrun.servlet.jrpp.ProxyEndpoint.readString(ProxyEndpoint.java:620) 
     at jrun.servlet.jrpp.ProxyEndpoint.getHeader(ProxyEndpoint.java:762) 
     at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124) 
     at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124) 
     at javax.servlet.http.HttpServletRequestWrapper.getHeader(HttpServletRequestWrapper.java:124) 
     at com.intergral.fusionreactor.filter.surrogate.e.getHeader(FusionReactorServletRequestProxy.java:248) 
     at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221) 
     at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301) 
     at coldfusion.runtime.CgiScope.search(CgiScope.java:334) 
     at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:766) 
     at coldfusion.runtime.NeoPageContext.findAttribute(NeoPageContext.java:638) 
     at coldfusion.runtime.CfJspPage._get(CfJspPage.java:296) 
     at coldfusion.runtime.CfJspPage._get(CfJspPage.java:283) 
     at coldfusion.runtime.CfJspPage._get(CfJspPage.java:271) 
     at cfUser2ecfc1728567179$funcINIT.runFunction(C:\web\project\projecttv\shared\models\objects\User.cfc:131) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301) 
     at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389) 
     at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2723) 
     at cfBuilder2ecfc1779563022$funcBUILDCFC.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Builder.cfc:111) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfInjector2ecfc1868990138$funcBUILDINSTANCE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Injector.cfc:288) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfNoScope2ecfc139649912$funcGETFROMSCOPE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\scopes\NoScope.cfc:31) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfInjector2ecfc1868990138$funcGETINSTANCE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\ioc\Injector.cfc:262) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301) 
     at cfRequest2ecfc135332213$funcENSUREREQUIREDOBJECTSEXIST.runFunction(C:\web\project\projecttv\atvcms\interceptors\Request.cfc:76) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517) 
     at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547) 
     at cfRequest2ecfc135332213$funcPREPROCESS.runFunction(C:\web\project\projecttv\atvcms\interceptors\Request.cfc:26) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301) 
     at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389) 
     at cfInterceptorState2ecfc1253590739$funcINVOKER.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\context\InterceptorState.cfc:139) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582) 
     at cfInterceptorState2ecfc1253590739$funcPROCESS.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\context\InterceptorState.cfc:86) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfInterceptorService2ecfc1842875288$funcPROCESSSTATE.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\web\services\InterceptorService.cfc:131) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfColdbox2ecfc1041943003$funcPROCESSCOLDBOXREQUEST.runFunction(C:\web\project\projecttv\lib\frameworks\coldbox35\system\Coldbox.cfc:208) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360) 
     at cfApplication2ecfc83985088$funcONREQUESTSTART.runFunction(C:\web\project\projecttv\atvcms\Application.cfc:149) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 
     at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) 
     at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) 
     at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) 
     at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) 
     at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491) 
     at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337) 
     at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88) 
     at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:258) 
     at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:349) 
     at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) 
     at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) 
     at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) 
     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.filter.CachingFilter.invoke(CachingFilter.java:62) 
     at coldfusion.CfmServlet.service(CfmServlet.java:200) 
     at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) 
     at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) 
     at com.intergral.fusionreactor.filter.FusionReactorFilter.c(FusionReactorFilter.java:428) 
     at com.intergral.fusionreactor.filter.FusionReactorFilter.d(FusionReactorFilter.java:262) 
     at com.intergral.fusionreactor.filter.FusionReactorFilter.doFilter(FusionReactorFilter.java:171) 
     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$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) 
+0

您的CFC是否擴展了可能已明確定義了setActive的另一個組件? – 2012-02-27 22:26:10

+0

另外,您是否爲您的CFC定義了onMissingMethod函數(或者您可能要擴展的CFC)? – 2012-02-27 22:28:20

+0

@JakeFeasel不,沒有另一個setActive()方法,並且沒有onMissingMethod()。謝謝。 – 2012-02-28 16:19:10

回答

2

我遇到了同樣的問題。我相信我可以爲此添加一些內容,但最終我認爲這裏有一個CF缺陷,我將嘗試詳細闡述。在堆棧

首先注意跟蹤此:

at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221) 
    at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301) 
    at coldfusion.runtime.CgiScope.search(CgiScope.java:334) 
    at coldfusion.runtime.NeoPageContext.searchScopes(NeoPageContext.java:766) 
    at coldfusion.runtime.NeoPageContext.findAttribute(NeoPageContext.java:638) 

當ColdFusion的嘗試解決無作用域的變量,它會通過優先級的範圍順序測試每個範圍工作的方式了。如果它一直到CGI範圍,則CF服務器將嘗試向Web服務器連接器詢問請求標題中的CGI信息。反過來,連接器嘗試從持有TCP連接的連接器句柄讀回瀏覽器。您在這篇文章原始郵件中看到的網絡連接可能是嘗試通過TCP從瀏覽器收集一些CGI屬性的連接器。

如果瀏覽器連接不再處於活動狀態,比如說用戶關閉了瀏覽器,在其他地方點擊了,或者網絡中斷,那麼TCP連接可能是「陳舊的」。在這種情況下,你會看到在日誌堆棧跟蹤這樣與主要信息是「**錯誤錯誤而讀頭」

03/06 13:45:52 error Error while reading header <headername> 
java.net.SocketTimeoutException: Read timed out 
at java.net.SocketInputStream.socketRead0(Native Method) 
... 
at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221) 
at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301) 
at coldfusion.runtime.CgiScope.search(CgiScope.java:334) 

的ColdFusion會做一個範圍查找使用代碼時像isdefined(」例如myUnscopedVar')。如果它一直到CGI,那麼它會向連接器詢問名爲myUnscopedVar的標頭。如果瀏覽器連接消失了,那麼日誌將顯示「錯誤錯誤,而讀頭myUnscopedVar

,以避免在您將使用isDefined所有地方使用structKeyExists的方式。

更多細節在這些相關的博客條目中找到了:

如果你搜索這條錯誤消息「錯誤埃羅r在讀取標題時「實際上會在搜索結果中獲得大量誤報,因爲ColdFusion的CFSAVECONTENT標記是作爲存儲在WEB-INF中的CF自定義標記實現的,而它具有類似的功能,具有相同的效果isDefined(「anUnscopedVar」)捕獲生成內容的方式。內置的CF異常處理程序在嘗試顯示異常時使用cfsavecontent,因此它會捕獲潛在的應用程序異常,嘗試相當漂亮,但遇到「讀取標題時發生錯誤錯誤」問題,而不是看到原來的應用程序異常,你得到這個頭文件錯誤掩蓋了真正的問題

error Error while reading header S_UNABLE 
java.net.SocketTimeoutException: Read timed out 
    at java.net.SocketInputStream.socketRead0(Native Method) 
      ... 
    at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221) 
    at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301) 
    at coldfusion.runtime.CgiScope.search(CgiScope.java:334) 
      ... 
    at cfsavecontent2ecfm1472308084.runPage(E:\cf9_final\cfusion\wwwroot\WEB-INF\cftags\savecontent.cfm:11) 
      ... 
    at cfexception_en2exml1502993924.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\exception_en.xml:52) 
      ... 
    at cfdetail2ecfm1809038875.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\detail.cfm:35) 
      ... 
    at cfApplicationException2ecfm797577125.runPage(D:\JRun4\servers\cfusion\cfusion.ear\cfusion.war\WEB-INF\exception\coldfusion\runtime\ApplicationException.cfm:2) 

同樣的結論是,如果瀏覽器連接已斷開,然後 你的代碼可以由由於使用上的未範圍變量isDefined意圖或者做一個CGI查詢時,顯示「讀取頭」錯誤名稱。

所以這只是一些相關的背景信息。此問題與此線程中的ORM問題相交。

我發現在ColdFusion 9.01中,有時調用隱式設置器會導致ColdFusion嘗試解析setter方法,就像它是一個屬性一樣,它會查看CGI範圍以嘗試找到它。

我這裏顯示如下實體(部分):

component persistent="true" table="myTable" output="false" extends="myBaseClass" { 
property name="myProperty" column="myProperty" type="date" ormtype="timestamp"; 

注意,它擴展myBaseClass,其顯示(部分)在這裏:

component { 
public void function doSomething(){ 
    if (hasProperty('myProperty')) 
     setMyProperty(now()); 
} 

在某些情況下,當一個模板要求使用該實體,模板請求似乎在地址欄旋轉時無限期地掛在瀏覽器中。稍後在查看日誌時,我會找到一個相關條目,顯示「閱讀標題時出錯」。

   03/06 13:45:52 error Error while reading header SETMYPROPRTY 
      java.net.SocketTimeoutException: Read timed out 
      at java.net.SocketInputStream.socketRead0(Native Method) 
      ... 
      at coldfusion.runtime.CgiScope.resolve(CgiScope.java:221) 
      at coldfusion.runtime.CgiScope.containsName(CgiScope.java:301) 
      at coldfusion.runtime.CgiScope.search(CgiScope.java:334) 
      ...     
      at cfmybaseclass2ecfc1915167844$funcDOSOMETHING.runFunction(X:\MyApp\myBaseClass.cfc:8) 
      ...     
      at coldfusion.orm.hibernate.HibernateEventHandler.onFlushDirty(HibernateEventHandler.java:130) 
      ...     
      at coldfusion.orm.hibernate.HibernatePersistenceManager.onCommit(HibernatePersistenceManager.java:950) 
      ... 
      at cfsomecomp2ecfc1707726523$funcRUN.runFunction(X:\MyApp\SomeComp.cfc:131) 

此堆棧跟蹤告訴我的ColdFusion試圖解決一個隱含的制定者,並試圖通過要求連接器同名的HTTP請求頭找到它的CGI範圍。

對我來說,試圖通過搜索CGI作用域的Request Header來解析一個隱式getter,就像是一個ColdFusion缺陷。

意見?

+0

記錄2個缺陷:https://bugbase.adobe.com/index.cfm?event=bug&id=3132889和https://bugbase.adobe.com/index.cfm?event=bug&id=3132879 – 2012-03-07 21:36:22

相關問題