-
1. Re: CMP, MYSQL & Blob
tomerbd2 Jun 27, 2005 9:59 AM (in response to gaferrero)for a start just use byte[] as your method type it would be converted automatically to corresponding default data type in the database
-
2. Re: CMP, MYSQL & Blob
gaferrero Jun 28, 2005 6:54 PM (in response to gaferrero)Thanks for replie, i still have the problem, when i retrieve the image in the client application and exception happens
Caused by: java.io.NotSerializableException: sun.awt.windows.WImage
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052).....
When i disable the retrieve image field the application works fine.
What happen?
Thanks... -
3. Re: CMP, MYSQL & Blob
tomerbd2 Jun 29, 2005 8:03 AM (in response to gaferrero)what the method signature of the image in your entity bean
-
4. Re: CMP, MYSQL & Blob
gaferrero Jun 29, 2005 8:32 AM (in response to gaferrero)Thanks again for your reply tomerbd2, the method in the entity bean is
public abstract byte[] getImagen();
public abstract void setImagen(byte[] imagen);
In the SessionBean i call getImagen() and pass its return value to the ImagenMamo constructor, this class is serializable.