Topic: Application.cfm error


sanjay255310    -- 07-27-2007 @ 11:08 AM
  Hi,
I'm new to this forum.I have a serious problem with Application.cfm. Please any one help me to sort out this.
Here is the error details:
Error Occurred While Processing Request  

  
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser   Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM; .NET CLR 1.1.4322)
Remote Address   127.0.0.1
Referrer    
Date/Time   27-Jul-07 10:58 AM

Stack Trace (click to expand)  



coldfusion.filter.ApplicationFilter$ReservedTemplateException:
     at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:72)
     at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
     at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
     at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
     at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
     at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
     at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
     at coldfusion.CfmServlet.service(CfmServlet.java:105)
     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
     at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
     at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
     at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)





Sanjay Kumar Sharma


dlackey    -- 07-27-2007 @ 1:18 PM
  we are going to need a LOT more information in order to help.

Some things to check:

1)  Make sure Application.cfm is spelled 'Application.cfm' and not 'application.cfm'  On some web servers, it is case-sensitive
2)  Are you trying to browse this file directly?  If so, you cannot do that.  It is a protected file.
3)  Are you sure the problem is with the Application.cfm file and not another cfm page?

If you can post the contents of the Application.cfm file, that would help (remove any passwords and settings first!) and possibly the page that you ARE browsing so we can see what references that page may be making to the Application.cfm file.

Hope this makes sense...

Cheers,
Chip


sanjay255310    -- 07-27-2007 @ 1:58 PM
  Thanks.
1.I'm writing Application.cfm while saving it not application.cfm.
2.I'm runnning it on my test site under root directory.
3. Even if all the code is under comments file still gives error with Application.cfm name.

4. The code I'm writing is:
<CFAPPLICATION NAME="Give you application name here"
     SESSIONMANAGEMENT="Yes"
     SESSIONTIMEOUT=#CreateTimeSpan("1", "0", "0", "0")#>

     
<cfif isdefined("cookie.cfid") AND isdefined("cookie.cftoken")>
<cfcookie name="cfid" value="#cookie.cfid#">
<cfcookie name="cftoken" value="#cookie.cftoken#">
</cfif>

<!--- store datasource name in request variable--->
<cfset REQUEST.DSN = "i_online_stock">

<!--- store datasource name in application variable--->
<cfset Application.OLSDSN = "i_online_stock">
     

<!--- put this file in root folder--->



Sanjay Kumar Sharma


dlackey    -- 07-27-2007 @ 2:07 PM
  Sanjay,

I copied your code from the Application.cfm and tried it and did not recieve any errors.

I did give the application a name, i_online_stock (I used underscores in place of spaces - I don't like to use spaces in the application name).  


<CFAPPLICATION NAME="i_online_stock" SESSIONMANAGEMENT="Yes" SESSIONTIMEOUT=#CreateTimeSpan("1", "0", "0", "0")#>

Here is my mine, as you can see, they are essentially the same.  

<cfapplication name="ThePD" sessionmanagement="Yes" sessiontimeout="#CreateTimeSpan(0,0,40,0)#">


Since you are deveoping locally, have you turned on debugging?

Cheers,
Chip


sanjay255310    -- 07-27-2007 @ 2:16 PM
  Thanks Chip for so much help.
Yes I have activated the debug mode already.Following is the debugging message.

Error Occurred While Processing Request  

  
Please try the following:
Check the ColdFusion documentation to verify that you are using the correct syntax.
Search the Knowledge Base to find a solution to your problem.


Browser   Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM; .NET CLR 1.1.4322)
Remote Address   127.0.0.1
Referrer    
Date/Time   27-Jul-07 10:58 AM

Stack Trace (click to expand)  



coldfusion.filter.ApplicationFilter$ReservedTemplateException:
     at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:72)
     at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
     at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
     at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
     at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
     at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
     at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
     at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
     at coldfusion.CfmServlet.service(CfmServlet.java:105)
     at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
     at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
     at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:252)
     at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
     at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
     at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
     at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
     at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
     at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)


Is there any problem in my root directory,intallation?

Please help me as Application.cfm file is the main file in the project.
If you would search  ReservedTemplateException  in macromedia technical notes you would find better information about this.

Please help meeeeeeeeeeeeee



Sanjay Kumar Sharma


kicker    -- 07-27-2007 @ 2:54 PM
 
quote:


