eclipselink

Lazy loading of @ManyToOne relation fails with GlassFish 4 / EclipseLink

 ̄綄美尐妖づ 提交于 2020-08-27 21:44:44
问题 GlassFish 4 (actually its JPA implementation, i.e. EclipseLink) fails to lazy load a @ManyToOne JPA relation from our Java EE 7 application. Default/eager loading is ok, but not lazy loading. The relation in the 'Student' entity is: @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "addr_id") private Address address; The (simplified) persistence.xml looks like: <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

Lazy loading of @ManyToOne relation fails with GlassFish 4 / EclipseLink

♀尐吖头ヾ 提交于 2020-08-27 21:43:11
问题 GlassFish 4 (actually its JPA implementation, i.e. EclipseLink) fails to lazy load a @ManyToOne JPA relation from our Java EE 7 application. Default/eager loading is ok, but not lazy loading. The relation in the 'Student' entity is: @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "addr_id") private Address address; The (simplified) persistence.xml looks like: <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

Maven hangs while running test case Eclipselink & hsqldb

半腔热情 提交于 2020-08-18 17:51:58
问题 Using jps and jstack I can get to the offending waiting thread but don't know how to troubleshoot it or what is causing it. See below the Maven dependencies and the jstack result and the waiting thread with tid=0x000000000022c000 . Analysing further it seems an issue between Eclipselink and hsqldb for the chosen versions. I got this issue as result of upgrading those two libraries since it used to work perfectly for versions 2.0.1 and 1.8.0.10 of Eclipselink and hsqldb respectively.

Maven hangs while running test case Eclipselink & hsqldb

余生长醉 提交于 2020-08-18 17:47:37
问题 Using jps and jstack I can get to the offending waiting thread but don't know how to troubleshoot it or what is causing it. See below the Maven dependencies and the jstack result and the waiting thread with tid=0x000000000022c000 . Analysing further it seems an issue between Eclipselink and hsqldb for the chosen versions. I got this issue as result of upgrading those two libraries since it used to work perfectly for versions 2.0.1 and 1.8.0.10 of Eclipselink and hsqldb respectively.

EclipseLink JPA Primary Key with Custom Default Value

可紊 提交于 2020-08-04 22:50:36
问题 I have a table in my SQL Server database where the primary key field is defined with NEWID() as the default value. The expectation is client need not pass the primary key field value and the SQL server will handle it. While defining my model class at JPA I have to define this ID field with a generation type. I tried IDENTITY , TABLE and SEQUENCE Generator. Unfortunately I am getting an error as Exception Description: Error preallocating sequence numbers. The sequence table information is not

EclipseLink JPA Primary Key with Custom Default Value

会有一股神秘感。 提交于 2020-08-04 22:49:14
问题 I have a table in my SQL Server database where the primary key field is defined with NEWID() as the default value. The expectation is client need not pass the primary key field value and the SQL server will handle it. While defining my model class at JPA I have to define this ID field with a generation type. I tried IDENTITY , TABLE and SEQUENCE Generator. Unfortunately I am getting an error as Exception Description: Error preallocating sequence numbers. The sequence table information is not

How to force EclipseLink's @PrivateOwned to perform delete before insert

懵懂的女人 提交于 2020-08-02 12:29:25
问题 I have an entity which has @OneToMany private ownership of a collection of another entities. That other entity has some unique constraints over different set of columns. The problem arises when I want to update the main entity (together with changed child entities). EclipseLink does insert before delete, so sometimes, an insertion violates the constraint and throws an exception. Is there a way to force the deletion of child entities before inserting their updated counterparts? 回答1: I know, I

How to force EclipseLink's @PrivateOwned to perform delete before insert

China☆狼群 提交于 2020-08-02 12:27:04
问题 I have an entity which has @OneToMany private ownership of a collection of another entities. That other entity has some unique constraints over different set of columns. The problem arises when I want to update the main entity (together with changed child entities). EclipseLink does insert before delete, so sometimes, an insertion violates the constraint and throws an exception. Is there a way to force the deletion of child entities before inserting their updated counterparts? 回答1: I know, I

HikariPool-1 - jdbcUrl is required with driverClassName

a 夏天 提交于 2020-07-05 00:07:36
问题 I went back to programming my old program https://github.com/JonkiPro/REST-Web-Services. I've updated Spring Boot from version 15.6 to version 2.0.0. I have encountered many problems with compilation, but I can not deal with one. Well, during compilation, he throws me in the console 2018-03-18 21:54:53.339 ERROR 3220 --- [ost-startStop-1] com.zaxxer.hikari.HikariConfig : HikariPool-1 - jdbcUrl is required with driverClassName. 2018-03-18 21:54:55.392 INFO 3220 --- [ost-startStop-1] j