Hi
all,
Not a question but a feedback if you have the same issue but I don't
have explanation and I didn't look for any.
Env:
WO 5.4.3, java 6 on Mac OS X 10.6.7, Eclipse 3.4, Wonder a bit old
(several months), MySQL v5.0.88
Context:
DA where informations are checked, fetched then if everything is
fine, informations are saved. At the end, we write into a log the request
plus the result and some informations (IP address, …).
When informations are saved, I decided to
use EOUtilities.rawRowsForSQL to execute an insert sql command in
order to optimize the complete R-R.
Then I write into the log the request, result, … as I said.
If the insert command is executed, when the log is saved (through its
editingContext), I got an exception when the adaptor tries to get a new
primary key:
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] DEBUG NSLog - Searching for primary key
value for NO_Sent_Notification_Request_Log_TEST
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] DEBUG NSLog - evaluateExpression:
<com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: "SELECT PK
FROM EO_PK_TABLE WHERE NAME = 'NO_Sent_Notification_Request_Log_TEST' FOR
UPDATE" withBindings: >
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] INFO
er.extensions.ERXAdaptorChannelDelegate.sqlLogging -
"Unknown"@795485135 _expression_ took 232 ms: SELECT PK FROM EO_PK_TABLE
WHERE NAME = 'NO_Sent_Notification_Request_Log_TEST' FOR UPDATE
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] DEBUG NSLog - fetch canceled
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] DEBUG NSLog - 0 row(s) processed
Sep 04 14:52:56
YNP_NOWebServicesApp[5000] INFO
er.transaction.adaptor.Exceptions - Database Exception occured:
java.lang.IllegalArgumentException:
Array is empty
If I replace EOUtilities.rawRowsForSQL
with ERXEOAccessUtilities.insertRow(ec,
NOAppOpenedAfterPushEvent.Keys.ENTITY_NAME, dic), everything works
great.
For those who were wondering why I wanted to
use EOUtilities.rawRowsForSQL(), the reason is that I wanted to
use "INSERT DELAYED INTO ".
Have a good sunday.
Philippe