• 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
Feedback about issue with MySQL and get primary key
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feedback about issue with MySQL and get primary key


  • Subject: Feedback about issue with MySQL and get primary key
  • From: Philippe Rabier <email@hidden>
  • Date: Sun, 04 Sep 2011 16:49:22 +0200

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

 _______________________________________________
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: Feedback about issue with MySQL and get primary key
      • From: Chuck Hill <email@hidden>
    • Re: Feedback about issue with MySQL and get primary key
      • From: Ray Kiddy <email@hidden>
  • Prev by Date: Re: Mac OS X 10.7 (Lion), Apache2.2, WebObjects Problem
  • Next by Date: Re: Feedback about issue with MySQL and get primary key
  • Previous by thread: Re: building new D2W app and get a missing web.xml?
  • Next by thread: Re: Feedback about issue with MySQL and get primary key
  • Index(es):
    • Date
    • Thread