ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Yee <r...@cruzio.com>
Subject Re: Problem with blob
Date Tue, 14 Aug 2007 14:07:11 GMT
What database are you using? What is the version of your JDBC drivers? 
There are some issues with older Oracle drivers and blobs.

-Richard



Vanessa wrote:
> Hello everyone
>
> I have the next problem what I cannot solve.
> I have a web application that displays blobs to the users.
> I have written the code myself and when I execute it, I get an ERROR 500. java.lang.IndexOutOfBoundsException
> The problem is, when I have for example 20 blobs that the users can see, al the blobs
that are stock in the database with length 65000 are displayed and the one with 59056 gives
the ERROR 500 java.lang.IndexOutOfBoundsException  error.
>
> This is the code I have developed for displaying the blob: 
>
>
> public byte[] byteread = new byte[65000];
>
> public boolean readStudentHtml(String key) throws Exception {
>
>     try {
> 	Etc….
>
>       If Etc… {
>         for Etc….  {
>
>         Object currentBlob = ((model.StudentHtml)resultList.get(i)).getAttest();
>           if (currentBlob != null) {
>             byteread = ((model.StudentHtml)resultList.get(0)).getAttest();
>             logger.trace("Blob found for : " + key);
>             return true;
>           } else {
>             logger.error("Blob not found for : " + key);
>             return false;
>           }
>         }
>         } else {
>           logger.error("Blob not found for : " + key);
>       }
>     } catch (Exception e) {
>       logger.trace("Error readStudentHtml : Cause : " + e);
>       e.printStackTrace();
>     }
>     return false;
>   }
>
>
> Can someone help me.
> Vanessa
>
>
>
>
>
>   


Mime
View raw message