This exception is thrown when ColdFusion receives requests from a client for Application.cfm or OnRequestEnd.cfm. These templates are special templates reserved by ColdFusion for configuring application level settings. They cannot be directly executed by a client. Any direct request for these reserved templates are considered illegal requests and will trigger the exception.



That is directly from the documents for Coldfusion. My guess is you probably have one or more of the following  happening

1. you are trying to open the Application.cfm file in the browser
2. you have included the Application.cfm file into another file that can be called into the browser
3. you have included the onRequestEnd.cfm file into the  Application.cfm file for one reason or another.
4. you are trying to call the onRequestEnd.cfm file into the browser directly
5. you have included the onRequestEnd.cfm file into another file that is called by a browser.

Those are the possibilities, and from the sounds of what I read are the only reason for you to ever receive that error. I would start looking through your code (all of it) and see if you have included either of those files into your code. Here is the link if you would like to read it.
http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19163

Hope it helps. Smile

Craig
Clearcg.com


sanjay255310    -- 07-27-2007 @ 3:27 PM
  Hi,
1. you are trying to open the Application.cfm file in the browser

Ans:Yes ,I created Application.cfm file ,saved it in my root directory and tried to see it in my browser and it shown the specified errors.
So In your view ,Should I not run or check the Application.cfm file for errors. Please suggest.  


2. you have included the Application.cfm file into another file that can be called into the browser
Ans: I have not included Application.cfm in any other file as I don't have any other file this time.


3. you have included the onRequestEnd.cfm file into the  Application.cfm file for one reason or another.
Ans: I have no other code in Application.cfm other than I provided you in my earlier mails.

4. you are trying to call the onRequestEnd.cfm file into the browser directly
Ans: I have no other file other than Application.cfm

5. you have included the onRequestEnd.cfm file into another file that is called by a browser.
Ans: I have started with Application.cfm file only there is no other file I have created so far.



Sanjay Kumar Sharma


dlackey    -- 07-27-2007 @ 4:24 PM
  1.  CF will not allow you to browse Application.cfm.  If CF did, then anyone could see your setting information, passwords, usernamed, etc.

3.  OnRequestEnd.cfm is like Application.cfm in that onRequestEnd.cfm is like a footer whereas Application.cfm is like a header.  Both of these files are included when you browse any file in your site; which is another reason why you cannot browse these two files directly as they would try to call theirself and you'd end up in an endless loop.

If you are only browsing your index.cfm file (or any other file other than Application.cfm), are you receiving an error?  You said you don't have any other files except for Application.cfm.  Create an index.cfm file and browse that.  I suspect you will find you can browse that file and will not experience an error.  I created a dummy index.cfm file for you to use.  See Below.  save the code and name it whatever you like and then browse it.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
     <title>Sample Index file</title>
</head>

<body>
<p>The values are being called from the Application.cfm</p>

<cfoutput>
Request.dsn #request.dsn#<br />
Application.olsdsn = #Application.OLSDSN#<br />
</cfoutput>

</body>
</html>



Cheers,
Chip

This message was edited by dlackey on 7-27-07 @ 4:26 PM


kicker    -- 07-27-2007 @ 4:25 PM
  Ok so you are doing one of the before mentioned. Stop. You can't "check" your application.cfm file in a browser. Your code is correct for the most part. (You don't need quotes when doing a createTimeSpan you can write it like this: createTimeSpan(0,0,0,0) )
If you want to check to make sure your application file is working then create a new file name it whatever can put this code in it:

<cfoutput>#Application.OLSDSN#</cfoutput>

The above is a variable you created in your application file.

Craig
Clearcg.com


sanjay255310    -- 07-27-2007 @ 5:46 PM
  Hi Friend,
Thanks a lot for your help.
Yes the code provided by you is working perfectly.
So as a summary there is no need to run a Application.fm file in a browser.
Instead I should check it's out put in index.cfm or anyother file rt.............
Thanks again.



Sanjay Kumar Sharma


sanjay255310    -- 07-27-2007 @ 5:50 PM
  Hi Chip and Craig,
You are really genious.........
My problem in now sorted out.
Thanks a lot and be my friends everrrrrrrrrrrrrrrr

Sanjay Kumar Sharma


EasyCFM.COM ColdFusion Forums : http://archive.easycfm.com/forums
Topic: http://archive.easycfm.com/forums/viewmessages.cfm?Forum=18&Topic=12016