Java HH000431:无法确定H2数据库版本,某些功能可能无法工作
我正在WildFly 10中运行集成测试,当服务器启动时,会出现关于H2数据库版本的警告: HH000431:无法确定H2数据库版本,某些功能可能无法工作 有人能告诉我如何精确地计算H2版本吗?谢谢Java HH000431:无法确定H2数据库版本,某些功能可能无法工作,java,hibernate,wildfly,h2,Java,Hibernate,Wildfly,H2,我正在WildFly 10中运行集成测试,当服务器启动时,会出现关于H2数据库版本的警告: HH000431:无法确定H2数据库版本,某些功能可能无法工作 有人能告诉我如何精确地计算H2版本吗?谢谢 persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3
persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="jsr352" transaction-type="JTA">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<class>org.hibernate.search.jsr352.test.entity.Company</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" />
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.format_sql" value="false" />
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.search.default.directory_provider" value="ram" />
<property name="hibernate.search.indexing_strategy" value="manual" />
</properties>
</persistence-unit>
</persistence>
org.hibernate.jpa.HibernatePersistenceProvider
java:jboss/datasources/examples
org.hibernate.search.jsr352.test.entity.Company
WFstandalone.xml配置中的子系统数据源
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
<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>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB\u关闭\u打开\u退出=错误
氢
sa
sa
org.h2.jdbcx.JdbcDataSource
当我指定使用org.hibernate.dialogue.h2dialogue
时,我遇到了这个问题,而实际上我是将HSQL与驱动程序org.hsqldb.jdbcDriver一起使用的。更改为使用org.hibernate.dialogue.hsqldialate
后,消息消失了
这不是你的情况,你似乎使用H2,所以可能驱动程序类是错误的?我希望有这样的情况:
<property name="hibernate.connection.driver_class" value="org.h2.Driver"/>
:这似乎是WildFly拒绝的问题。