geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <jboy...@apache.org>
Subject Re: access a BLOB coloumn from a CMP EJB
Date Sun, 31 Jul 2005 15:14:57 GMT
Stefan Schmidt wrote:
> 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...
> 

I think its the other way around - I am guessing that PhpMyAdmin is 
inserting the bytes directly but when you use the EJB it is Serializing 
the array and writing the serialized data stream.

When the EJB tries to read the bytes inserted by PhpMyAdmin it gets the 
raw data rather than the bytes for ObjectInputStream and is raising an 
error.

I think this is a bug as we should be able to support the raw data 
format correctly - we need to play nice with other applications.

--
Jeremy

Mime
View raw message