【问题标题】:org.hibernate.validator.InvalidValue in hibernate 4org.hibernate.validator.InvalidValue 在休眠 4
【发布时间】:2023-03-18 16:04:01
【问题描述】:

我正在尝试将我的应用程序从 hibernate 3 迁移到 4,同时我正在使用 Seam 2.2,我收到了编译错误 The type org.hibernate.validator.InvalidValue cannot be resolved. It is indirectly referenced from required .class files

不知何故,StatusMessages.instance().add 间接引用了休眠。

if(this.acctNum==null || this.acctNum.trim().length()==0) {
    StatusMessages.instance().add(StatusMessage.Severity.ERROR, " Please enter an account number");
    return null;
}

【问题讨论】:

    标签: java hibernate seam2


    【解决方案1】:

    我已经通过在pom.xml 中添加以下依赖项解决了这个问题

    <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-validator-legacy</artifactId>
         <version>4.0.2.GA</version> 
         <scope>provided</scope>
    </dependency>
    

    【讨论】:

      猜你喜欢
      • 2018-09-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-26
      • 2012-01-23
      • 2012-02-16
      • 2014-09-04
      • 1970-01-01
      相关资源
      最近更新 更多