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.ha
nd
leQ
ueryWithUnboundKey(NSKeyValueCoding.java:1316)
at
com.webobjects.appserver.WOSession.handleQueryWithUnboundKey(WOSess
io
n.j
ava:1574)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithU
nb
oun
dKey(NSKeyValueCoding.java:544)
at
com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObjec
t(
NSK
eyValueCoding.java:920)
at
com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.va
lu
eFo
rKey(NSKeyValueCoding.java:1268)
at
com.webobjects.appserver.WOSession.valueForKey(WOSession.java:1562)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKe
yV
alu
eCoding.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplemen
ta
tio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:216)
at
com.webobjects.appserver.WOSession.valueForKeyPath(WOSession.java:
1592)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueFo
rK
eyP
ath(NSKeyValueCodingAdditions.java:149)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplemen
ta
tio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:217)
at
com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.ja
va
:
1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComp
on
ent
(WOKeyValueAssociation.java:46)
at
com.webobjects.appserver._private.WOString.appendToResponse(WOStrin
g.
jav
a:55)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRe
sp
ons
e(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(W
OD
yna
micGroup.java:130)
at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.j
av
a:
992)
at
com.webobjects.appserver._private.WOComponentReference.appendToResp
on
se(
WOComponentReference.java:111)
at
com.webobjects.appserver._private.WODynamicGroup.appendChildrenToRe
sp
ons
e(WODynamicGroup.java:121)
at
com.webobjects.appserver._private.WODynamicGroup.appendToResponse(W
OD
yna
micGroup.java:130)
at
com.webobjects.appserver.WOComponent.appendToResponse(WOComponent.j
av
a:
992)
at
com.webobjects.appserver.WOSession.appendToResponse(WOSession.java:
1198)
at
com.webobjects.appserver.WOApplication.appendToResponse(WOApplicati
on
.ja
va:1418)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispat
ch
Wit
hPreparedPage(WOComponentRequestHandler.java:230)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispat
ch
Wit
hPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispat
ch
Wit
hPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handle
Re
que
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.handleR
eq
ues
t(WOComponentRequestHandler.java:435)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplicatio
n.
jav
a:1306)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerTh
re
ad.
java:173)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread
.j
ava
: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:
chill@global-villag