Wildfly 10 can't connect datasource: invalid connection

大憨熊 提交于 2019-12-05 06:36:48
user2543120

The exception you have is generic.

Check on {WILDFLY_HOME}/standalone/log/server.log

You can use tail -f server.log while you test on the web console.

This will give you the right error to work on.

I solved this error by reducing pool size and set prefill attribute to false on datasource settings.

<pool>
   <min-pool-size>5</min-pool-size>
   <max-pool-size>10</max-pool-size>
   <prefill>false</prefill>
   <use-strict-min>false</use-strict-min>
   <flush-strategy>IdleConnections</flush-strategy>
</pool>

We had such error on MS SQL when our user was not mapped to requested database

If your datasource is not XA, open standalone.xml and remove the datasource-class property from your datasource definition. Wildfly adds it even if you don't specify it whe you create the datasource.

You may have to restart the server to see it working.

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