MySQL connection - jdbc - com.mysql.jdbc.Connection.isValid(I)Z - [SOLVED]



since fe days I got problem with MySQL connection, it returns me some Java error: java.lang.AbstractMethodError: com.mysql.jdbc.Connection.isValid(I)Z. My current JDBC driver is 5.1.35. I've changed it to 5.1.39 and later to 6.0.4 but problem still occurs. Connection works properly, I see all tables etc. just during executing query like SELECT, INSERT etc. it returns taht error. Thanks in advance for all replies.


5.1.35 comes by default. Have you tried to simply reinstall it from Data Sources and Drivers window?


It's exactly what I did, atm settings look like this:

I've tried to each combination od Driver file and Class. Weird thing is it was working all the time, there  was no PHP, PHPStorm upgrade, only thing could happen is background Java update. java -version outputs:

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)


Please restart PhpStorm, try to reconnect and then send us the IDE log.
(Please don't paste it into the post body, use some file sharing service)


I did as you said:

I see last row is connecting to DB and is succesfull, I even see list of tables etc., just executing query returns error



It might be caused by using Oracle JDK.
Could you please download IntelliJ x64 JDK and use it instead of the Oracle one?


Change for OpenJDK 1.8.0_122 helped, thank you very much for help.


Please sign in to leave a comment.