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 p_erformChanges
_com.webobjects.eoaccess
EOObjectStoreCoordinator.java 376 s_aveChangesInEditingContext
_com.webobjects.eocontrol
EOEditingContext.java 3176 s_aveChanges _com.webobjects.eocontrol
Main.java 50 s_aveBlob _Default Package
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java 39 i_nvoke _sun.reflect
DelegatingMethodAccessorImpl.java 25 i_nvoke _sun.reflect
Method.java 585 i_nvoke _java.lang.reflect
KeyValueCodingProtectedAccessor.java 60 m_ethodValue _Default
Package
NSKeyValueCoding.java 1134 v_alueInObject
_com.webobjects.foundation
NSKeyValueCoding.java 1293 v_alueForKey _com.webobjects.foundation
WOComponent.java 1686 v_alueForKey _com.webobjects.appserver
NSKeyValueCoding.java 447 v_alueForKey _com.webobjects.foundation
NSKeyValueCodingAdditions.java 212 v_alueForKeyPath
_com.webobjects.foundation
WOComponent.java 1754 v_alueForKeyPath _com.webobjects.appserver
WOKeyValueAssociation.java 50 v_alueInComponent
_com.webobjects.appserver._private
WOSubmitButton.java 81 i_nvokeAction
_com.webobjects.appserver._private
WODynamicGroup.java 105 i_nvokeChildrenAction
_com.webobjects.appserver._private
WODynamicGroup.java 115 i_nvokeAction
_com.webobjects.appserver._private
WOForm.java 141 i_nvokeAction _com.webobjects.appserver._private
WODynamicGroup.java 105 i_nvokeChildrenAction
_com.webobjects.appserver._private
WODynamicGroup.java 115 i_nvokeAction
_com.webobjects.appserver._private
WOComponent.java 1078 i_nvokeAction _com.webobjects.appserver
WOSession.java 1357 i_nvokeAction _com.webobjects.appserver
WOApplication.java 1736 i_nvokeAction _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 h_andleRequest
_com.webobjects.appserver._private
WOApplication.java 1678 d_ispatchRequest _com.webobjects.appserver
WOWorkerThread.java 144 r_unOnce
_com.webobjects.appserver._private
WOWorkerThread.java 226 r_un _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
--
This message has been scanned for viruses and
dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
believed to be clean.
------------------------------------------------------------------------
_______________________________________________
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