Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
- Subject: Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
- From: email@hidden
- Date: Tue, 16 Jan 2007 10:09:16 -0500
Hi Ray,
Thanks for the help. It very much appreciated. You directed me in the
right direction. Earlier on in the project, I had put the wrong value
class in the model which I subsequently fixed but for some reason my
eomodeler change wasn't reflected in Xcode. Gremlins perhaps.
Well I've fixed it again and it now works like a charm.
BTW how come you are using EOGenericRecord in your model yet you have
custom classes?
Thanks again.
Fijai
On Jan 16, 2007, at 4:54 AM, Ray Kiddy wrote:
On Jan 15, 2007, at 9:57 PM, email@hidden wrote:
Hi All,
I have a User object with a to-many relationship to a Keyword
object. The Keyword object has an inverse to-one relationship back
to User.
Using Web Assistant, I've customized the New/Edit Keyword template
to use a D2WEditToOneRelationShip popup box that shows a list of
users. Whenever I save a new keyword, I get a
java.lang.IllegalArgumentException error.
From the stack trace, it looks like this is being caused by the
User.addToKeyword() method. I understand that this method expects
an object as an argument but D2W is passing the index of the
select box which is an int(userID).
This is my first foray into WO so i've pretty much done it all by
the book. All classes were generated by EOmodeler and have not
been modified yet.
I've also tried using D2WEditToOneFault and that yields the same
error.
What gives?
Error:
java.lang.IllegalArgumentException: Object value '5' for column 1
is not an instanceof String.
Reason:
Object value '5' for column 1 is not an instanceof String.
I tried what you described (I think) and it did not have the
problem. Given the error, I would suspect that the EOModel is at
fault.
Look at the attributes in EOModeler. Does the "External Type" match
what you expect? Check the "Value Class (Java)" also. Note that
EOModeler will show you the "Value Class (Obj-C)" by default, for
historical reasons. This is not the same as "Value Class (Java)".
Make sure that the primary and foreign keys are not also class
attributes. They should not have the little diamond next to their
name.
My version of the project is downloadable at http://
www.ganymede.org/wow/resources/20070116/Fijai.tgz. Does this
example show you anything different? I used a MySQL database.
If you find the error, let me know what it was.
thanx - ray
The ff is my stack trace.
JDBCColumn.java, 471, takeInputValue, com.webobjects.jdbcadaptor
JDBCChannel.java, 226, _bindInputVariablesWithBindingsAndExecute,
com.webobjects.jdbcadaptor
JDBCChannel.java, 303, _evaluateExpression,
com.webobjects.jdbcadaptor
JDBCChannel.java, 261, evaluateExpression, com.webobjects.jdbcadaptor
JDBCChannel.java, 185, selectAttributes, com.webobjects.jdbcadaptor
EODatabaseChannel.java, 878,
_selectWithFetchSpecificationEditingContext, com.webobjects.eoaccess
EODatabaseChannel.java, 215, selectObjectsWithFetchSpecification,
com.webobjects.eoaccess
EODatabaseContext.java, 3205,
_objectsWithFetchSpecificationEditingContext, com.webobjects.eoaccess
EODatabaseContext.java, 3346, objectsWithFetchSpecification,
com.webobjects.eoaccess
EOObjectStoreCoordinator.java, 539, objectsWithFetchSpecification,
com.webobjects.eocontrol
EOEditingContext.java, 4114, objectsWithFetchSpecification,
com.webobjects.eocontrol
EODatabaseContext.java, 4260, objectsForSourceGlobalID,
com.webobjects.eoaccess
EOObjectStoreCoordinator.java, 682, objectsForSourceGlobalID,
com.webobjects.eocontrol
EOEditingContext.java, 3965, objectsForSourceGlobalID,
com.webobjects.eocontrol
EODatabaseContext.java, 4427, _fireArrayFault,
com.webobjects.eoaccess
EOAccessArrayFaultHandler.java, 70,
completeInitializationOfObject, com.webobjects.eoaccess
_EOCheapCopyMutableArray.java, 38, willRead, com.webobjects.eocontrol
_EOCheapCopyMutableArray.java, 92, count, com.webobjects.eocontrol
NSArray.java, 639, containsObject, com.webobjects.foundation
EOCustomObject.java, 907, includeObjectIntoPropertyWithKey,
com.webobjects.eocontrol
User.java, 92, addToKeyword, User
...
Thanks Fijai.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ganymede.org
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
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