hibernate将VictorSolutions.jts.Geometry与locationtech.jts.Geometry混合使用

hibernate将VictorSolutions.jts.Geometry与locationtech.jts.Geometry混合使用,hibernate,h2,jts,Hibernate,H2,Jts,在我的JPA实体中,我有以下内容: import org.locationtech.jts.geom.Geometry; .... .... @Column(name = "geometry") private Geometry geometry; 我使用h2 gis进行单元测试。执行测试时,它会给出错误信息: Caused by: org.h2.jdbc.JdbcSQLException: Feature not supported: "converting to class com

在我的JPA实体中,我有以下内容:

import org.locationtech.jts.geom.Geometry;
....
....
@Column(name = "geometry")
    private Geometry geometry;
我使用h2 gis进行单元测试。执行测试时,它会给出错误信息:

Caused by: org.h2.jdbc.JdbcSQLException: Feature not supported: "converting to class com.vividsolutions.jts.geom.Geometry"
为什么它试图映射到另一个类

我的部门是:

<dependency>
            <groupId>org.locationtech.jts</groupId>
            <artifactId>jts</artifactId>
            <version>1.15.0</version>
            <type>pom</type>
        </dependency>
<dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.197</version>
            <scope>test</scope>
        </dependency>
<dependency>
            <groupId>org.orbisgis</groupId>
            <artifactId>h2gis</artifactId>
            <version>1.4.0</version>
            <scope>test</scope>
</dependency>

org.locationtech.jts
jts
1.15.0
聚甲醛
com.h2数据库
氢
1.4.197
测验
org.orbisgis
h2gis
1.4.0
测验

不能使用H2、H2GIS和JTS的不兼容版本

H2GIS 1.4.0要求Vivid Solutions提供H2 1.4.196和JTS 1.14

H2GIS 1.5.0要求LocationTech提供H2 1.4.197和JTS 1.15

如果要使用较新版本的H2,则需要使用一些快照版本的H2GIS


我尝试了第二种组合。它给了我一个错误:java.lang.NoClassDefFoundError:org/locationtech/jts/geom/CoordinateXYZMIt意味着类路径中的某些东西需要JTS1.16。