Hey Pascal! On 22/Apr/2010, at 8:54 AM, Pascal Robert wrote: > What's the best way to debug this?
I would never claim this is best, however this is how I do it: ;-) (I could have sworn that I've posted this before however google couldn't find it so here it is again!) /path/to/app/MyApp.woa/MyApp -EOAdaptorDebugEnabled YES -NSJavaDebugging YES ... *** set a breakpoint (see alternate version below but we warned it's version specific.) > stop in com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression *** to launch the app > run ... Breakpoint hit: "thread=WorkerThread0", com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(), line=296 bci=0 *** Type the 'next' command to get the log message of what SQL expression is being executed. > next [2010-4-22 12:19:22 PDT] <WorkerThread0> === Begin Internal Transaction > [2010-4-22 12:19:22 PDT] <WorkerThread0> evaluateExpression: > <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT t0.BIRTHDAY, > t0.FIRST_NAME, t0.ID, t0.LAST_NAME FROM PERSON t0" withBindings: > Step completed: "thread=WorkerThread0", com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression(), line=297 bci=7 *** to see the backtrace > where [1] com.webobjects.jdbcadaptor.JDBCChannel.evaluateExpression (JDBCChannel.java:297) [2] com.webobjects.jdbcadaptor.JDBCChannel.selectAttributes (JDBCChannel.java:220) ... [10] com.webobjects.eoaccess.EOUtilities.objectsForEntityNamed (EOUtilities.java:79) [11] your.app.Session.<init> (Session.java:14) ... [27] java.lang.Thread.run (Thread.java:637) >From the backtrace, I see that Session.java, line 14 invoked >EOUtilities.objectsForEntityNamed(...). Your results will very unless you copied my test project! ;-) *** to have your app continue on, type: > cont ... If you get tired of typing 'next' each time breakpoint is hit, you can instead use: > stop at com.webobjects.jdbcadaptor.JDBCChannel:297 Note: That command was gleaned from looking at the "Step completed" message from jdb (shown above) and is highly dependent on the version of webobjects that you are using. Please adjust accordingly! This method has the advantage of working with both Wonder and non-Wonder projects. No changes to configuration or properties files required. Works on deployment machines without development tools. Good Luck! M. _______________________________________________ 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]
