Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File downloading problem

807603Feb 13 2008 — edited Feb 13 2008
Hi to All.. can anybody solve my problem (in web application)

In my application we provided uploading and downloading files.
While uploading iam storing file content in database as bytes using ResultSet.setBytes(byte[]).
it was uploading fine. And in downloading Iam getting that file content as bytes but it throwing exception .........
I used ResultSet.getBynaryStream();
method for getting stream. at this statement i giving Exception.

Exception:
Bad Integer loread
at org.postgresql.jdbc2.ResultSet.getInt(ResultSet.java:261)
at org.postgresql.jdbc2.ResultSet.getBytes(ResultSet.java:395)
at org.postgresql.jdbc2.ResultSet.getBinaryStream(ResultSet.java:556)
at GIFT_GAShowHistoryFile.doPost(GIFT_GAShowHistoryFile.java:186)
at GIFT_GAShowHistoryFile.doGet(GIFT_GAShowHistoryFile.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java)






Can anybody give any referance
and iam using postgreSql 8.1
Java 1.6

Edited by: Venkateswarlu.G on Feb 13, 2008 10:55 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2008
Added on Feb 13 2008
7 comments
217 views