小编flx*_*lzk的帖子

在类路径中找不到任何 META-INF/persistence.xml 文件

我正在尝试将 JPA 设置为我的 RESTful webapi,以便在数据库上提供 CRUD 服务。我收到错误Could not find any META-INF/persistence.xml file in the classpath但实际上在文件夹中的persistence.xml中META-INF

1 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.6-Final
    17 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.6-Final
    20 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
    23 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
    27 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
    110 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
    115 [main] INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.5.6-Final
    129 [main] …
Run Code Online (Sandbox Code Playgroud)

java xml eclipse hibernate jpa

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

eclipse ×1

hibernate ×1

java ×1

jpa ×1

xml ×1