gpt4 book ai didi

java.lang.AbstractMethodError : org. hibernate.ejb.criteria.CriteriaBuilderImpl.createCriteriaDelete()Ljavax/persistence/criteria/CriteriaDelete;

转载 作者:行者123 更新时间:2023-11-30 08:09:12 26 4
gpt4 key购买 nike

我正在尝试使用条件查询进行删除。但看起来不错,但在运行时显示错误。我收到如下错误:

Caused by: java.lang.AbstractMethodError: org.hibernate.ejb.criteria.CriteriaBuilderImpl.createCriteriaDelete(Ljava/lang/Class;)Ljavax/persistence/criteria/CriteriaDelete;

下面给出了我的代码。

CriteriaBuilder cb = faqentityManager.getCriteriaBuilder();
CriteriaDelete<Wr3HanbaiChik> delete = cb.createCriteriaDelete(Wr3HanbaiChik.class);
Root e = delete.from(Wr3HanbaiChik.class);
delete.where(cb.equal((e.get("fkenCd")), 2));
faqentityManager.createQuery(delete).executeUpdate();

同一个实体管理器正在用于条件查询选择。所以问题不在于实体管理器。此外,错误仅显示在

CriteriaDelete<Wr3HanbaiChik> delete = cb.createCriteriaDelete(Wr3HanbaiChik.class);

最佳答案

您的问题(很可能)是由您的依赖项引起的 - 您没有包含 hibernate-core,这意味着没有可用的实现来调用 createCriteriaDelete

关于java.lang.AbstractMethodError : org. hibernate.ejb.criteria.CriteriaBuilderImpl.createCriteriaDelete()Ljavax/persistence/criteria/CriteriaDelete;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30661050/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com