Copy link to clipboard
Copied
Fresh install of cf 10, using tested, mature code written for cf 9. Code is in production on cf 9 in several installations. Application is sitting on its home screen, where there are 4 areas that have ajax driven content that is updated every 5 minutes. After 20 minutes one of the alax driven areas generates an error. The error in is application.cfc, OnRequestStart, and is at the line where <cflogin> starts. Almost seems like a timeout, however it it throwing an error as indicate below. Anyone have any ideas how to go about troublshooting/solving this? Wrapping it in cftry and trying to get additional information does not provide any more detail, as a matter of fact the cfcatch info is all blank!
struct | |||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Cause |
| ||||||||||||||||||||||||||||||||||||||||||||||||
Detail | An exception occurred while invoking an event handler method from Application.cfc. The method name is: onRequestStart. | ||||||||||||||||||||||||||||||||||||||||||||||||
Message | Event handler exception. | ||||||||||||||||||||||||||||||||||||||||||||||||
RootCause |
| ||||||||||||||||||||||||||||||||||||||||||||||||
StackTrace | coldfusion.runtime.EventHandlerException: Event handler exception. at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:286) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:417) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFil ter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) 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:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilt er.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja va:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:11 8) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractPr otocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298 ) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:542) at coldfusion.runtime.SecurityScopeTracker.setSecurity(SecurityScopeTracker.java:2 35) at coldfusion.runtime.SecurityScopeTracker.getSecurity(SecurityScopeTracker.java:1 24) at coldfusion.tagext.security.AuthenticateTag.doStartTag(AuthenticateTag.java:172) at cfApplication2ecfc1223778257$funcONREQUESTSTART._factor14(C:\inetpub\wwwroot\CM SUAT\Application.cfc:560) at cfApplication2ecfc1223778257$funcONREQUESTSTART.runFunction(C:\inetpub\wwwroot\ CMSUAT\Application.cfc:500) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 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:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108) at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:278) ... 33 more | ||||||||||||||||||||||||||||||||||||||||||||||||
Suppressed |
| ||||||||||||||||||||||||||||||||||||||||||||||||
TagContext |
| ||||||||||||||||||||||||||||||||||||||||||||||||
Type | Expression | ||||||||||||||||||||||||||||||||||||||||||||||||
name | onRequestStart |
Hi,
It seems that CF 10 update 14 fixes the problem. One day in production and not a single NullPointerException (compared to several any other day before the update).
Copy link to clipboard
Copied
ColdFusion skips the cflogin tag when login credentials are still valid and active. Since the tag runs in your case, it can only mean that ColdFusion had logged the user out. It would therefore seem that some of the AJAX requests were made after ColdFusion had logged the user out.
My guess is that blank, in other words, null, login credentials were passed in the requests following the logout. That would explain the NullPointerException.
If this is indeed true, then you have to modify your code. Include code to handle the case where the user is not logged in or where blank login credentials are being submitted.
You could use the onError event-handler in Application.cfc to provide information about errors. Something as basic as the following should do:
<cffunction name="onError">
<cfargument name="Exception" required="true">
<cfargument name="EventName" required="true">
<cfif NOT (arguments.EventName IS "onSessionEnd" OR arguments.EventName IS "onApplicationEnd")>
<cfdump var="#Arguments#" label="Error dump">
</cfif>
</cffunction>
Copy link to clipboard
Copied
Hi all, any news on this one? I have the exact same problem and have not found any solution to it. I have tried playing with session- and application timeouts, but without any luck. The funny thing is, that it occurs every day for my users, but I have never been able to reproduce it myself.
It seems that it would be related to some timeout, as the exceptions in my case always seem to occur in the afternoon. I have tried combinations of timeouts and ajax-requests and "standard" requests, but nothing.
I wonder under what circumstances all this happens? BKBK's answers seems weird. If the credentials are null/empty, then surely CF should run through the cflogin-block, not throw an exception??? I mean, the first request is always empty/null, I guess, but that's not the request generating the error.
If the user is logged in, cflogin should be skipped, otherwise cflogin should be run. I cannot see where and why an exception would be thrown.
I'm throwing every possible detail in onError(), to no avail.
My CF10 is running behind Apache, but I doubt that has any part in the problem.
Copy link to clipboard
Copied
cfpike wrote:
Hi all, any news on this one? I have the exact same problem and have not found any solution to it. I have tried playing with session- and application timeouts, but without any luck. The funny thing is, that it occurs every day for my users, but I have never been able to reproduce it myself.
It seems that it would be related to some timeout, as the exceptions in my case always seem to occur in the afternoon. I have tried combinations of timeouts and ajax-requests and "standard" requests, but nothing.
You should start your own thread. The forum would then focus on your particular system, code, and so on.
I wonder under what circumstances all this happens? BKBK's answers seems weird. If the credentials are null/empty, then surely CF should run through the cflogin-block, not throw an exception???
The weirdness is in the issue reported. Apparently, the credentials are null/empty and Coldfusion runs through the cflogin-block and throws an exception.
If the user is logged in, cflogin should be skipped, otherwise cflogin should be run. I cannot see where and why an exception would be thrown.
There is no choice to be made. If the user is logged in (by means of cfloginuser), Coldfusion will automatically skip the cflogin tag. Where and why Coldfusion throws the exception is what we wish to know.
My guess is that it results from a combination of 2 factors: timed-out logins and AJAX requests. We all have to look into it some more.
Copy link to clipboard
Copied
One of my customers just started experiencing this as well. I am just getting into trying to resolve the issue. I will report back here as soon as I have something to report. In the meantime, has anyone made any progress?
Below is the exception received:
09/22/2014 08:25 PM.
null null
The error occurred on line 280.
java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:542) at coldfusion.runtime.SecurityScopeTracker.setSecurity(SecurityScopeTracker.java:235) at coldfusion.runtime.SecurityScopeTracker.getSecurity(SecurityScopeTracker.java:124) at coldfusion.tagext.security.AuthenticateTag.doStartTag(AuthenticateTag.java:172) at cfApplication2ecfc1495732981$funcONREQUESTSTART._factor11(D:\somefolder\Application.cfc:280) at cfApplication2ecfc1495732981$funcONREQUESTSTART.runFunction(D:\somefolder\Application.cfc:266) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) 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:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108) at coldfusion.runtime.AppEventInvoker.onRequestStart(AppEventInvoker.java:278) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:417) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) 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:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:97) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doNext(FusionReactorRequestHandler.java:472) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doHttpServletRequest(FusionReactorRequestHandler.java:312) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.doFusionRequest(FusionReactorRequestHandler.java:192) at com.intergral.fusionreactor.j2ee.filter.FusionReactorRequestHandler.handle(FusionReactorRequestHandler.java:507) at com.intergral.fusionreactor.j2ee.filter.FusionReactorCoreFilter.doFilter(FusionReactorCoreFilter.java:36) at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intergral.fusionreactor.j2ee.filterchain.WrappedFilterChain.doFilter(WrappedFilterChain.java:79) at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intergral.fusionreactor.agent.filter.FusionReactorStaticFilter.doFilter(FusionReactorStaticFilter.java:53) at com.intergral.fusionreactor.agent.pointcuts.NewFilterChainPointCut$1.invoke(NewFilterChainPointCut.java:41) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)
Copy link to clipboard
Copied
Hi,
It seems that CF 10 update 14 fixes the problem. One day in production and not a single NullPointerException (compared to several any other day before the update).