• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Error: Connection got Reset

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

While writing Blob object in Oracle db, my connection is getting reset.

<<My Code-----
try {
PreparedStatement ps =null;
Connection conn = getConnection();
String sql = "INSERT INTO ATTACHMENT (ATTACHMENT.ID, DOC_DATA) "VALUES (?,?)";
ByteArrayInputStream inStream =
new ByteArrayInputStream(dto.getDoc_Data());
ps = conn.prepareStatement(sql);
ps.setInt(1,attachment_Id);
ps.setBinaryStream(4,inStream,inStream.available());
int rowsAdded = ps.executeUpdate();

} catch (SQLException e) {
e.printStackTrace();
}

>>>

I dont know why my my connection is getting reset so getting an error..i am trying to put a pdf file of size around 45kb...
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Oracle drivers have never been very good at handling LOBs. Are you using the latest driver?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic