Thanks Pranay, This was helpful, but I am chasing my tail trying to find out where java.nio.HeapByteBuffer is loaded. That is what is returned in ServiceEventHandler at line 217. I find that HeapBuffer.allocate returns an object of HeapByteBuffer type, but can't find that in Java APIs for ver. 1.42, 1.5 or 6.0. Is that what the current version of Tomcat is using?
Any help here would be appreciated. Thanks again, -Al On 3/20/08, Pranay Pandey <[EMAIL PROTECTED]> wrote: > > Hello Al, > > I think you can make some changes to the type of the data of the image > file > which you are uploding. > The type of the image data which is saved in ImageDataResource is "blob". > So > i think you need to convert the data to ByteBuffter then you can save data > in the ImageDataResource Entity, also where you are uploading it in the > service the type of attribute can be "java.nio.ByteBuffer". > > On Fri, Mar 21, 2008 at 2:38 AM, Al Byers <[EMAIL PROTECTED]> > wrote: > > > > I am muddling thru this and thought I would throw it out to see if > anyone > > has some experience with it. > > > > I am using mysql 5.0.37 > > I have set the character set type in entityengine.xml to "utf8", dropped > > the > > db and ran run-install > > > > First I got a "max_allowed_packet" error when trying to upload an image > > file. I fixed by changing my.cnf. to allow up to 2M. > > > > Now I get a "Data too long for column" on a blob field. The file size is > > 700KB. > > > > Right before the error in console.log, there are these warnings: > > > > 2008-03-20 14:32:49,741 (http-0.0.0.0-8443-Processor2) [ > > ObjectType.java:949:INFO ] No type conversion available for > > java.nio.HeapByteBuffer to java.nio.ByteBuffer, returning original > object. > > 2008-03-20 14:32:49,743 (http-0.0.0.0-8443-Processor2) [ > > GenericEntity.java:408:WARN ] In entity field [ > ImageDataResource.imageData > > ] > > set the value passed in [java.nio.HeapByteBuffer] is not compatible with > > the > > Java type of the field [java.sql.Blob] > > > > For this i think you should also read the file back from ImageDataResource > to check whether the data uploaded. > > > > > > > > > > Thanks for any insight. > > I am going to take a nap now. Please have your answers ready for when I > > wake > > up. > > > > Thanks, > > -Al > > > > > > > -- > Thanks & Regards > > -- > Pranay Pandey > Inodre, India >
