javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode() Ljavax/persistence/SharedCacheMode;

Jåcob

I have persistence-api-1.0.2,hibernate-jpa-2.0-api-1.0.1.Final and other related jars in the lib directory. However, when I am deploying war file, I am getting the following error

nested exception is java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()
Ljavax/persistence/SharedCacheMode; 

How can I resolve this issue?

Update

Jars in lib folder

enter image description here

Neil Stockton

Why would you have JPA API 1.0 (which is what persistence-api-1.0.2 is) and JPA API 2.0 (hibernate-jpa-2.0-api) in the CLASSPATH at the same time?? Decide which version of JPA you are using before you do anything else

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Method have no definition javax.persistence.spi.PersistenceUnitInfo.getValidationMode()

From Dev

java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

From Dev

Unable to get rid of: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

From Dev

weblogic.management.DeploymentException: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()

From Dev

EclipseLinke:No resource files named META-INF/services/javax.persistence.spi:No PersistenceProvider were found

From Dev

java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider in WebLogic

From Dev

java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider in WebLogic

From Dev

javax.persistence.TransactionRequiredException:

From Java

NoSuchMethodError in javax.persistence.Table.indexes()[Ljavax/persistence/Index

From Dev

ejb3 persistence and javax persistence jar files in classpath?

From Dev

javax.persistence.PersistenceException: Invalid persistence.xml

From Dev

javax.persistence.PersistenceException: Unable to locate persistence units

From Dev

javax.persistence.PersistenceException: No Persistence provider for EntityManager named

From Dev

javax.persistence.PersistenceException: No Persistence provider for EntityManager named XX

From Dev

Why JPA uses javax.persistence.NoResultException

From Dev

Maven dependencies regarding javax.persistence JAR?

From Dev

No qualifying bean of type [javax.persistence.EntityManager]

From Dev

Eclipse Warnings: class javax.persistence.* not found

From Dev

playframework - package javax.persistence does not exist

From Dev

javax.persistence.TransactionRequiredException: No transactional EntityManager available

From Dev

Possible causes of javax.persistence.TransactionRequiredException

From Dev

NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()

From Dev

java.lang.NoClassDefFoundError: javax/persistence/EntityListeners

From Dev

Serializing List<javax.persistence.Tuple> to JSON

From Dev

javax.persistence.EntityManager missing a method

From Dev

Spring STS javax/persistence/EntityManagerFactory can not found

From Dev

Enabling Spring Transactions, javax.persistence.TransactionRequiredException

From Dev

Can I use javax.persistence.OneToOne together with javax.persistence.ForeignKey?

From Dev

My entities are not persisting showing javax.persistence.TransactionRequiredException

Related Related

  1. 1

    Method have no definition javax.persistence.spi.PersistenceUnitInfo.getValidationMode()

  2. 2

    java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

  3. 3

    Unable to get rid of: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;

  4. 4

    weblogic.management.DeploymentException: java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getValidationMode()

  5. 5

    EclipseLinke:No resource files named META-INF/services/javax.persistence.spi:No PersistenceProvider were found

  6. 6

    java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider in WebLogic

  7. 7

    java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider in WebLogic

  8. 8

    javax.persistence.TransactionRequiredException:

  9. 9

    NoSuchMethodError in javax.persistence.Table.indexes()[Ljavax/persistence/Index

  10. 10

    ejb3 persistence and javax persistence jar files in classpath?

  11. 11

    javax.persistence.PersistenceException: Invalid persistence.xml

  12. 12

    javax.persistence.PersistenceException: Unable to locate persistence units

  13. 13

    javax.persistence.PersistenceException: No Persistence provider for EntityManager named

  14. 14

    javax.persistence.PersistenceException: No Persistence provider for EntityManager named XX

  15. 15

    Why JPA uses javax.persistence.NoResultException

  16. 16

    Maven dependencies regarding javax.persistence JAR?

  17. 17

    No qualifying bean of type [javax.persistence.EntityManager]

  18. 18

    Eclipse Warnings: class javax.persistence.* not found

  19. 19

    playframework - package javax.persistence does not exist

  20. 20

    javax.persistence.TransactionRequiredException: No transactional EntityManager available

  21. 21

    Possible causes of javax.persistence.TransactionRequiredException

  22. 22

    NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()

  23. 23

    java.lang.NoClassDefFoundError: javax/persistence/EntityListeners

  24. 24

    Serializing List<javax.persistence.Tuple> to JSON

  25. 25

    javax.persistence.EntityManager missing a method

  26. 26

    Spring STS javax/persistence/EntityManagerFactory can not found

  27. 27

    Enabling Spring Transactions, javax.persistence.TransactionRequiredException

  28. 28

    Can I use javax.persistence.OneToOne together with javax.persistence.ForeignKey?

  29. 29

    My entities are not persisting showing javax.persistence.TransactionRequiredException

HotTag

Archive