Jboss + MariaDB + Hibernate-IJ000453:无法获得Java的托管连接:/ UnicaPlatformDS

时间:2019-05-29 10:50:33

标签: hibernate jboss mariadb datasource

嗨,我遇到了Jboss + MariaDB + Hibernate堆栈的问题,其他数据库工作正常。 在运行应用程序一段时间后出现错误

05/28/2019 10:25:07 WARN  util.JDBCExceptionReporter [233] - SQL Error: 0, SQLState: null

05/28/2019 10:25:07 ERROR util.JDBCExceptionReporter [234] - javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:/MyDS

以下是我的standalone.xml数据源条目。

 <datasources>
                <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
                    <driver>h2</driver>
                    <security>
                        <user-name>sa</user-name>
                        <password>sa</password>
                    </security>
                </datasource>
                <datasource jndi-name="java:/UnicaPlatformDS" pool-name="UnicaPlatformDS" enabled="true">
                    <connection-url>jdbc:mariadb://10.115.147.150:3306/uptest</connection-url>
                    <driver>MariaDBDriver</driver>
                    <pool>
                        <min-pool-size>10</min-pool-size>
                        <max-pool-size>100</max-pool-size>
                        <prefill>true</prefill>
                        <use-strict-min>false</use-strict-min>
                        <flush-strategy>FailingConnectionOnly</flush-strategy>
                    </pool>
                    <security>
                        <user-name>root</user-name>
                        <password>unica*03</password>
                    </security>
                    <validation>
                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
                        <check-valid-connection-sql>select 1</check-valid-connection-sql>
                        <validate-on-match>true</validate-on-match>
                        <background-validation>false</background-validation>
                        <use-fast-fail>false</use-fast-fail>
                    </validation>
                    <timeout>
                        <blocking-timeout-millis>5000</blocking-timeout-millis>
                        <idle-timeout-minutes>60000</idle-timeout-minutes>
                    </timeout>
                    <statement>
                        <prepared-statement-cache-size>15</prepared-statement-cache-size>
                    </statement>
                </datasource>
                <datasource jndi-name="java:/campaignPartition1DS" pool-name="campaignPartition1DS" enabled="true">
                    <connection-url>jdbc:mariadb://10.115.147.150:3306/uctest</connection-url>
                    <driver>MariaDBDriver</driver>
                    <pool>
                        <min-pool-size>1</min-pool-size>
                        <max-pool-size>100</max-pool-size>
                        <prefill>true</prefill>
                        <use-strict-min>false</use-strict-min>
                        <flush-strategy>FailingConnectionOnly</flush-strategy>
                    </pool>
                    <security>
                        <user-name>root</user-name>
                        <password>unica*03</password>
                    </security>
                    <validation>
                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
                        <check-valid-connection-sql>select 1</check-valid-connection-sql>
                        <validate-on-match>true</validate-on-match>
                        <background-validation>false</background-validation>
                        <use-fast-fail>false</use-fast-fail>
                    </validation>
                    <timeout>
                        <blocking-timeout-millis>5000</blocking-timeout-millis>
                        <idle-timeout-minutes>60000</idle-timeout-minutes>
                    </timeout>
                    <statement>
                        <prepared-statement-cache-size>15</prepared-statement-cache-size>
                    </statement>
                </datasource>
                <drivers>
                    <driver name="h2" module="com.h2database.h2">
                        <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                    </driver>
                    <driver name="oracledriver" module="oracle.jdbc">
                        <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
                    </driver>
                    <driver name="MariaDBDriver" module="mariadb_1.jdbc">
                        <driver-class>org.mariadb.jdbc.Driver</driver-class>
                        <xa-datasource-class>org.mariadb.jdbc.MariaDbDataSource</xa-datasource-class>
                    </driver>
                </drivers>
            </datasources>

我的尝试-

1-最小添加连接池。

2-等待超时,锁定等待超时和互动超时到最大值。

在我看来,这似乎是jboss或MariaDB的配置问题。

请帮助解决此问题。

0 个答案:

没有答案