2013年9月3日星期二

EntityManagerFactory configuration issues

My EntityManagerFactory configuration







persistence.xml

xmlns = "http://java.sun.com/xml/ns/persistence"
xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi: schemaLocation = "http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd ">

org.hibernate.ejb.HibernatePersistence

;









error results
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [beans.xml]: Invocation ; of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode () Ljavax / persistence / ValidationMode;
Please answer master what next ?

------ For reference only ---------------------------------- -----
missing package now. jpa implementation of it ?

ejb3-persistence-1.0.2.GA.jar

Internet search
------ For reference only -------------------------------- -------
not a lack of the package , but may be more jpa package , which is likely to be cited a jpa project package , hibernate and comes with one , and not the same version .
is only speculation, can be used as an idea .
------ For reference only -------------------------------------- -
should be your server comes with the package and your development tools conflict between packages .
------ For reference only -------------------------------------- -
I went to spring community see above it says it is spring right jpa2.0 support issues , spring3.1 should be addressed.
still thank you
------ For reference only ------------------------------- --------
hope to be useful , not to the same question tangle
------ For reference only ---------------- -----------------------
not a spring problem, but some hibernate jar file jar with javaee conflict
--- --- For reference only ---------------------------------------
in the end how solve ah ? Landlord to share it ! I also encountered the same problem.

没有评论:

发表评论