I am new to was 9. In my application default jpa setting is 2.0. But when an error occured, in the console it is showing error caused by jpa 2.2.3. In the code, I didn't set this version. Then how it is getting 2.2.3 version?
1 Answers
WebSphere 9.0 supports JPA specification levels 2.0 and 2.1. In support of those spec levels, WebSphere 9.0 ships default persistence providers for both levels. The default persistence provider for JPA specification level 2.0 is WSJPA, which is an extension of OpenJPA.
I am new to was 9. In my application default jpa setting is 2.0
You can validate your default JPA settings in the administrative console in the following location:
Servers > Server Types > WebSphere application servers > server_name > Container Services > Default Java Persistence API settings
https://www.ibm.com/docs/en/was/9.0.5?topic=providers-configuring-wsjpa-persistence-provider
But when an error occured, in the console it is showing error caused by jpa 2.2.3. In the code, I didn't set this version. Then how it is getting 2.2.3 version?
I believe what you are seeing is the OpenJPA (the persistence provider) version, not the JPA specification version. If you were to include the specific exception you are seeing, I would guess it looks something like this:
Caused by: <openjpa-2.2.3-SNAPSHOT-ra68a0f1 nonfatal user error> org.apache.openjpa.persistence.PersistenceException
Observe that 2.2.3
is associated with openjpa
; this is just the specific build identifier.
Persistence providers (EclipseLink, OpenJPA, Hibernate), have their own project version that does not necessarily match the JPA specification level that they support. For instance, EclipseLink 2.6 supports JPA level 2.1 and Hibernate 5.3 supports JPA level 2.2
Currently, OpenJPA 2.2.3 is shipped with WebSphere 9.0 in support of JPA 2.0 as a persistence provider.

- 253
- 2
- 13