Re: Prototype mutableArray savechanges error
Re: Prototype mutableArray savechanges error
- Subject: Re: Prototype mutableArray savechanges error
- From: Chuck Hill <email@hidden>
- Date: Wed, 27 May 2009 12:40:03 -0700
On May 27, 2009, at 12:36 PM, Frank Stock wrote:
I don't get it Chuck. If I go in the Entity modeler then I can slect
in Prototype - mutableArray, my external type is BLOB and the value
class is ERXMutableArray.
What has that to do with a to-many relationship? I only do this as
an easy way to save some numbers.
Just because you CAN select it does not make it safe to use. Anjo had
some way of using this safely, but you need to be aware that EOF is
NOT expecting the contents of that array to change.
None of this explains the StackOverflow. I think you have two
problems. 1: Using a mutable attribute. 2: Something causing the
stackoverflow. They are probably not connected.
Chuck
Frank
Op 27-mei-09, om 21:29 heeft Chuck Hill het volgende geschreven:
On May 27, 2009, at 12:26 PM, Frank Stock wrote:
Ok, but why does the generator creates the following:
public er.extensions.foundation.ERXMutableArray ordernummers() {
return (er.extensions.foundation.ERXMutableArray)
storedValueForKey("ordernummers");
}
Is ordernummers an attribute or a to-many relationship? If it is a
to-many relationship, this is normal. If this is an attribute, you
have a problem. The generator just generates what you have
modeled. If you model bad things, it will happily generate them.
Chuck
public void
setOrdernummers(er.extensions.foundation.ERXMutableArray value) {
if (_Paklijst.LOG.isDebugEnabled()) {
_Paklijst.LOG.debug( "updating ordernummers from " +
ordernummers() + " to " + value);
}
takeStoredValueForKey(value, "ordernummers");
}
If I do aPaklijst.setOrdernummers(arORderNrs.immutableClone());
then I get an error saying it should be an ERXMutableArray
How can I change that?
Frank
Op 27-mei-09, om 21:13 heeft Chuck Hill het volgende geschreven:
On May 27, 2009, at 12:02 PM, Frank Stock wrote:
Hi,
In my Entity, one of my Attributes has mutableArray as prototype.
See Commandment 7:
http://wiki.objectstyle.org/confluence/display/WO/EOF-Using+EOF-The+EOF+Commandments
See page 32 of Practical WebObjects.
You want to be really, really sure you know what you are doing if
you use mutable values. Get it wrong, and EOF will have its
revenge.
So if is set that Attribute and do saveChanges, the I get the
error. It was working in the past, so I think it might have
something to do with an update (nightly wolips?, wonder?)
I really don't now where to look.
Check for changes in ERXGenericRecord. Maybe something created
an infinte loop if you use mutable values:
27 18:08:08 chemlabVerkoop[53722]
(ERXDatabaseContextDelegate.java:160) INFO
er.transaction.adaptor.Exceptions - Database Exception
occured: com.webobjects.foundation.NSForwardException
[java.lang.StackOverflowError] null
Chuck
Op 27-mei-09, om 19:51 heeft Chuck Hill het volgende geschreven:
On May 27, 2009, at 9:15 AM, Frank Stock wrote:
Hi,
When setting a ERXMutableArray to a ERXGenericRecord,
What do you mean by "setting a ERXMutableArray to a
ERXGenericRecord"?
Chuck
I suddenly get the following error:
Where can I find what is going wrong, it used to work.
27 18:08:08 chemlabVerkoop[53722]
(ERXDatabaseContextDelegate.java:160) INFO
er.transaction.adaptor.Exceptions - Database Exception
occured: com.webobjects.foundation.NSForwardException
[java.lang.StackOverflowError] null
mei 27 18:08:08 chemlabVerkoop[53722]
(ERXNSLogLog4jBridge.java:46) DEBUG NSLog - === Rollback
Internal Transaction
mei 27 18:08:08 chemlabVerkoop[53722]
(ERXNSLogLog4jBridge.java:43) WARN NSLog -
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.eoaccess.EOGeneralAdaptorException
[2009-05-27 18:08:08 CEST] <WorkerThread5>
com.webobjects.eoaccess.EOGeneralAdaptorException
at
com
.webobjects
.eoaccess
.EODatabaseContext
._exceptionWithDatabaseContextInformationAdded
(EODatabaseContext.java:4685)
at
com
.webobjects
.eoaccess
.EODatabaseContext.performChanges(EODatabaseContext.java:6393)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.saveChangesInEditingContext(EOObjectStoreCoordinator.java:415)
at
com
.webobjects
.eocontrol.EOEditingContext.saveChanges(EOEditingContext.java:
3226)
at er.extensions.eof.ERXEC._saveChanges(ERXEC.java:981)
at er.extensions.eof.ERXEC.saveChanges(ERXEC.java:903)
at pdf.PDF_paklijst.maak_pdf(PDF_paklijst.java:371)
at
Component
.VerzendingComponent
.uitprintenPacklijst(VerzendingComponent.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
Thanks
Frank Stock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC'09 in San Fran this June!
http://www.wocommunity.org/wowodc09/
_______________________________________________
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