开发者

Spring JPA Hibernate Maven - Error : No persistence units parsed from {classpath*:META-INF/persistence.xml}

开发者 https://www.devze.com 2023-02-09 01:46 出处:网络
While testing the application created in Getting Started With JPA in Spring 2.0 tutorial I am getting following error. I have created Maven Project in eclipse. Her开发者_C百科e is the part of the stru

While testing the application created in Getting Started With JPA in Spring 2.0 tutorial I am getting following error. I have created Maven Project in eclipse. Her开发者_C百科e is the part of the structure of the project

ecotraveler
   src
      main
         java
             com
                enam
         resources
             config
                   applicationContext.xml
   WebContent
       META-INF
           persistance.xml

While running test class I am getting No persistence units parsed from {classpath*:META-INF/persistence.xml}

Can anyone tell what could be the problem? It seems application is unable to find specified path. I double check that WebContet/META-INF is in eclipse build path.


You need to put the META-INF directory in you resources directory, not in the WebContent


You spelt "persistence.xml" wrong; it has no "a"

0

精彩评论

暂无评论...
验证码 换一张
取 消