0

I am not a good Java programmer yet, but I dream of becoming one. I am practicing building an eCommerce web app with an online Affablebean project using java, my IDE is NetBeans, database is MySQL and MySQL workbench, the server on the Netbeans IDE is Glassfish server 4.

So whenever I try to Ping, to create a connection between Glassfish and MySQL database, I get an error message like this

Ping Connection Pool failed for AffableBeanPool. Connection could not be allocated because: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long Please check the server.log for more details.

How can I fix this problem?

Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137
kekule
  • 1
  • How are you creating the connection to your mysql database? – BillRobertson42 Jan 14 '17 at 15:13
  • First of all I right clicked on the glassfish node (while it's running) on on the netbeans IDE, after that, I chose the view domain admin console. The glassfish interface then appears on the browser where I now click on the JDBC node, I then click on JDBC Connection Pools. After that, the "AffableBeanPool" option is displayed. So when i click the AffableBeanPool, an interface containing some of the connection pool details appear including the ping button. Naturally clicking the ping button should establish the connection to the Mysql database with a success message. But, I only get error – kekule Jan 14 '17 at 16:12
  • here are the last three lines of the messages displayed on my netbeans counsel. Warning: using.default.ds, Warning: RAR8054: Exception while creating an unpooled [test] connection for pool [ AffableBeanPool ], Connection could not be allocated because: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long, Severe: RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=AffableBeanPool}'. – kekule Jan 14 '17 at 16:21

0 Answers0