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

JPA: Duplicate entry for primary key

Last 4 hours I was dealing up with this JPA problem. At last I gave up so I am asking for a help from you. I tried almost every suggested solutions what I saw so far. I tried, 1) Mapping changes (@ManyToOne, @OneToOne, @OneToMany) 2) Cascade options…
user2949556
  • 47
  • 1
  • 7
2
votes
3 answers

Using EclipseLink JPA in OSGI (Karaf)

I am using EclipseLink as my JPA implementation(in KARAF).And following jars are used:- install -s mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/2.5.0 install -s mvn:org.eclipse.persistence/org.eclipse.persistence.asm/2.5.0 install -s…
Manas Pratim Chamuah
  • 1,527
  • 2
  • 15
  • 33
2
votes
0 answers

Store Current XML Element Name using MOXy or JAXB

I am using a combination of StAX and MOXy to parse XML files. When my parser detects that I am at a specified element, using XPaths, I unmarshal the element. Sometimes the XPath can represent multiple XML elements. Here is an example: /a/b/*[self::c…
2
votes
1 answer

JPA Eclipselink/TopLink: how to load persistence.xml from custom folder other than classpath folder ? [Edited]

I have standalone Java application using JPA. I'm looking to load persistance.xml file from user configured folder. I know JPA vendor checks for meta-inf folder and loads it automatically. Using this way mentioned below, it is working from any…
Samdalton
  • 21
  • 5
2
votes
1 answer

JPA CascadeType.REMOVE not working

I have two entities Business which is composed of a list of Departments @Entity @Table(name = "Business") public class Business implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy =…
Armando
  • 459
  • 1
  • 8
  • 22
2
votes
1 answer

How to get foreign key value from not fetched relationship?

Having two entities defining relationship by @ManyToOne and @OneToMany, how can I get foreign key without asking from related object and just by looking at defining tables? How do I get OWNER_ID from Owned by something like owned.getOwnerId()…
reith
  • 2,028
  • 13
  • 26
2
votes
1 answer

JPA ElementCollection Map

i need to assign the value of the map to my entity but jpa tries to save the hole object as an byte array. @Entity public class ImageSet { ... @ElementCollection private Map images = new…
perotom
  • 851
  • 13
  • 33
2
votes
0 answers

Cannot create JDBC driver of class '' for connect URL 'null' Error Code: 0

I searched and tried a lot but nothing helps. I getting the "well known" -Error. (Error Code: 0 - no more information) My persistence-.xml
Trival
  • 553
  • 1
  • 5
  • 9
2
votes
2 answers

Can JPA/JaxB populate foreign key by itself?

I am using classes which are JPA annotated to map xml data into a database and the other way around via JAXB. Problem is that objects created by JAXB do not include foreign key fields and therefore are null. This conerns ownerId in example below. Is…
JInsider
  • 43
  • 5
2
votes
1 answer

eclipselink jpa criteria reference unmapped column

when writing jpql queries I can reference not mapped columns with COLUMN() (I know it is eclipselink specific). Is there any way I can reference unmapped column when building criteria using javax.persistence.criteria.CriteriaBuilder,…
redguy
  • 405
  • 6
  • 16
2
votes
1 answer

eclipselink IndirectCollectionsProvider points to JDK 8 in Weblogic 12c/JDK 7

I got the following error when I'm running in the following environment: Weblogic 12c JDK 7 Eclipselink 2.6.0 Is this a bug to be reported to Eclipselink development? ####
Ian Lim
  • 4,164
  • 3
  • 29
  • 43
2
votes
1 answer

query with OneToMany - openJPA vs EclipseLink

openjpa is complaining about an incorrect argument for a JPA query that EclipseLink properly handles. EclipseLink returns the set of validation messages for the motor. Two questions: 1) Is my query wrong and EclipseLink is kindly handling it…
Timothy Vogel
  • 1,363
  • 2
  • 21
  • 39
2
votes
1 answer

Why am I getting an "An exception was thrown while searching for persistence archives with ClassLoader" error when I attempt to run a JUnit test?

I am trying to run a Junit test with CRUD database functions, but when I attempt to test the program I am met with the following error: Exception Description: An exception was thrown while searching for persistence archives with ClassLoader I feel…
Codarus
  • 437
  • 1
  • 5
  • 16
2
votes
3 answers

Casts in JPQL with EclipseLink

Is it possible to use casts in JPQL? In HQL it seems to be supported cast(... as ...), where the second argument is the name of a Hibernate type, and extract(... from ...) if ANSI cast() and extract() is supported by the underlying…
Timo Westkämper
  • 21,824
  • 5
  • 78
  • 111
2
votes
2 answers

JPA eclipselink Inheritance between entities : oracle database

I'm facing a little problem with my web application which is in vaadin and i'm using jpa and eclipselink for the mapping. I have three entities : encaiss (@MappedSuperclass contains just Id) | …
Amine
  • 225
  • 3
  • 13