问题描述
@Column(nullable = false)
@Type(type =org.jadira.usertype.dateandtime.joda.PersistentDateTime)
private DateTime scheduledDepartureTime;
我下载了下列罐子:
usertype.jodatime-2.0.1.jar
usertype.spi-3.0.0.GA.jar
usertype.core-3.0.0.GA.jar
并将它们添加到我的类路径中。
当试图执行我的应用程序,我得到
java.lang.ClassNotFoundException:org.jadira.usertype.dateandtime.shared.spi。 AbstractSingleColumnUserType
在Eclipse中搜索此类时,我可以找到它,但它位于
org.jadira.usertype.shared.spi ,它解释了异常
任何想法为什么这个类是在错误的包中搜索?由于我使用的是这些罐子的最新版本,我怀疑这是来自版本问题。
感谢您的帮助!
usertype.core-3.0.0.GA.jar 包含 org.jadira。 usertype.dateandtime.joda.PersistentDateTime 您需要。
只使用两个依赖项:
usertype.spi-3.0.0.GA.jar
usertype.core-3.0.0.GA.jar
I'm trying to persist a JODA LocalDate attribute using Hibernate.
@Column(nullable = false) @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentDateTime") private DateTime scheduledDepartureTime;
I downloaded the following jars:
usertype.jodatime-2.0.1.jar usertype.spi-3.0.0.GA.jar usertype.core-3.0.0.GA.jar
and added them to my classpath.
When trying to execute my application, I get
java.lang.ClassNotFoundException: org.jadira.usertype.dateandtime.shared.spi.AbstractSingleColumnUserType
When searching for this class in Eclipse, I can find it, but it is located inorg.jadira.usertype.shared.spi, which explains the Exception
Any idea why this class is searched in the wrong package ? Since I'm using the latest version of these jars, I doubt this comes from version problem.
Thanks for your help !
usertype.core-3.0.0.GA.jar contains org.jadira.usertype.dateandtime.joda.PersistentDateTime that you need.
Use only two dependencies:
usertype.spi-3.0.0.GA.jar usertype.core-3.0.0.GA.jar
这篇关于Jadira usertype找不到类def的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!