Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Another Phil #1
Session is Invalid
Hello,
Up until recently I was having no Session issues. However, recently I had to
start using some J2EE code in one of my CF templates. By accident I discovered
that I now have an error whenever the session expires. After looking up some
information regarding this error, I tried setting the app. session to be 5
minutes less than the Java session expiration. I'm currently out of ideas and
would appreciate any assistance.
For some background information:
I am developing on Coldfusion MX, but the server housing the code is version 5
(not my choice).
In my CFusionMX\wwwroot\WEB-INF\web.xml file I have:
<session-timeout>30</session-timeout>.
My Application.cfm file contains the following: <cfapplication
name="server_ap" sessiontimeout="#CreateTimeSpan("0","0","25","0")# "
sessionmanagement="yes" setclientcookies="yes">
At the start of every page I had code to send the user to the login page
should the session have expired:
<cflock timeout="60" scope="session" type="readonly">
<cfif Not IsDefined("session.uid")>
<cflocation url="login.cfm">
</cfif>
</cflock>
The error info is:
Session is invalid
The error occurred in C:\Program Files\Apache
Group\Apache2\htdocs\####\Application.cfm: line 1
Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) --- Is actually
MSIE 6.0.2800.1106.xpsp2_gdr.040517-1325 ---
Expanding the Stack Trace gives the following:
at cfApplication2ecfm853531991.runPage(C:\Program Files\Apache
Group\Apache2\htdocs\####\Application.cfm:1)
java.lang.IllegalStateException: Session is invalid
at jrun.servlet.session.JRunSession.checkSessionValid ity(JRunSession.java:379)
at jrun.servlet.session.JRunSession.setAttribute(JRun Session.java:272)
at coldfusion.runtime.J2eeSessionScope.put(J2eeSessio nScope.java:69)
at
coldfusion.tagext.lang.ApplicationTag.computeURLTo ken(ApplicationTag.java:542)
at coldfusion.tagext.lang.ApplicationTag.doStartTag(A pplicationTag.java:284)
at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.j ava:1871)
at cfApplication2ecfm853531991.runPage(C:\Program Files\Apache
Group\Apache2\htdocs\esx\Application.cfm:2)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :147)
at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:357)
at coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:62)
at coldfusion.filter.CfincludeFilter.include(Cfinclud eFilter.java:30)
at coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:93)
at coldfusion.filter.PathFilter.invoke(PathFilter.jav a:80)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:24)
at coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:47)
at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:35)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:43)
at coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22)
at coldfusion.CfmServlet.service(CfmServlet.java:105)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:252)
at jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527)
at
jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:192)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:451)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)
I have tried a few things but can't seem to solve the problem. Any ideas would
be greatly appreciated.
Thank you,
Phil
Another Phil Guest
-
#40470 [NEW]: Invalid session id should specify actual ID
From: ceo at l-i-e dot com Operating system: all PHP version: 5.2.1 PHP Bug Type: Feature/Change Request Bug description: ... -
session invalid
Hi , I am using coldfusion MX 7 and trying to enable my j2ee session variables but i getting session invalid.Can anyone suggest or help me,... -
Session is invalid error for CF 7
Hello, I am searching for a solution for ColdFusion MX 7. I am getting the "Session is invalid" error ocassionaly. I know there is an article... -
Session invalid error message
I've run into a very odd error. I have an application that occasionally throws the following error message when a user attempts to login: ... -
#25405 [Opn->Fbk]: The session id contains invalid characters
ID: 25405 Updated by: sniper@php.net Reported By: pop501 at hotmail dot com -Status: Open +Status: ... -
Sarge #2
Re: Session is Invalid
Phil, You are not alone in seeing this issue. I am currently working with an
ISP to help resolve the issue on their servers. However the problem is that
this does not appear consistenly. You have implemented the known workaround --
increasing the J2EE session timeout in web.xml to greater than the CF Session
timeout (actually, also insure that your Max Session Timeout in the CF Admin is
less than the J2EE session timeout value). If you can verifiably reproduce
this, run CF from the command-line and capture thread dumps at the moment of
the error. Capture a good thread dump when you first get CF started, then
capture as many as possible when recreating the error. Thread dumps will
provide us with more insight into what's going on. Please send me the thread
dumps directly. See the Debugging stack traces in ColdFusion MX technote for
info on capturing thead dumps (stack traces) at
[url]http://www.macromedia.com/go/tn_18339[/url]. Thanks,
Sarge Guest
-
Another Phil #3
Re: Session is Invalid
Actually, I just checked and the maximum session times were set to 2 days. I'm
in the process of doing the test and changed the times to 25 minutes each.
However, if this does solve my problem, it might not be the solution I'm
looking for as these types of solutions may not be available on the server this
app is housed upon.
Regardless, I'll try to send you a copy of both types of dumps.
-Phil
Another Phil Guest
-
Another Phil #4
Re: Session is Invalid
*boogle* Ok. I don't understand.
After changing the maximum session times to 25 minutes instead of 2 days it
worked fine, no error. I figure ok, maybe that was the problem and fire off
another test, this time with the maximum session times set to 2 days again.
No error.
Not sure why it is fixed, but I can't reproduce that error to get you a dump.
Really odd how it happened every time a timeout occured last week and after
changing that time back and forth it fixed it. *shrug*
Thank you anyway,
Phil
Another Phil Guest
-
Another Phil #5
Re: Session is Invalid
FYI - I did a bit more playing around and I discovered exactly what the problem
was on this machine.
To re-iterate:
Using: ColdFusion MX (6)
Java Session timeout = 30 minutes
Application Session timeout = 25 minutes
Maximum Session timeout = 2 days.
The application I've been working on is a world-wide app and therefore has to
account for the same time in different time zones and has to calculate Daylight
Savings when it appiles. I've been testing this by changing the month in
Windows to June to see if the time changes as it should.
Apperently doing this caused my problem and not the Maximum Session Timeout
being greater than the Java Session Timeout.
When I change the Month in Windows, the "Session is Invalid" error appears
when a session times out. Re-starting the CF Service fixes this entirely.
-Phil
Another Phil Guest
-
Unregistered #6
Re: Session is Invalid
Hi All,
We are facing the same session invalid issues. I can see more than 5000 times this error popped up in application log.
we are using multiple server configuration in production kindly find our environment details below
Coldfusion version:8,0,1,195765
Maximum timeout of session variable:59 mints
Timeout in web.xml:65
I understand that "Session is invalid" exception is happening when CF is trying to access the expired J2ee session.
But as per the above settings that can happen only if the cf session only extending and j2ee session is not.
Please let me know if you have any ideas.
Thanks,
Prasanna Venkatesan.S
Email:prasi.be@gmail.comUnregistered Guest



Reply With Quote

