Questions tagged [jpa-2.2]

This tag is for questions specifically about new features of version 2.2 of the Java Persistence API.

63 questions
47
votes
10 answers

EclipseLink 2.7.0 and JPA API 2.2.0 - signature mismatch

When running a project built by maven with the following dependencies: org.eclipse.persistence javax.persistence 2.2.0
Stéphane Appercel
  • 1,367
  • 2
  • 12
  • 18
21
votes
2 answers

JPA Storing OffsetDateTime with ZoneOffset

I have the following entity class: @Entity public class Event { private OffsetDateTime startDateTime; // ... } However, persisting and then reading the entity to/from the database with JPA 2.2 results in a loss of information: the…
9
votes
2 answers

Upgrading from JPA 2.1 to JPA 2.2

I'm having issues upgrading to JPA 2.2. I'm using eclipselink and changed the version in my pom: org.eclipse.persistence eclipselink
Leon Dendle
  • 121
  • 1
  • 5
7
votes
2 answers

From which version on will Hibernate support JPA 2.2?

As Java EE 8 including JPA 2.2 was released this summer it's good to know when Hibernate will support it. Hibernate 5.2 is mentioned to support JPA 2.1. Hibernate 6.0 roadmap doesn't have any references to JPA 2.2 support. Thanks.
Sergey
  • 1,463
  • 3
  • 18
  • 29
6
votes
1 answer

HHH000342: Could not obtain connection to query metadata : null

Im trying to insert some simple data in my local mysql database using jpa-2.2 with hibernate in my java project this is the pom related: javax.persistence
Andres Cárdenas
  • 632
  • 1
  • 5
  • 24
5
votes
1 answer

Are positional parameters deprecated in Hibernate 5.3.2?

We are migratiing from Hibernate 3 to Hibernate 5.3 ,We have used positional parameters in HQL, I see some posts on Hibernate support saying that positional parameters are no longer supported in Hibernate 5. And should be replaced with named…
4
votes
6 answers

How to stream large Blob from database to application using JPA?

I have JPA a entity class that contains a blob field like this: @Entity public class Report { private Long id; private byte[] content; @Id @Column(name = "report_id") @SequenceGenerator(name = "REPORT_ID_GENERATOR", sequenceName…
M-Soley
  • 155
  • 1
  • 10
2
votes
1 answer

The statement was aborted because it would have caused a duplicate key value

Part of my Java EE application is user management. My development environment is Netbeans 12.0 on Windows 10, JDK 14, Glassfish server 5.1, Apache Derby DB, and the eclipse persistence JPA. Currently, in the development phase, I have configured the…
Darvin
  • 148
  • 8
2
votes
2 answers

java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object; while using JPA 2.2 query.getResultStream().findFirst()

The code of my Spring Data repository method is as follows: public Optional findShipmentLabelByClientIdAndAwb(String clientId, String awb) { String queryString = "select g.shipmentLabel as shipmentLabel from GenericShipment g where…
2
votes
0 answers

What is the difference between "Persistent Class" and "Entity" in JPA or in Hibernate?

First things first: I'm aware of this question, which, at the high level of abstraction, asks same what I ask here; however, I find it (and its answer) lacking, therefore, I would like to elaborate on this topic here; I would kindly ask anyone, who…
Giorgi Tsiklauri
  • 6,699
  • 7
  • 29
  • 54
2
votes
0 answers

Swagger - system.js:461 RangeError: Maximum call stack size exceeded - using @ManyToMany relationship

Spring Fox Swagger issue: I have @ManyToMany relationship in my JPA model classes, but when launching paginated endpoint getting below error. system.js:461 RangeError: Maximum call stack size exceeded at Ct (immutable.js:2494) at…
Pra_A
  • 7,134
  • 12
  • 89
  • 170
2
votes
1 answer

Spring Data Jpa - The type Specifications is deprecated

I am implementation the logic from link: Spring Data - Multi-column searches where I am looking to search by FirstName. As per link:…
Pra_A
  • 7,134
  • 12
  • 89
  • 170
2
votes
1 answer

Hibernate 5 - java.lang.NoSuchMethodError: javax.persistence.Table.indexes()

I'm trying to test some POJOs with hibernate annotations and I'm getting the same error on and on. I used the same configuration in another project and it all worked fine. I tested the jdbc connection that is used when the hib objects are tested -…
JeanPierre
  • 21
  • 1
  • 3
2
votes
1 answer

Hibernate CompositeUserType that is comparible in JPA-QL (or HQL) query

I've created a custom type for Hibernate to store an OffsetDateTime's timestamp and offset (because the default JPA 2.2 / Hibernate 5.2 with java 8 support implementation loses the offset information): public class OffsetDateTimeHibernateType…
Geoffrey De Smet
  • 22,431
  • 8
  • 59
  • 106
2
votes
0 answers

@Inject issues in AttributeConverter in JPA 2.2/Java EE 8/Glassfish v5

JPA 2.2 should support @Inject in AttributeConverter, as described in the specification: Attribute converter classes in Java EE environments support dependency injection through the Contexts and Dependency Injection API (CDI) [ 7 ] when CDI is…
Hantsy
  • 4,075
  • 3
  • 28
  • 61
1
2 3 4 5