Would be interested in feedback on this, here is what I propose:

1. revert Adam's changes to the ByteWrapper object so that data stored with it can be migrated to be plain bytes instead of a serialized ByteWrapper
2. deprecate the ByteWrapper object
3. change all code that uses the ByteWrapper object to just use a byte [] (I think this should work fine in Java 1.5) 4. create a utility that unwraps all existing serialized ByteWrapper objects and just drops the byte[] into the db; this would have to be run for all existing blob data in any existing database

-David


On Oct 22, 2007, at 3:57 PM, Tim Ruppert wrote:

I do have the zip file that I've sent along - and yes rolling back worked fine - but there is a much bigger issue 'round this one . . . :(

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595


On Oct 22, 2007, at 3:42 PM, David E Jones wrote:


Interesting... this is worrisome as it means something isn't using the ByteWrapper properly. Only the bytes in the ByteWrapper should be sent to the database, not a serialized version of the object itself.

Because this issue exists we have a problem though... updating the ByteWrapper object will make existing database data stored with it useless unless the ByteWrapper object NEVER changes.

Tim, do you have a full stack trace on that? I'd like to trace through the code in the content stuff as well as the database that does both the saves and loads.

As an interim fix, change the ByteWrapper.java file back to its original version (before the enhancements that Adam did recently). I don't know if we want to do this in the trunk, but I'll look at that as part of the above mentioned review.

-David


On Oct 22, 2007, at 3:35 PM, Tim Ruppert wrote:

This was working last week before the supreme amount of changes. Anybody got any ideas why this would be the case now:

org.ofbiz.webapp.view.ViewHandlerException: Error in streamDataResource (Unable to read BLOB data from input stream while getting value : imageData [IMAGE_DATA] (1): java.io.InvalidClassException: org.ofbiz.entity.util.ByteWrapper; local class incompatible: stream classdesc serialVersionUID = -2019470610749810950, local class serialVersionUID = -7811889960144925895 (org.ofbiz.entity.util.ByteWrapper; local class incompatible: stream classdesc serialVersionUID = -2019470610749810950, local class serialVersionUID = -7811889960144925895))

This is on a fresh checkout, so there are no old classes, etc.

Cheers,
Tim
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com

o:801.649.6594
f:801.649.6595





Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to