Client And Session Management

Not working when upgrading to MX

Page 1 of 1

5 Replies - 10799 Views - Last Post: 29 December 2004 - 03:30 AM Rate Topic: -----

#1 anthonyGQ  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 04

Client And Session Management

Posted 28 December 2004 - 11:01 AM

Hi Everyone,

I am having a slight problem with my migration to ColdFusion MX from ColdFusion 5. I have the following set up in our application.cfm file.

<cfapplication name="USERPROFILE" clientmanagement="yes" clientstorage="UserInfoTable" setclientcookies="yes" sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0,0,20,0)#" applicationtimeout="#CreateTimeSpan(1,0,0,0)#">

When I try to execute it, it gets the following error which I don't understand why because it worked perfectly fine in ColdFusion 5.

The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values.


The error occurred in C:InetpubwwwrootApplication.cfm: line 5

3 : clientmanagement="yes"
4 : clientstorage="UserInfoTable"
5 : setclientcookies="no"
6 : sessionmanagement="yes"
7 : sessiontimeout=#CreateTimeSpan(0,0,20,0)#

The Stack Trace looks like the following:

java.lang.NullPointerException
at coldfusion.runtime.ClientScopeKey.hashCode(ClientScopeKey.java:29)
at java.util.Hashtable.get(Hashtable.java:333)
at coldfusion.runtime.ClientScopeServiceImpl.GetClientScope(ClientScopeServiceImpl.java:168)
at coldfusion.tagext.lang.ApplicationTag.setupClientScope(ApplicationTag.java:571)
at coldfusion.tagext.lang.ApplicationTag.doStartTag(ApplicationTag.java:283)
at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1876)
at cfApplication2ecfm953308864.runPage(C:InetpubwwwrootApplication.cfm:5)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
at coldfusion.filter.CfincludeFilter.include(CfincludeFilter.java:30)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:93)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:24)
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:249)
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)


Any help or explanation would be much appreciated. Thank you so much ahead of time.

- Anthony

Is This A Good Question/Topic? 0
  • +

Replies To: Client And Session Management

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1953
  • View blog
  • Posts: 20,377
  • Joined: 17-March 01

Re: Client And Session Management

Posted 28 December 2004 - 12:40 PM

Grrr. I don't know, the code works fine on my MX server. I'm wondering if it's got something to do with the datasource you are using for storing sessions?!
Was This Post Helpful? 0
  • +
  • -

#3 anthonyGQ  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 04

Re: Client And Session Management

Posted 28 December 2004 - 01:05 PM

Would you suggest I change to COOKIES or REGISTRY for CLIENT VARIABLES and see if that works. Then we can probably narrow it down to if its the datasource or not. The datasource we are using is Microsoft Access. Not sure if that could be the problem.
Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1953
  • View blog
  • Posts: 20,377
  • Joined: 17-March 01

Re: Client And Session Management

Posted 28 December 2004 - 01:21 PM

I would do that first, then start taking lines out of the session management like the setcookies and such until it starts working. Obviously some of them have to be in there for your application to work if you are using sessions.
Was This Post Helpful? 0
  • +
  • -

#5 anthonyGQ  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 28-December 04

Re: Client And Session Management

Posted 28 December 2004 - 03:02 PM

I tried setting CLIENT VARIABLES to Registry and Cookies and in Code and it did not work. I started removing parts of the cfapplication and it seems as though CLIENTMANAGEMENT and SESSIONMANAGEMENT cannot be enabled together. Once I removed all the CLIENT stuff such as CLIENTMANAGEMENT, CLIENTSTORAGE, and SETCLIENTCOOKIES, it works fine except now CLIENT MANAGEMENT is not enabled and I cannot use CLIENT Variables in my application which exist already.

Do you think it could be code after that section of code? I don't think it is because it broke before any other code was executed.

I am just wondering if CLIENT and SESSION MANAGEMENT can be enabled together. If so, it could be how we installed CFMX onto the server. How is your server set up? Which installation option did you use when installing ColdFusion MX 6.1 onto the server. New options use JRun, etc. Did you choose any of those?
Was This Post Helpful? 0
  • +
  • -

#6 SpongeC  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 17-December 04

Re: Client And Session Management

Posted 29 December 2004 - 03:30 AM

I couldn't reproduce your problem either but i think i have an idea on what went wrong. If you used the same datasource/client variable named 'UserInfoTable' for your clientstorage then maybe that's the problem.

I created a new client variable in the administration from my datasources. I used a similar cfapplication tag to yours and in my database 2 new tables were created. Those are cfdata and cfglobal. What could be your problem is that the tables are not the same in coldfusion 5 and mx. I would write the create statements of those table to compare with yours.

# Table "cdata" DDL

CREATE TABLE `cdata` (
  `cfid` varchar(64) NOT NULL default '',
  `app` varchar(64) NOT NULL default '',
  `data` text,
  UNIQUE KEY `id1` (`cfid`,`app`)
) TYPE=MyISAM


# Table "cglobal" DDL

CREATE TABLE `cglobal` (
  `cfid` varchar(64) NOT NULL default '',
  `data` text,
  `lvisit` datetime NOT NULL default '0000-00-00 00:00:00',
  KEY `id2` (`cfid`),
  KEY `id3` (`lvisit`)
) TYPE=MyISAM




Please note that I am using MySQL.

If that is your problem then simply delete the tables cfdata and cfglobal.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1