java.lang.NoClassDefFoundError:org/jadira/usertype/spi/shared/AbstractSingleColumnUserType

java.lang.NoClassDefFoundError:org/jadira/usertype/spi/shared/AbstractSingleColumnUserType,java,hibernate,jodatime,usertype,Java,Hibernate,Jodatime,Usertype,我正在使用UserType库中的一些类,但是我得到了一些错误。似乎有一些类因此错误而丢失 org.apache.jasper.jaspereException:javax.servlet.ServletException:java.lang.NoClassDefFoundError:org/jadira/usertype/spi/shared/AbstractSingleColumnUserType 请指导我做什么。首先,我下载了3.2.0版本,但我降级到了3.0.0CR1,但我仍然得到了一些未

我正在使用UserType库中的一些类,但是我得到了一些错误。似乎有一些类因此错误而丢失

org.apache.jasper.jaspereException:javax.servlet.ServletException:java.lang.NoClassDefFoundError:org/jadira/usertype/spi/shared/AbstractSingleColumnUserType

请指导我做什么。首先,我下载了3.2.0版本,但我降级到了3.0.0CR1,但我仍然得到了一些未找到类的例外

请帮忙。这件事本身要花很多时间

我正在使用这样的用户类型

package classes.mastertables;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import org.hibernate.annotations.Type;
import org.jadira.usertype.dateandtime.joda.PersistentLocalDate;


@Entity
public class BranchMaster {

private String companyId;
@Id
private String branchId;
@Column(unique=true)
private String branchNm;
private String branchOfficeAddress;
@Column(unique=true)
private long branchOfficeTel;
@Column(unique=true)
private long branchOfficeFax;
private String branchOfficeCity;
private String branchOfficeStateCode;
private String branchOfficeCountryCode;
private String branchTypeId;
private String parentBranchId;
private Boolean activeFlg;
private Boolean isBranchOnline;
private String createdBy;
@Column 
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
private PersistentLocalDate createdDt;//modified to String
private String modifiedBy;
@Column 
@Type(type="org.jadira.usertype.dateandtime.joda.PersistentLocalDate")
private PersistentLocalDate modifiedDt;//modified to String
private String dateFormat;
//Getters and settters follow 
在Hibernate.cfg.xml中,我添加了这两行

<mapping class="org.jadira.usertype.dateandtime.joda.PersistentLocalDate" />
    <mapping class="org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime" />

请引导

谢谢,
Abhijeet.

您缺少包含类的jar:
org.apache.jasper.jaspereException:javax.servlet.ServletException
,该类在hibernate.cfg.xml中引用


通常情况下,java.lang.NoClassDefFoundError发生在您的代码引用一个jar->哪个实习生引用另一个jar->而您的案例中缺少另一个jar时。

我认为这不是问题所在……现在我添加了两个jar usertypeSpi 3.2.0 GA和core 3.2.0Ga,现在我得到了这个错误。..java.util.ServiceConfigurationError:org.hibernate.integrator.spi.integrator:Provider org.jadira.usertype.dateandtime.joda.integrator.UserTypeJodaTimeHibernateIntegrator不是子类。我回答了NCDef错误。。。很高兴知道你已经解决了