小编Bir*_*aja的帖子

将 mariaDB 客户端与 MySQL DB 集成的问题

我正在运行一个 Java 应用程序,并使用 MySQL 作为数据库服务器。数据库是AWS RDS。MySQL 连接器是在 GNU/GPL 下发布的,因此必须用更宽松的东西替代它。Maria DB客户端声称兼容。但自从使用 MariaDB 客户端以来,我们在数据库密集型活动期间看到以下间歇性问题:

Excption:-
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/Projectname] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection] with root cause
java.sql.SQLNonTransientConnectionException: (conn=1530488) Connection is closed
    at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(ExceptionFactory.java:73)
    at org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(ExceptionFactory.java:187)
    at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.cmdPrologue(AbstractQueryProtocol.java:1940)

Caused by: org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection
    at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:48)
    at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
    at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)

Caused by: java.sql.SQLNonTransientConnectionException: Could …
Run Code Online (Sandbox Code Playgroud)

java mysql mariadb

2
推荐指数
1
解决办法
2743
查看次数

标签 统计

java ×1

mariadb ×1

mysql ×1