Search Posts

Connecting Netbeans and MySQL but getting Big Integer error

how to – Connecting Netbeans and MySQL but getting Big Integer error

So I am trying to add new connection to my Netbeans’ database which is MySQL but I am getting Big Integer casting error can someone please help me?
In detail:

I right click on existing MySQL Server at localhost:3306 [root(disconnected) >> select connect and this pops up


Unable to connect to the MySQL server:

org.netbeans.api.db.explorer.DatabaseException: org.netbeans.api.db.explorer.DatabaseException: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long.

The server may not be running or your MySQL connection properties may not be set correctly. Do you want to edit your MySQL connection properties?


And my basic and admin properties are OK.

And I tried this too: Right click on databases >> select New Connection >> Driver: MySQL(Connector/J driver), JDBC URL: jdbc:mysql://localhost:3306/mysql , but when I test the connection it gives me the same error.

**MySQL server is running.

Thank you.

Source: Stackoverflow

1 comment on Connecting Netbeans and MySQL but getting Big Integer error

  1. I had the same problem and solved it by changing the version of mysql-connector (driver). The version that was causing me trouble was 5.1.23 and I replaced it with 5.1.46. The path to driver’s .jar file is NetBeans->ide->modules->ext->mysql-connector-java-… Try downloading some version other than the one that you have. Then connect this new .jar file with NetBeans (Right click on drivers:MySql(Connector/J Driver)->customize and then remove old .jar and add new one.

Leave a Reply

Your email address will not be published. Required fields are marked *