RE: [coldbox:12934] Re: Error after upgrading to 3.5Beta

Hmm, can you show us the code in app.cfc as well as the stack trace of the error?

Thanks!

~Brad

Here is my Application.cfc (comments removed):

<cfcomponent extends="coldbox.system.Coldbox" output="false">
  <cfsetting enablecfoutputonly="yes">

  <cfset this.name="myAppName" />
  <cfset this.sessionManagement = true>
  <cfset this.setClientCookies = true>

  <cfset REQUEST.UserAgent=LCase(cgi.http_user_agent)>
  <cfif (
    (NOT Len( REQUEST.UserAgent )) OR
    REFind( "bot\b", REQUEST.UserAgent ) OR
    Find( "crawl", REQUEST.UserAgent ) OR
    REFind( "\brss", REQUEST.UserAgent ) OR
    Find( "feed", REQUEST.UserAgent ) OR
    Find( "news", REQUEST.UserAgent ) OR
    Find( "blog", REQUEST.UserAgent ) OR
    Find( "reader", REQUEST.UserAgent ) OR
    Find( "syndication", REQUEST.UserAgent ) OR
    Find( "coldfusion", REQUEST.UserAgent ) OR
    Find( "cfschedule", REQUEST.UserAgent ) OR
    Find( "slurp", REQUEST.UserAgent ) OR
    Find( "google", REQUEST.UserAgent ) OR
    Find( "zyborg", REQUEST.UserAgent ) OR
    Find( "emonitor", REQUEST.UserAgent ) OR
    Find( "jeeves", REQUEST.UserAgent )
  )>
    <cfset REQUEST.isSpider = 1 />
    <!--- Spider; no cookies --->
    <cfset this.sessionTimeout = CreateTimeSpan( 0, 0, 0, 5 )>
  <cfelse>
    <cfset REQUEST.isSpider = 0 />
    <cfset this.sessionTimeout = CreateTimeSpan( 0, 0, 30, 0 )>
  </cfif>

  <cfset COLDBOX_APP_ROOT_PATH =
getDirectoryFromPath(getCurrentTemplatePath())>
  <cfset COLDBOX_CONFIG_FILE = "">

  <cfset COLDBOX_APP_KEY = "">
  <cffunction name="onApplicationStart" returnType="boolean"
output="false">
    <cfscript>
      loadColdBox();
      return true;
    </cfscript>
  </cffunction>

  <cffunction name="onRequestStart" returnType="boolean" output="true">
    <cfargument name="targetPage" type="string" required="true" />
    <cfset reloadChecks()>

    <cfif findNoCase('index.cfm', listLast(arguments.targetPage, '/'))>
      <cfset processColdBoxRequest()>
    </cfif>

    <cfreturn true>
  </cffunction>

  <cffunction name="onApplicationEnd" returnType="void"
output="false">
    <cfargument name="applicationScope" type="struct" required="true">
  </cffunction>

  <cffunction name="onSessionStart" returnType="void" output="false">
    <cfset super.onSessionStart()>
  </cffunction>

  <cffunction name="onSessionEnd" returnType="void" output="false">
    <cfargument name="sessionScope" type="struct" required="true">
    <cfargument name="appScope" type="struct" required="false">
    <cfset super.onSessionEnd(argumentCollection=arguments)>
  </cffunction>
</cfcomponent>

The error message in my interceptor is "Element ISSPIDER is undefined
in REQUEST." (but only, if I do a ?fwreinit=true)

And here is the strack trace:
coldfusion.runtime.UndefinedElementException: Element ISSPIDER is
undefined in REQUEST.
  at coldfusion.runtime.CfJspPage.resolveCanonicalName(CfJspPage.java:
1724)
  at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1677)
  at
coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:
1812)
  at
coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:
1805)
  at cfRequestData2ecfc905036094$funcPREPROCESS.runFunction(D:\Data
\waser\oosV3\coldbox\interceptors\RequestData.cfc:167)
  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 coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)
  at cfInterceptorState2ecfc1081790417$funcINVOKER.runFunction(D:\Data
\coldbox\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 cfInterceptorState2ecfc1081790417$funcPROCESS.runFunction(D:\Data
\coldbox\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 cfInterceptorService2ecfc1529859069$funcPROCESSSTATE.runFunction(D:
\Data\coldbox\system\web\services\InterceptorService.cfc:132)
  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 cfColdbox2ecfc1519042499$funcPROCESSCOLDBOXREQUEST.runFunction(D:
\Data\coldbox\system\Coldbox.cfc:206)
  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.CfJspPage._invokeUDF(CfJspPage.java:2582)
  at cfApplication2ecfc1098087134$funcONREQUESTSTART.runFunction(D:\Data
\waser\oosV3\coldbox\Application.cfc:89)
  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.MonitoringFilter.invoke(MonitoringFilter.java:
40)
  at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
  at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
  at
coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:
79)
  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
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)

...and... I get the error only on 3.5Beta; 3.1 doesn't produce any
error.

seems strange jurg, because ColDbox does not touch the request scope for you. Might be something else.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Luis,

I was able to reproduce this in an easy way. Just take the
"SuperSimple" Template from the 3.5Beta-Build.
In the Application.cfc insert a <cfset request.testVar=18 /> just
before the "onRequestStart" function. Then do a <cfdump
var="#request#"> within views/General/index.cfm and see what happens.
In my config (CF 9.01; Windows) I get the following results

ColdBox 3.1:
First run after CF-restart: "request.testVar" is defined
then, after ?fwreinit=true: "request.testVar" is defined

ColdBox 3.5Beta:
First run after CF-restart: "request.testVar" is defined
then, after ?fwreinit=true: "request.testVar" is NOT defined => this
is strange, right?

Can you also reproduce this behaviour?

Jurg,
I was able to reproduce it. fwreinit, clears the request scope to start a request fresh.

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

It only happens on the fwreinit though, so not sure, if this should change? Thoughts?

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

This behaviour has actually been changed from 3.1, hasn't it? Because
it works with 3.1.
I personally think, that code before any function should also been
executed if a fwreinit is in progress (in this example, set variables
in the request scope).

Done!

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Great, thanks. Is this already in the downloadable beta-Build?
Or github?

github

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano