Not Using Correct Session Sub Class?
Not Using Correct Session Sub Class?
- Subject: Not Using Correct Session Sub Class?
- From: Hunter Hillegas <email@hidden>
- Date: Wed, 5 Jan 2005 15:04:58 -0800
I am having a problem with my app seemingly not using the correct
Session subclass.
I have a framework that includes a class called PDSession in a package
com.foo.PDSession. PDSession extends WOSession. I've done this before.
No problems.
PDSession has some methods and instance variables, etc...
In my app, I have Session.java extending PDSession.
Everything compiles just fine.
When I launch WOBuilder, the default session instance in the component
shows the variables and methods from PDSession, so it clearly sees the
inheritance. This component reads a string from a variable in PDSession
called loggedInUser. The binding is set to
session.loggedInUser.firstName.
When I run the app, I get this:
[2005-01-05 14:58:09 PST] <WorkerThread1>
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
<Session 0xc09d02> valueForKey(): lookup of unknown key:
'loggedInUser'.
This class does not have an instance variable of the name loggedInUser
or _loggedInUser, nor a method of the name loggedInUser, _loggedInUser,
getLoggedInUser, or _getLoggedInUser
Huh? Why can't the app see the session variables when WOBuilder can?
Have I missed something silly?
I tried ditching XCode's build folders and rebuilding the framework and
app. If it makes any difference, I also have ERExtensions included as a
framework in this project.
Any help appreciated.
Hunter
Full Stack Trace:
[2005-01-05 14:58:09 PST] <WorkerThread1>
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
<Session 0xc09d02> valueForKey(): lookup of unknown key:
'loggedInUser'.
This class does not have an instance variable of the name loggedInUser
or _loggedInUser, nor a method of the name loggedInUser, _loggedInUser,
getLoggedInUser, or _getLoggedInUser
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.handleQ
ueryWithUnboundKey(NSKeyValueCoding.java:1316)
at
com.webobjects.appserver.WOSession.handleQueryWithUnboundKey(WOSession.j
ava:1574)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboun
dKey(NSKeyValueCoding.java:544)
at
com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSK
eyValueCoding.java:920)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueFo
rKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOSession.valueForKey(WOSession.java:1562)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValu
eCoding.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementatio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
at
com.webobjects.appserver.WOSession.valueForKeyPath(WOSession.java:1592)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyP
ath(NSKeyValueCodingAdditions.java:149)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementatio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:
1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent
(WOKeyValueAssociation.java:46)
at
com.webobjects.appserver._private.WOString.appendToResponse(WOString.jav
a:55)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
992)
at
com.webobjects.appserver._private.WOComponentReference.appendToResponse(
WOComponentReference.java:111)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRespons
e(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(WODyna
micGroup.java:130)
at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.java:
992)
at
com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:
1198)
at
com.webobjects.appserver.WOApplication.appendToResponse(WOApplication.ja
va:1418)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedPage(WOComponentRequestHandler.java:230)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque
st(WOCompo8032 [WorkerThread1] WARN NSLog -
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException:
<Session 0xc09d02> valueForKey(): lookup of unknown key:
'loggedInUser'.
This class does not have an instance variable of the name loggedInUser
or _loggedInUser, nor a method of the name loggedInUser, _loggedInUser,
getLoggedInUser, or _getLoggedInUser
nentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques
t(WOComponentRequestHandler.java:435)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.jav
a:1306)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.
java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java
:254)
at java.lang.Thread.run(Thread.java:552)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden