Hi Bill, On Aug 27, 2010, at 11:16 AM, William Hatch wrote: > On Aug 27, 2010, at 10:52 AM, Chuck Hill wrote: >> On Aug 26, 2010, at 12:14 PM, William Hatch wrote: >> >>> I hope this is on topic enough; OB list seems to be dead. >>> >>> I've got a utility app using latest wo and wonder, openbase db, that >>> performs raw fetches to then bulk export data in csv. Basically a simple >>> data export/dumper thing. This had been working perfectly for a long time, >>> but a recent run resulted in the following exception, thrown during the >>> call to EOUtilities.rawRowsForSQL(...) : >>> >> >> What exception happens here? > > Ah sorry, cut it off. It's an IllegalArgumentException immediately above the > following output >> >>>> at java.sql.Date.valueOf(Date.java:138) >>>> at com.openbase.jdbc.f.getDate(null:Unknown) >>>> at >>>> com.webobjects.jdbcadaptor.JDBCColumn._fetchCorrectObject(JDBCColumn.java:288) >>>> at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:384) >>>> at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:372) >>>> ... skipped 1 stack elements >>>> at com.webobjects.eoaccess.EOUtilities._rawRowsForSQL(EOUtilities.java:636) >>>> at com.webobjects.eoaccess.EOUtilities.rawRowsForSQL(EOUtilities.java:588) >>>> at com.imapp.eo.Judgement.rawRows(Judgement.java:53) >>>> at com.imapp.tasks.JudgementTask.performAction(JudgementTask.java:26) >>>> at >>>> er.extensions.ERXLongResponseTask$DefaultImplementation.run(ERXLongResponseTask.java:162) >>>> ... skipped 1 stack elements >>>> at >>>> er.extensions.ERXLongResponseTask$WorkerThread.run(ERXLongResponseTask.java:60) >>> >>> which to me, indicates a problem with a date column within the entity >>> referred to. I got around this particular problem by doing some raw queries >>> and identifying and deleting row with bad date values, and the problem >>> vanished. Then it came up again on another table, again with a date type, >>> but this time I'm unable to find any bad data via direct queries. I >>> debugged around my action by setting a breakpoint in the catch block, but >>> that's not helping much. I'm looking for some advice on how to determine >>> and fix, or at least work around the real issue. Anybody else seen this >>> before? Thanks. >> >> >> Is there old jdbc2info in the model? Is the JDBC driver current? Has it >> changed? Are you using prototypes? How are dates defined? What is the >> column type in the model? > > Not sure how to check for old jdbc2 info in the model Chuck. What should I > look for?
Look in index.plist (e.g. in a text editor) for the key jdbc2info. > The thing is, it always worked, and the project itself hasn't changed. It's a > pretty old app, actually. Has the OB version changed? > I did upgrade local wonder somewhat recently, but not the other dependent > frameworks. I inherited the model a long time ago, and it never used > prototypes. It's at least nine years old. The column type in the model is > date, Data Type is Date and class is NSTimestamp. Here's the entry for that > column in the entities' .plist file: > > { > allowsNull = Y; > columnName = saleDate; > externalType = date; > name = saledate; > valueClassName = NSCalendarDate; > valueType = D; As in a Date only, no time? All of mine are: > valueClassName = NSTimestamp; > valueType = T; Using "date only" values in Java WO is problematic. > }, > > So, I fixed it on one table by querying for bad date ranges after exploring > revealed some crazy dates and formats. I did this from openbases's cli tool. > But I'm not seeing any bad, or what would appear to be bad, data in the > second table. Not sure if it's a data issue, or what. The app that inputs the > data runs on an older version of wo; 5.3.x and I've been copying down the db > locally every once in a while and running this exporter utility locally. It does sound like bad data, though not a helpful error messages. How does OB manage to get bad data in a "date" type column? Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com