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
0 answers

Why do I encounter an exception: "... is not a known entity type"?

I need help with a code snippet. I'm using the JPA provider EclipseLink. I have many classes and all work but this is the only one that throws me an error that it is not an entity. my persistence.xml
2
votes
1 answer

Using EclipseLink MOXy with Java 1.5

Has anyone got EclipseLink MOXy (I'm using eclipselink 2.1.0) to work with Java 5? Whenever I try to unmarshal I get a null pointer exception in org.eclipse.persistence.oxm.record.UnmarshalRecord, in the startCDATA() method (xPathNode is null). The…
Frothy
  • 335
  • 1
  • 3
  • 6
2
votes
0 answers

EclipseLink: usage of query redirectors on subclass-entities with JOINED strategy

My entity-class hierarchy starts with a MappedSuperclass providing a "status" attribute and declaring a query redirector in case of "delete": @MappedSuperclass @AdditionalCriteria(value = "this.entityStatus <> 'DELETED'") @QueryRedirectors(delete =…
2
votes
1 answer

Problem Deploying Wicket/JPA (EclipseLink) App to Glassfish

I have a small Wicket app that I can deploy to Glassfish v3 without any problems. I also have a JAX-RS webservice that includes a jar file that contains JPA entity beans and stateless service beans that deploys successfully. However, when I try to…
sdoca
  • 7,832
  • 23
  • 70
  • 127
2
votes
1 answer

JPA deadlock with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

in my application I have a deadlock problem and do not know if and how I could handle it. I am using JPA 2.1 (with eclipselink) on a glassfish server. There are two EJBs. OuterBean should write a LogEntry to database and calls InnerBean in a loop.…
Filou
  • 490
  • 4
  • 17
2
votes
0 answers

how to write new entity in postCalculateUnitOfWorkChangeSet or preCommitTransaction

I am using Eclipselink and want to write changlog (an entity) for all insert/change/delete business enitities. I found the hooks postCalculateUnitOfWorkChangeSet or preCommitTransaction of SessionEventAdapter where I can build and insert changelog…
Jacky
  • 8,619
  • 7
  • 36
  • 40
2
votes
1 answer

Purpose of Eclipselink 2.6.0 query - SELECT ID FROM TBL WHERE ID=?

Has anyone got an idea why JPA Provider - Eclipselink (using version 2.6.0) generates query like: SELECT ID FROM OPERATION WHERE (ID = ?); or SELECT ID FROM SUBSCRIPTION WHERE (ID = ?); Why it needs to get ID providing an ID... Maybe 1st or 2nd…
maciek
  • 83
  • 7
2
votes
2 answers

Old Sequence Value for JPA Generated ID using Eclipselink

The generated id for a JPA entity generates an "old", used number, when Eclipselink is used as ORM, but with Hibernate the id is the correct next value of the sequence. In the entity class I use these annotations with the id…
Gregor
  • 2,917
  • 5
  • 28
  • 50
2
votes
1 answer

eclipselink batch fetch IN does not work well with multiple tenant

I am using @Multitenant(SINGLE_TABLE) to support multi-tenancy. To fix the n+1 problem, I use batch fetch feature of eclipselink. @Entity public class TestEntity implements Serializable { @Id @Column private Long id; …
Jacky
  • 8,619
  • 7
  • 36
  • 40
2
votes
1 answer

How to inject EntityManager in Java SE using @PersistenceContext (EclipseLink)

I have a client-server application that I made for a project at my university and I'm having problems with the database-JPA Cache synchronization. I'm using an application-managed EntityManager about which I found out from other posts that it's…
frozencure
  • 181
  • 1
  • 9
2
votes
1 answer

Any way to do a path expression that evaluates to a left join in JPA?

This JPQL query: select p from Post p where p.status = 'public' or p.author.name = 'John' Translates to a join between post and author, so it misses all records that are public (status = 'public') that has no author (author = null). Any way to…
Thiago Negri
  • 5,221
  • 2
  • 28
  • 39
2
votes
1 answer

EclipseLink:How to avoid additional sql query for nested left join

I have the following entities: @Entity class A{ @OneToMany private List bs; ... } @Entity class B{ @OneToMany private List cs; ... } @Entity class C{ ... } So I do the followin query: SELECT a FROM A a LEFT JOIN FETCH a.bs b LEFT…
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
2
votes
1 answer

JPA EntityManager.detach() still load lazy relations

I got a problem that goes against my understanding of how it supposed to work. I have a Arquillian-test that tests a repository-method with a JPA query. The test persists an object, and then persists an another object with the first persisted…
Roland
  • 5,328
  • 10
  • 37
  • 55
2
votes
3 answers

why testing an individual junit test works, while testing them together won't?

The test that fails when tested together with mvn test (or through the ide) is called EmpiricalTest. If I test the file alone it goes through, but not otherwise. Why could that be? You can checkout the Maven source code (to test) from here. This is…
simpatico
  • 10,709
  • 20
  • 81
  • 126
2
votes
1 answer

Disable additional criteria only in some entity relations

I am making an application based on JPA/EclipseLink, I implemented a soft delete functionality using @AdditionalCriteria in the root class of the hierarchy of entities (all entities inherit from this). My problem is that now, I need to create a…
Marcos
  • 25
  • 3