com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source

后端 未结 6 787
长发绾君心
长发绾君心 2020-12-01 16:05

I have MySQL under my Hibernate and I am also using c3p0-0.9.1 for connection pool.

When running on my laptop (I mean locally) I have no errors. But when I deploy it

相关标签:
6条回答
  • 2020-12-01 16:38

    Was missing a configuration property while setting up the ComboPooledDataSource ; was missing the jdbc driver name; when I set this - was able to get the connection;

    0 讨论(0)
  • 2020-12-01 16:40

    Your c3p0-config.xml or c3p0-config.properties is not getting loaded, make sure one of the file should be include in the classpath while deploying in server.

    0 讨论(0)
  • 2020-12-01 16:41

    Another problem which may cause this kind of exception is that your JDBC driver doesn't exists in the classpath ...

    0 讨论(0)
  • 2020-12-01 16:48

    Some external problems and answers that might help:

    • Problem with c3p0
    • Problems to connect to mysql with hibernate
    • java.sql.SQLException Connections Could not be Acquired from the Underlying Database!

    Please follow the links, they all cover problems with the same exception.

    0 讨论(0)
  • 2020-12-01 17:00

    Check your database connection. When it is down can happen this exception

    0 讨论(0)
  • 2020-12-01 17:02

    Check your JDBC driver version, I've got the same problem. I'm using postgresql, I'd just updated the version in pom.xml and everything worked fine.

    0 讨论(0)
提交回复
热议问题