M
M
Mike Gasper2015-02-02 19:16:13
MySQL
Mike Gasper, 2015-02-02 19:16:13

What's wrong with reading from the console?

I recently started learning Java and thought to start making a list type application with contacts using a MySQL database. I connected the database, everything seems to be working properly, but when reading the contact name from the console, the BufferedReader throws an error! Prior to Connecter J for the database, everything worked great. What is the problem ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
asd111, 2015-02-02
@asd111

attach stacktrace

T
Tagir Valeev, 2015-02-04
@tagir_valeev

Without the source, you have to show telepathic abilities. Most likely someone closes the BufferedInputStream somewhere, which is in System.in. Put a breakpoint on the input to the BufferedInputStream.close() method and see how you get there. If you get there too often, make the breakpoint conditional on this == System.in.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question