0
votes

Why am I not able to create a JDBC Connection Pool in GlassFish 5.0? I want connect to MySQL server. I created connection pool by guide, but nothing is working.

I used Resource type: java.sql.DataSource
Driver class name: com.mysql.cj.jdbc.MysqlDataSource

[2018-07-17T15:45:15.500+0300] [glassfish 5.0] [WARNING] [test.connection.pool.failed [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=45 _ThreadName=admin-listener(4)] [timeMillis: 1531831515500] [levelValue: 900] [[ RAR8054: Exception while creating an unpooled [test] connection for pool [ pool ], Connection could not be allocated because: Cannot open file:/Library/glassfish5.0/glassfish/domains/domain1/config/keystore.jks [Keystore was tampered with, or password was incorrect]]]

1

1 Answers

0
votes

The keystore.jks is needed for creating secure connections. The error looks like the keystore password does not match GlassFish's master password (which is, by default, changeit).

Without knowing a lot more about the environment, it may be best to begin again with a new domain. Debugging this kind of exception to find the problem and fix it would be very difficult through StackOverflow.

Before you delete your current domain, however, it would be a good idea to create a brand new GlassFish domain and try to create the connection pool before doing anything else, just to make sure that starting fresh will indeed solve the problem. If it does, then you can proceed with making the changes needed to run your app on GlassFish.