• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Handle is invalid!!!

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am developing an application which goes like this

f= new FileOutPutSTream(fil2);
b = new BufferOutPutStream(f);

while(resultSet.next()){
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());
b.write(resultSet.getString("asda").getBytes());

//Calling a method which calls an insert SP
insertASD(String,String,String);

}

If I have the insertASD() method then an IOException (The handle is invalid). If I remove the call insertASD() method thus not inserting into the database,I dont get the exception. Please help me in this regard.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, the classes are not called FileOutPutSTream and BufferOutPutStream, but FileOutputStream and BufferedOutputStream. Please be accurate, because it might be important for solving the problem.

If the exception happens in the method insertASD, the problem must be in the method insertASD. You should look at the source code of that method and look what happens there. Look at the stack trace of the exception message. It tells you exactly in which line of source code the exception happens.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic