Hi!I'm having the following problem when adding two objects to the database:
Feb 03 17:48:27 (ERXDatabaseContextDelegate.java:160) INFO er.transaction.adaptor.Exceptions - Database Exception occured: java.lang.IllegalArgumentException: Array is empty Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:40) INFO NSLog - Array is empty
java.lang.IllegalArgumentException: Array is empty
at com.webobjects.foundation.NSArray.objectAtIndex(NSArray.java:392)
at
com
.webobjects
.eoaccess
.EOAdaptorChannel
.dictionaryWithObjectsForAttributes(EOAdaptorChannel.java:1269)
at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:
1408)
at
com
.webobjects
.jdbcadaptor.PostgresqlPlugIn.newPrimaryKeys(PostgresqlPlugIn.java:189)
at
com
.webobjects
.jdbcadaptor
.JDBCChannel.primaryKeysForNewRowsWithEntity(JDBCChannel.java:537)
at
com
.webobjects
.eoaccess
.EODatabaseContext
._batchNewPrimaryKeysWithEntity(EODatabaseContext.java:5900)
at
com
.webobjects
.eoaccess
.EODatabaseContext
.prepareForSaveWithCoordinator(EODatabaseContext.java:5883)
at
com
.webobjects
.eocontrol
.EOObjectStoreCoordinator
.saveChangesInEditingContext(EOObjectStoreCoordinator.java:409)
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)
The SQL log says:
Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - ===
Begin Internal Transaction
Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:46) DEBUG NSLog -
evaluateExpression: <com.webobjects.jdbcadaptor.PostgresqlExpression:
"SELECT NEXTVAL('address_seq') AS KEY1, NEXTVAL('address_seq') AS KEY0">
Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - fetch
canceled
Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - 0 row(s)
processed
Feb 03 17:48:27 (ERXNSLogLog4jBridge.java:46) DEBUG NSLog - ===
Commit Internal Transaction
Note the "fetch canceled". What the heck is this? The query works when used in the database command line, and the exact same code works in other parts of the application.
An interesting fact may be that I'm using EOUtilites.rawRowsForSQL before the saveChanges, in the same RR loop, but in a different editing context.
Any ideas? I'm kinda stuck on this one... Yours Miguel Arroz ........................... http://www.survs.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
