3

I recently updated my MySQL server to MariaDB, since then I'm getting in trouble with a few errors.

After some time, my application crashes and these errors appear:

java.util.NoSuchElementException: Timeout waiting for idle object

or

Cannot get a connection, pool error Timeout waiting for idle object

Or NullPointerExceptions on executeUpdate() on a preparedStatement!

My code to connect to the database is:

public static void connect() {
    try {
        connection = DriverManager.getConnection("jdbc:mysql://"
                + Data.MySQL_host + ":3306/" + Data.MySQL_db,
                Data.MySQL_user, Data.MySQL_pass);
        System.out.println("MySQL connected!");
    } catch (SQLException e) {
        System.out.println("Error connecting to MySQL");
        e.printStackTrace();
    }
}

Do I have to modify my MariaDB Server, or is it application-related?

2
  • Does "after some time" mean something special? Is it like randomly or after x seconds after the last query was executed? Do you close the connection before using it again? ... So many questions left :) May 1, 2015 at 14:04
  • I don't know if it's randomly. I'm continuously sending and requesting data from MySQL, but it seems quite randomly. No, I'm using the same connection for all statements.
    – Kombustor
    May 1, 2015 at 14:07

1 Answer 1

0

something wrong wiht your configuration,so you can't get a idle Object to connect.chekout your configuration first!

1
  • What configuration do you mean? Server or client?
    – Kombustor
    May 1, 2015 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.