Gianny, Jeremy,
I got it! Apparently, the problem was on my site. I actually loaded the
Blobs (images) directly via the PhpMyAdmin Gui (there is a file upload
function) and then tried to access these blob fields via the EJB. To dig
into my problem I tried the org.openejb.test.entity.cmp2.StorageTests on
MySQL and this worked. So I ended up updating my blob fields via the EJB
(loading the files via the EJB rather than PhpMyAdmin ) and now it
works! Seems like the PhpMyAdmin does something with the blob that Java
doesn't like...
Anyway, thanks for your help there.
Stefan
Gianny Damour wrote:
I was trying to find the root cause and I have added an integration
test to test the storage of a byte[] into a BLOB (see
org.openejb.test.entity.cmp2.StorageTests in OpenEJB itests). It seems
that it works; at least for Derby.
BTW, by default a field having the type byte[] is automatically
serialized, so one should not need to explicitly declare a
SerializableConverter.
Thanks,
Gianny
On 30/07/2005 9:51 AM, Jeremy Boynes wrote:
Stefan Schmidt wrote:
Jeremy,
That was one of the weired things here - there is no true root cause:
08:42:29,134 WARN [SystemExceptionInterceptor] BookBean
javax.transaction.TransactionRolledbackException: Unable to load
data for field
at
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:126)
OpenEJB is dropping the root cause for some reason (claims it can't
initCause() and doesn't log the lost info). Please can you open a bug
for that as I think we'll lose diagnostic info for any problem
encountered by the persistence code.
I'll try and reproduce and get the byte[] mapping working.
--
Jeremy