• 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: Logging SQL statements
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logging SQL statements


  • Subject: Re: Logging SQL statements
  • From: Stirling Olson <email@hidden>
  • Date: Sun, 18 Dec 2005 13:01:44 -0700

Hey Mike,

Thanks. Yeah, I just did some logging on the Postgres side and noticed that I'm getting statements like this:

UPDATE Template SET content = '<stirling></stirling>'::text WHERE (entityId = 22::int8 AND modifyTimeStamp = '2005-12-18 12:07:40.980'::timestamp AND createTimeStamp = '2005-12-18 12:07:40.980'::timestamp AND content = ''::text);

instead of this:

UPDATE Template SET content = '<stirling></stirling>'::text WHERE (entityId = 22::int8 AND modifyTimeStamp = '2005-12-18 12:07:40.98085'::timestamp AND createTimeStamp = '2005-12-18 12:07:40.98085'::timestamp AND content = ''::text);

Notice the difference in digits on the timestamp values. This causes WO to think that the row has been updated outside the application so the update fails. Of course, it is just a matter of a few bits of a second. Anyone know what the solution is to this? I'm using the Postgres plug-ins and haven't had any trouble in the past (before I re-installed all the software on my computer). I'm searching the lists right now but haven't found any help yet.

Thanks,
Stirling


On Dec 18, 2005, at 12:53 PM, Mike Schrag wrote:

By the way, every time I've had that "failed to update row", it was caused by optimistic locking failing because of precision problems in either a float/double/decimal type or a timestamp type that was mapping to a date (without time) type in the database.

ms

On Dec 18, 2005, at 2:04 PM, Stirling Olson wrote:

Still no luck. Is there any way to set this programmatically? At least that way it will have to compile.

Any known problems with XCode 2.1 or WO 5.3 on this front?

Thanks everyone. I'm trying to get this logging working so I can solve a REAL problem where I mysteriously get the following:
com.webobjects.eoaccess.EOGeneralAdaptorException: updateValuesInRowDescribedByQualifier -- com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in database


So, I'm trying to look at the darn SQL to see what is going on. I'm doing a VERY simple update on existing data to an app that worked just fine before my machine recently crashed. I had to re- install everything and I suspect that a version of one of my Wonder frameworks or Postgres plugins is out-of-whack but no success figuring it out yet. Argh.

Thanks again.

-S


On Dec 18, 2005, at 9:01 AM, Alex Finkel wrote:

The correct syntax to use in the active executable is:

-EOAdaptorDebugEnabled true


You can also try a command line by into your <AppName.woa> and launching as:


./<AppName> -EOAdaptorDebugEnabled true


On 12/17/05, Stirling Olson <email@hidden> wrote:
Hmm.  I've tried all the combinations and still no success.  Thanks
for trying.

-Stirling


On Dec 17, 2005, at 3:57 PM, Jerry W. Walker wrote:

Hi, Stirling,

Try "EOAdaptorDebugEnabled YES" in your properties file, and/or "-
EOAdaptorDebugEnabled YES" as an Xcode argument to the application.


I think the confusion is resulting from the combined syntaxes of
Java Properties and WO Defaults syntax.

Regards,
Jerry


On Dec 17, 2005, at 5:43 PM, Stirling Olson wrote:

I think I'm going crazy...

I'm trying to turn SQL logging on in my application and can't seem
to do it for the life of me. I'm running on:
Mac OS 10.4
XCode 2.1


I have:
EOAdaptorDebugEnabled=true

in my Properties file.

I have:
-DEOAdaptorDebugEnabled=true

set as an argument in XCode -> Projects -> Edit Active Executable -
Arguments

but still no SQL statements. I've restarted, rebooted and sacrificed a chicken to no avail.

Hoping that someone with more sleep, more caffeine or just more
smarts can help me out.

Many thanks,
Stirling
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
jerrywwalker%
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
   WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems

    email@hidden
    203 278-4085        office




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@gmail.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:
40mdimension.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: Logging SQL statements
      • From: Art Isbell <email@hidden>
References: 
 >Logging SQL statements (From: Stirling Olson <email@hidden>)
 >Re: Logging SQL statements (From: "Jerry W. Walker" <email@hidden>)
 >Re: Logging SQL statements (From: Stirling Olson <email@hidden>)
 >Re: Logging SQL statements (From: Alex Finkel <email@hidden>)
 >Re: Logging SQL statements (From: Stirling Olson <email@hidden>)
 >Re: Logging SQL statements (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: Logging SQL statements
  • Next by Date: RE: ovverriding methods
  • Previous by thread: Re: Logging SQL statements
  • Next by thread: Re: Logging SQL statements
  • Index(es):
    • Date
    • Thread