I just uploaded my previous project (not Ibatis) and there it works fine. Then 
I uploaded my new work (Ibatis). I only have rewritten it to Ibatis, the other 
code is the same, end it gives me back the ERROR 500 just for the blobs that 
are stockade with length 59056 in the database. This is the code where I get an 
error. And in my previous code this code gives now error.

Bold = error

byteread = datasender.byteread;
Charset charset = Charset.forName("UTF-8");
CharsetDecoder decoder = charset.newDecoder();
decoder.reset();
ByteBuffer bb = ByteBuffer.allocate(65000);
bb.put(byteread, 0, 65000);
bb.position(0);
CharBuffer cb = CharBuffer.allocate(70000);
cb.position(0);
cb = decoder.decode(bb);
decoder.flush(cb);
cb.position(0);
String s2 = cb.toString();
String s3 = "";
String s4 = "";


>----- Oorspronkelijk bericht -----
>Van: Meindert [mailto:[EMAIL PROTECTED]
>Verzonden: dinsdag, augustus 14, 2007 09:41 AM
>Aan: [email protected]
>Onderwerp: RE: Problem with blob
>
>Hi Vanessa,
>
>Again I'm not sure, but I would think that a new array of size 59056 is 
>created and you try (in your action bean) to read 65000 bytes.
>Maybe in your previous code you placed data in an array of 65000 bytes. 
>If I was you I would step through the code and see where the exception is
>thrown: (com.stud.bean.studregBean.StudentHtml(studregBean.java:87)
>
>Kind Regards
> Meindert
>
>
>-----Original Message-----
>From: Tom Schindl [mailto:[EMAIL PROTECTED]
>Sent: 14 August 2007 09:10 AM
>To: [email protected]
>Subject: Re: Problem with blob
>
>Vanessa schrieb:
>> Hi Meindert
>>
>>
>> This is a part of the stacktrace.
>> what strange is, with the blobs of 65000 it works perfectly and that of
>59056 it does not work. In my previous code before Ibatis it worked
>perfectly, sow I think I have somewhere made a mistake in my code. Now, we
>have been switched over to Ibatis and now I get this error only with those
>of length 59056.
>>
>>
>>
>>
>> <10-aug-2007 14.45 u. CEST> <Error> <HTTP> <BEA-101017>
><[ServletContext(id=29596326,name=STUDREG,context-path=/STUDREG)
>>
>> ] Root cause of ServletException.
>>
>> java.lang.IndexOutOfBoundsException
>> at java.nio.Buffer.checkBounds(Buffer.java:454)
>> at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:163)
>>
>>
>
>Well the exception you are showing here is not enough please post more
>line of the exection.
>
>Tom
>
>
>

Reply via email to