English 中文(简体)
javax.persistence ->jakarta.persistence Boo Springt 升级错误:“Class . is listed in the persistent.xml file, but is not annotated”
原标题:After javax.persistence -> jakarta.persistence Spring Boot Upgrade, error: "Class .. is listed in the persistence.xml file, but is not annotated"

还有一个类似的问题here,但最近没有任何评论。 我不想在Eclipse中撤销日本邮政局的确认,我想谈谈如何解决这一警告:

<>Summary: 我们升温了春天2.7-> 3.0.2。 在实体类别中,我们替换了<代码>javax.persistence.* with jakarta.persistence.*。 在我们的一些实体类别中,这一错误一旦发生即出现:

Class ".." is listed in the persistence.xml file, but is not annotated

Reverting the jakarta.persistence.* Back to javax.persistence.*除了这一错误,但我们需要更新到雅加达的春布特3x。

我们有一份列有管理实体的<代码>persistence.xml文档。

<persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>model.MyData</class>
    <class>model.MyDataError</class>
    <class>model.StoredProcedureResultBean</class>   
 </persistence-unit>

<代码>persistence.xml所列所有课程均附有@Entity的说明。 没有。

任何ti?

问题回答

由于这不影响编码功能,我们只把Eclipse / STS中的(无)错误信息删除:

情况――和; Java 持久性――和; JPA -> Errors/Warnings:

在Errors/Warnings网页上:“Class is listed in the persistent.xml file but is not annotated”





相关问题
Multiple Hibernate instances using C3P0

I am facing a weird problem and it seems to be c3p0 related. I am starting two instances of an app in the same java vm which interact with each other. After some operations "APPARENT DEADLOCK" ...

Hibernate vs Ibatis caching

We can speed up a hibernate app easyly with 2nd level cache using infinispan or ehcache/terracotta,... but ibatis only have a simple interface to implement for caching. And hibernate knows more ...

Using annotations to implement a static join in hibernate

I m relatively new to hibernate and was wondering if someone could help me out. While I have no issues implementing a normal join on multiple columns in hibernate using the @JoinColumns tag, I m ...

Hibernate query with fetch question

I have a 2 entities in a One-To-Many relationship: OfficeView.java: public class OfficeView implements java.io.Serializable { private Integer officeId; private String addr1; private ...

hibernate interceptors : afterTransactionCompletion

I wrote a Hibernate interceptor : public class MyInterceptor extends EmptyInterceptor { private boolean isCanal=false; public boolean onSave(Object entity, Serializable arg1, Object[] arg2, String[]...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

Hibernate/GORM: collection was not processed by flush()

I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate....

Hibernate Criteria API equivalent for "elements()"

Is it possible to implement the following query using Criteria API? select order from ORDER as order,ITEM as item where item.itemID like ITM_01 and item in elements(order.items)

热门标签