我在hibernate 5& java 8中使用jodatime有困难。
我正在将一个大型应用程序从spring5 4/hibernate5 4/java8 7迁移到spring5 5/hibernate5 5/java8 8。
Spring 5.0.5.
Hibernate 5.2.16.终级
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.jodatime</artifactId>
<version>2.0.1</version>
</dependency>实体Bean
@Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
@Column(name="START_DATE")
private org.joda.time.LocalDate startDate;由于存在代码,我不能使用java8时间库。我试过了,但结果是我能应付的巨变。
有人有这方面的经验吗
这是我在启动时遇到的错误。
java.lang.AbstractMethodError
at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:119)
at org.hibernate.type.AbstractType.hydrate(AbstractType.java:82)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2854)发布于 2020-03-24 17:04:14
对于这个版本的Hibernate来说,您的org.jadira.usertype版本太老了。您至少需要5.0.GA或6.0.0.1.GA。
https://stackoverflow.com/questions/50284204
复制相似问题