java - Javax.persistance not available in TomEE -


when running java ee app on tomee following error:

java.lang.noclassdeffounderror: javax/persistence/namedstoredprocedurequery

there no compile time errors when build app.i developing in eclipse , have apache tomee selected under targeted runtimes in project properties, project has access java ee.

as project uses hibernate have following jars in web-inf\lib directory (it's understanding these jars in turn use javax.persistence):

  • hibernate-commons-annotations-4.0.4
  • hibernate-core-4.3.5
  • hibernate-jpa-2.1

i've seen bunch of questions this one detailing solution add required jpa jar lib directory of app , well. although solution may work sounds hacky me, want tomee manage jpa libraries itself. it's java ee server why doesn't this. whats clean solution?

@jb nizet's answer accepted solution:

this class exists since jpa 2.1. guess tomee version supports jpa 2.0. , indeed, thehome page of tomee says: "java ee 6 web profile". java ee 6 includes jpa 2.0, not 2.1. – jb nizet


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -