Questions tagged [eclipselink]

EclipseLink delivers a comprehensive open-source Java persistence solution. EclipseLink focuses on standards (JPA, JAXB, SDO) with advanced features, performance and scalability for enterprise software developers across data sources, formats, and containers.

EclipseLink delivers a comprehensive open-source Java persistence solution. EclipseLink focuses on standards (JPA, JAXB, SDO) with advanced features, performance and scalability for enterprise software developers across data sources, formats, and containers.

5055 questions
2
votes
1 answer

Eclipselink ignore properties javax.persistence.jdbc.driver and javax.persistence.jdbc.url in persistence.xml

I'm actually in the process of updating all the components of our app to the latest version. Therefore, among others, I'm upgrading from eclipselink-2.5.0 to eclipselink-2.7.3 and from Tomcat 7 to TomEE. My persistence unit is giving me trouble. …
ForguesR
  • 3,558
  • 1
  • 17
  • 39
2
votes
1 answer

Creation of table foreign key constraints in database with JPA

In JPA project, when I generate tables for entities I can't see any table foreign key constraints created on database side. I concluded that JPA cannot create table foreign key constraints in database and that referential integrity is enforced in…
sasha
  • 93
  • 1
  • 2
  • 7
2
votes
1 answer

EclipseLink MOXy @XmlPath support for getting element value by attribute value

Using EclipseLink MOXy JAXB implementation, I'm trying to use @XmlPath annotation to get element values based on the value of an attribute of the element. I can't seem to get it to work. Is this supported? XML…
2
votes
5 answers

JPA mapping error for sequence number

I've been building a portion of an application to persist a user's dashboard objects and the JPA has been messing me up for ages. I've got an abstract Widget class that all of the dashboard objects will be extending as more are developed. They are…
mtatham
  • 41
  • 2
  • 5
2
votes
1 answer

Can Mocktio mock a persistence provider, so that jenkins (or other pipeline tools) can execute JUnit tests without a database?

So I wrote JUnit tests, including Mockito, for an API that directly uses DAOs. The mocking of the EntityManager and EntityTransaction is no problem and the tests are running fine on a machine, where the persistence provider can connect to the…
Felix
  • 43
  • 1
  • 1
  • 7
2
votes
3 answers

Large result on PostgreSQL query with Spring JPA/EclipseLink

it is known that PostgreSQL queries expecting large result sets are best executed setting auto-commit off and ResultSet.TYPE_FORWARD_ONLY (see here). However, how can I realize this using Spring JPA together with EclipseLink? Has anyone experience…
Steffen
  • 21
  • 4
2
votes
1 answer

How to have 2 collections of the same type in JPA? (EclipseLink)

Wondering how to do what is specified in How to have 2 collections of the same type in JPA?, but with EclipseLink rather than Hibernate. See that post below: I've got 2 entities in JPA: Entry and Comment. Entry contains two collections of…
Mike
  • 23
  • 2
2
votes
2 answers

How to use EntityManager from @PrePersist?

I have "post" entity/table with this "schema": @Id @GeneratedValue(strategy = GenerationType.AUTO) int id; @GeneratedValue(strategy = GenerationType.AUTO) private Integer postId; private Integer revisionId; private Boolean isCurrentRevision; So,…
Tomik
  • 317
  • 4
  • 12
2
votes
1 answer

Bi-directional Many to Many JPA

I having a hard time with JPA hopefully someone can help me. I have 3 tables: Rol (CPE_ROL) TipoUsuario (GTV_TIPOUSU) RolTipoUsuario (CPE_ROLTUS - Join Table) Rol.java @JoinTable(name = "CPE_ROLTUS", joinColumns = { @JoinColumn(name =…
zkropotkine
  • 337
  • 2
  • 5
  • 12
2
votes
1 answer

classcastexception connecting to MySQL

I'm making a project to college using JSF. I'm trying to write some info on MySQL, but I got that error message: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.1.v20150605-31e8258):…
Leandro Souza
  • 69
  • 1
  • 11
2
votes
0 answers

JAX-WS & JAX-RS with EclipseLink MOXy and external mapping documents

This is about using JAX-WS with EclipseLink MOXy and my problem of not being able to use MOXy's external mapping documents in this combination. (The same actually seems to apply to JAX-RS as well, but I'm limiting the details to JAX-WS to keep this…
Marian Schedenig
  • 227
  • 5
  • 15
2
votes
2 answers

JPA and database Flex fields

'Flex fields' is a term for altering a table at the customer site to add extra columns to a table to hold custom pieces of information about that table's entity. I was wondering if anyone has dealt with supporting this mechanism with jpa,…
MeBigFatGuy
  • 28,272
  • 7
  • 61
  • 66
2
votes
1 answer

since Java 10.0 NullPointer while searching for persistence - JPA eclipselink 2.6.5

I use for a Rest Service (Jersy in a TomEE Server) some EJB entities with eclipselink 2.6.5. With jdk-1.8 it works fine, but with new jdk-10.0 now I got a NullPointerException while searching for persistence. Is there an error or mismatch in my…
2
votes
0 answers

A query using Spring Data sets the transaction to rollback only but I'm not sure why

This is my @Repository interface with the native query: @Repository public interface RecentPersonRepository extends JpaRepository{ @Query(value = "select id, person_id, unique_sc_id, unique_c_id, person_first_name,…
user1531567
  • 177
  • 1
  • 9
2
votes
1 answer

JPA multi inheritance cannot create schema

I have a datamodel with multiple layers of inheritance. As long as every layer contains only one class, I have no problem generating my database schema. When I add another class to the last layer, I get an exception when trying to generate the…
tgr
  • 3,557
  • 4
  • 33
  • 63