Why does the server log that it can not open keystore.jks when I try to create a connection pool?

这一生的挚爱 提交于 2020-01-25 10:17:29

问题


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:


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.



来源:https://stackoverflow.com/questions/51381969/why-does-the-server-log-that-it-can-not-open-keystore-jks-when-i-try-to-create-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!