java client relationship bug?
java client relationship bug?
- Subject: java client relationship bug?
- From: Robert Marsa <email@hidden>
- Date: Thu, 24 Mar 2005 14:04:41 -0600
Hi. I've been having problems with getting NullPointerException's in
my direct to java client application. In trying to track them down, I
created a very simple test application which exhibits the same behavior
leading me to wonder if there is a bug in WebObjects.
Here is the setup:
I have two objects, Name and Number. Name has a primary key of nameID
and a foreign key of numberID. Neither of these is a server or client
property. Name has a String attribute "name" which is both a server
and client property.
Number has a primary key of numberID which is neither a server nor
client property and the Integer attribute "value" which is both a
server and client property.
Name has a one-to-many relationship with Number which is named 'number'
and links Name.numberID with Number.numberID. This relationship is
visible on the client. It is set to be mandatory with a "no action"
delete rule. All pretty standard.
I then create and build a standard direct-to-java client application.
In the assistant I set Number to be an enumeration entity. I can then
run the application and add Numbers to my hearts content. But if I
create a new Name and save it, I get a NullPointerException on the
client although everything works fine on the server. The stack trace
is:
apple.awt.EventQueueExceptionHandler Caught Throwable :
java.lang.NullPointerException
java.lang.NullPointerException
at
com.webobjects.eodistribution.client.EODistributedObjectStore._fireDefer
redFault(EODistributedObjectStore.java:1159)
at
com.webobjects.eodistribution.client.EODistributionDeferredFaultHandler.
createFaultForDeferredFault(EODistributionDeferredFaultHandler.java:20)
at
com.webobjects.eocontrol.EOCustomObject.willReadRelationship(EOCustomObj
ect.java:1302)
at
com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyG
enericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:
560)
at
com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.java:
1559)
at
com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValu
eCoding.java:498)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementatio
n.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
at
com.webobjects.eocontrol.EOCustomObject.valueForKeyPath(EOCustomObject.j
ava:1675)
at
com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyP
ath(NSKeyValueCodingAdditions.java:149)
at
com.webobjects.eointerface.EODisplayGroup.valueForObject(EODisplayGroup.
java:3371)
at
com.webobjects.eointerface.EODisplayGroup.selectedObjectValueForKey(EODi
splayGroup.java:3397)
at
com.webobjects.eointerface.EOAssociation.valueForAspect(EOAssociation.ja
va:748)
at
com.webobjects.eointerface.EOValueSelectionAssociation.subjectChanged(EO
ValueSelectionAssociation.java:336)
at
com.webobjects.eocontrol.EODelayedObserverQueue.notifyObserversUpToPrior
ity(EODelayedObserverQueue.java:235)
at
com.webobjects.eocontrol.EODelayedObserverQueue._processEndOfEventObserv
ers(EODelayedObserverQueue.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.webobjects.foundation.NSSelector.invoke(NSSelector.java:354)
at
com.webobjects.foundation.NSSelector._safeInvokeSelector(NSSelector.java
:108)
at
com.webobjects.foundation.NSDelayedCallbackCenter$NSLightInvocation.invo
ke(NSDelayedCallbackCenter.java:242)
at
com.webobjects.foundation.NSDelayedCallbackCenter._eventEnded(NSDelayedC
allbackCenter.java:208)
at
com.webobjects.eointerface.swing.EOSwingUtilities$1.run(EOSwingUtilities
.java:162)
at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThrea
d.java:234)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.
java:184)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:170)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
If I quit and rerun the client, the Name shows up fine with the correct
Number linked to it. But upon creation, it somehow sends the correct
object to the server which gets saved, but when the user interface
redraws, the relationship is returning null.
What is going on and how can I fix it?
Thanks,
Robert
_______________________________________________
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