MySQL 5 and date issues
MySQL 5 and date issues
- Subject: MySQL 5 and date issues
- From: William Hatch <email@hidden>
- Date: Mon, 17 Jul 2006 13:53:26 -0400
mySQL 5.0.18 with adaptor mysql-connector-java-3.1.12, WO 5.3.1 OSX
10.4.7
I'm just starting a new project using mySQL, and am running into date
issues. If I have an attribute that's external type is set to DATE,
and Java type is NSTimestamp, I'm able to insert values, but when
retrieving them I get the following exception.
I remember a few posts that touched on stricter date type issues with
mySQL 5, but can't seem to locate them worth a damned at the
moment;-) Does anybody have a fix or work around for this? Thanks.
<com.webobjects.appserver._private.WOComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.jdbcadaptor.JDBCAdaptorException: Value '0000-00-00'
can not be represented as java.sql.Date
[2006-07-17 13:51:30 EDT] <WorkerThread2>
com.webobjects.jdbcadaptor.JDBCAdaptorException: Value '0000-00-00'
can not be represented as java.sql.Date
at com.webobjects.jdbcadaptor.JDBCColumn._fetchValue(JDBCColumn.java:
325)
at com.webobjects.jdbcadaptor.JDBCColumn.fetchValue(JDBCColumn.java:
307)
at com.webobjects.jdbcadaptor.JDBCChannel.fetchRow(JDBCChannel.java:
1406)
at com.webobjects.eoaccess.EODatabaseChannel._fetchObject
(EODatabaseChannel.java:302)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3221)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(
EODatabaseContext.java:3346)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecif
ication(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4114)
at com.webobjects.eoaccess.EODatabaseDataSource.fetchObjects
(EODatabaseDataSource.java:633)
at com.webobjects.appserver.WODisplayGroup.fetch(WODisplayGroup.java:
2191)
at com.webobjects.directtoweb.D2WListPage.setDataSource
(D2WListPage.java:196)
at com.webobjects.directtoweb.D2WQueryPage.queryAction
(D2WQueryPage.java:183)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.webobjects.foundation.NSKeyValueCoding$1.methodValue
(NSKeyValueCoding.java:684)
at com.webobjects.foundation.NSKeyValueCoding
$_MethodBinding.valueInObject(NSKeyValueCoding.java:1160)
at com.webobjects.foundation.NSKeyValueCoding
$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1268)
at com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:
1539)
at com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey
(NSKeyValueCoding.java:498)
at com.webobjects.foundation.NSKeyValueCodingAdditions
$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:
212)
at com.webobjects.appserver.WOComponent.valueForKeyPath
(WOComponent.java:1600)
at
com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent
(WOKeyValueAssociation.java:46)
at com.webobjects.appserver._private.WOActiveImage.invokeAction
(WOActiveImage.java:255)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction
(WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOForm.invokeAction(WOForm.java:
82)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction
(WODynamicGroup.java:110)
at com.webobjects.appserver._private.WOComponentContent.invokeAction
(WOComponentContent.java:31)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction
(WODynamicGroup.java:110)
at
com.webobjects.appserver._private.WOHTMLURLValuedElement.invokeAction
(WOHTMLURLValuedElement.java:115)
at
com.webobjects.appserver._private.WODynamicGroup.invokeChildrenAction
(WODynamicGroup.java:101)
at com.webobjects.appserver._private.WODynamicGroup.invokeAction
(WODynamicGroup.java:110)
at com.webobjects.appserver.WOComponent.invokeAction
(WOComponent.java:945)
at
com.webobjects.appserver._private.WOComponentReference.invokeAction
(WOComponentReference.java:104)
at com.webobjects.appserver._private.WOSwitchComponent.invokeAction
(WOSwitchComponent.java:171)
at com.webobjects.appserver.WOComponent.invokeAction
(WOComponent.java:945)
at com.webobjects.appserver.WOSession.invokeAction(WOSession.java:1168)
at com.webobjects.appserver.WOApplication.invokeAction
(WOApplication.java:1375)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedPage(WOComponentRequestHandler.java:196)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedSession(WOComponentRequestHandler.java:287)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWit
hPreparedApplication(WOComponentRequestHandler.java:322)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleReque
st(WOComponentRequestHandler.java:358)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleReques
t(WOComponentRequestHandler.java:432)
at com.webobjects.appserver.WOApplication.dispatchRequest
(WOApplication.java:1306)
at com.webobjects.appserver._private.WOWorkerThread.runOnce
(WOWorkerThread.java:173)
at com.webobjects.appserver._private.WOWorkerThread.run
(WOWorkerThread.java:254)
at java.lang.Thread.run(Thread.java:552)
Bill
_______________________________________________
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