Re: Writing Oracle Blobs under WO 5.4 - WO fails
Re: Writing Oracle Blobs under WO 5.4 - WO fails
- Subject: Re: Writing Oracle Blobs under WO 5.4 - WO fails
- From: Michael Scott <email@hidden>
- Date: Tue, 26 Feb 2008 09:11:27 +0900
- Thread-topic: Writing Oracle Blobs under WO 5.4 - WO fails
Title: Re: Writing Oracle Blobs under WO 5.4 - WO fails
Thanks Dov – that’s an tricky problem to look out for. Unfortunately my problem is with blobs, not with dates.
I did try the compatibility flag though, but no luck. I also tried the old Oracle 8i driver, but no luck either. The code works fine under WO5.3 with the same drivers, so I’m not surprised.
Is there anyone out there who has successfully written Oracle blobs with WO5.4?
Cheers all
Michael Scott
On 25/2/08 8:14 PM, "Dov Rosenberg" <email@hidden> wrote:
We had that same error. I don’t think it is your BLOB that is causing the problem but how Oracle changed its default behavior on the driver and DB regarding the Timestamp and Date data types. The ojdbc14.jar drivers have a compatibility mode you can use to get around the problem, pass in the following as a JVM parameter.
-Doracle.jdbc.V8compatible=true
On 2/25/08 12:24 AM, "Michael Scott" <email@hidden> wrote:
Hi All
Has anyone had any success writing blobs to an Oracle DB under WO 5.4?
I have a large project that makes extensive use of blobs and works fine under WO 5.3 but throws the following error when writing a blob under WO 5.4:
com.webobjects.eoaccess.EOGeneralAdaptorException: Unsupported feature
(See full dump below.)
The code can read existing blobs from an Oracle DB without any problems. It’s just writing that causes exceptions.
To eliminate other factors, I created a test project with a simple version of the offending code. It uses a table – BlobTable – with just a primary key and a blob field. The code attempting the write is below. It gets text data from a form via a key called ‘notes’. (The BlobTable already contains one record.)
NSArray blobs = EOUtilities.objectsForEntityNamed(session().defaultEditingContext(), "BlobTable");
if ((blobs != null) && (blobs.count() > 0)) {
BlobTable blob = (BlobTable)blobs.objectAtIndex(0);
NSData blobData = new NSData(notes(), "UTF8");
blob.setBlobData(blobData);
session().defaultEditingContext().saveChanges();
}
The problem is occurring on an OS X Leopard box in either Xcode or Eclipse (not that that should matter). The JDBC driver is for Oracle 9i 9.2.0.8 – it’s a file called ojdbc14.jar.
If anyone has Oracle blobs working under 10.4, that would be great news – I’d would then know to dig deeper rather than file a bug report.
Better still – how did you do it?
Thanks
Michael Scott
Murdoch University
Application: Cafe
com.webobjects.eoaccess.EOGeneralAdaptorException: Unsupported feature
File Line# Method Package
EODatabaseContext.java 4500 _exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess
EODatabaseContext.java 6212 performChanges com.webobjects.eoaccess
EOObjectStoreCoordinator.java 376 saveChangesInEditingContext com.webobjects.eocontrol
EOEditingContext.java 3176 saveChanges com.webobjects.eocontrol
Main.java 50 saveBlob Default Package
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java 39 invoke sun.reflect
DelegatingMethodAccessorImpl.java 25 invoke sun.reflect
Method.java 585 invoke java.lang.reflect
KeyValueCodingProtectedAccessor.java 60 methodValue Default Package
NSKeyValueCoding.java 1134 valueInObject com.webobjects.foundation
NSKeyValueCoding.java 1293 valueForKey com.webobjects.foundation
WOComponent.java 1686 valueForKey com.webobjects.appserver
NSKeyValueCoding.java 447 valueForKey com.webobjects.foundation
NSKeyValueCodingAdditions.java 212 valueForKeyPath com.webobjects.foundation
WOComponent.java 1754 valueForKeyPath com.webobjects.appserver
WOKeyValueAssociation.java 50 valueInComponent com.webobjects.appserver._private
WOSubmitButton.java 81 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private
WOForm.java 141 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private
WOComponent.java 1078 invokeAction com.webobjects.appserver
WOSession.java 1357 invokeAction com.webobjects.appserver
WOApplication.java 1736 invokeAction com.webobjects.appserver
WOComponentRequestHandler.java 206 _dispatchWithPreparedPage com.webobjects.appserver._private
WOComponentRequestHandler.java 298 _dispatchWithPreparedSession com.webobjects.appserver._private
WOComponentRequestHandler.java 332 _dispatchWithPreparedApplication com.webobjects.appserver._private
WOComponentRequestHandler.java 369 _handleRequest com.webobjects.appserver._private
WOComponentRequestHandler.java 445 handleRequest com.webobjects.appserver._private
WOApplication.java 1678 dispatchRequest com.webobjects.appserver
WOWorkerThread.java 144 runOnce com.webobjects.appserver._private
WOWorkerThread.java 226 run com.webobjects.appserv
_______________________________________________
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
_______________________________________________
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