• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]


  • Subject: Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
  • From: Ray Kiddy <email@hidden>
  • Date: Tue, 16 Jan 2007 10:56:09 -0800


On Jan 16, 2007, at 7:09 AM, email@hidden wrote:

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

Ah. I did the project first using EOGR. Then I remembered you had used custom objects, so I put the custom object name in, generated source, built and ran. I obviously ran into a similar problem to yours, as I suspect I did not save the model.


One thing to remember is this. Xcode is very good at figuring out the dependencies between ObjC and headers and such. WebObjects is a different kind of beast and the dependency analysis is tricky and sometimes it is lacking. I do "Clean All' builds often. Perhaps I do them too often, but the most one knows about Xcode dependency tracking of WebObjects projects, the less one knows one knows. If you get my meaning. :-)

Oh. And sometimes a 'Clean All' build does not do everything you think it might. I also completely delete the 'build' directory, probably more often than it is needed.

Or you can call it a "Gremlin". Whichever.

- ray

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
  • Follow-Ups:
    • Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
      • From: Lachlan Deck <email@hidden>
References: 
 >D2WEditToOneRelationShip java.lang.IllegalArgumentException (From: email@hidden)
 >Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException (From: Ray Kiddy <email@hidden>)
 >Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved] (From: email@hidden)

  • Prev by Date: Re: Servlets and FrontBase
  • Next by Date: multiple build targets in xcode
  • Previous by thread: Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
  • Next by thread: Re: D2WEditToOneRelationShip java.lang.IllegalArgumentException [Solved]
  • Index(es):
    • Date
    • Thread