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

jpa: when merging many to many previous record gets deleted

i have a Users and Tags table,and also a user_tag_xref table that holds the many to many relationship.now netbeans generates the entity classes for me (using eclipselink) below is the entity mapping relationship on User class @ManyToMany(mappedBy =…
Johnson Eyo
  • 113
  • 1
  • 9
2
votes
1 answer

JAXB/Moxy Using XmlElements with XmlAdapter

I try to do exactly what is descripted in this question with MOXy. But i have some different behavior but the result is the same. It doesn't work. I use @XmlElements and for each concret class I added a @XmlElement with name and type. For all…
Christian
  • 1,664
  • 1
  • 23
  • 43
2
votes
1 answer

JPA persists the same object twice when using CascadeType.ALL

I'm using the JPA implementation EclipseLink and a MySQL server for the persistence layer of my application. My problem is, that an object which was already persisted and already have an id, is getting inserted a second time through a many-to-one…
user1879086
  • 53
  • 1
  • 5
2
votes
1 answer

How to use JPA to persist same object to two different db's without distributed transaction?

I want to persist the same entity to a MySQL database and Postgres database (essentially one is a real-time clone of the other). Conceptually, I want to do this in a single method: EntityManager mysql = ...; EntityManager postgres = ...; MyEntity e…
CraftWeaver
  • 707
  • 1
  • 8
  • 21
2
votes
0 answers

Why does eclipselink 2.5.0 does not support Override TableGenerator or SequenceGenerator in subclasses while hiberate does support?

As titled. Isn't it common to share Id definition in a base entity class? such as following: @MappedSuperclass public abstract class BaseEntity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private Long…
Barry Zhong
  • 470
  • 3
  • 17
2
votes
1 answer

eclipselink and jpa: select id association with left join return "0" instead null

I have a JPA select: select c.name, f.id from Child c left join c.father The expected result is: Child 1 | 1 Child 2 | 2 Orphan | null But I caught Child 1 | 1 Child 2 | 2 Orphan | 0 // ZERO ? I was able to workaround with this…
Beto Neto
  • 3,962
  • 7
  • 47
  • 81
2
votes
1 answer

JAXB Eclipse Link Moxy: ClassCastException while Unmarshalling JSON using schema validation

I am using eclipse link(v2.5.1) Dynamic JAXB to convert XML to JSON and viceversa using a multiple schemas. While umarshalling the JSON to XML,I want to validate the JSON(against the XSD) and Dynamic Moxy is unable to validate the generated JSON and…
Balaji
  • 89
  • 1
  • 8
2
votes
1 answer

EclipseLinke:No resource files named META-INF/services/javax.persistence.spi:No PersistenceProvider were found

I am using EclipseLink and even I have all necessary jar files imported with maven, I get still the Exception: Exception in thread "main" javax.persistence.PersistenceException: No resource files named …
Fendrix
  • 556
  • 2
  • 11
  • 34
2
votes
1 answer

How to enable weaving in EclipseLink?

I receive the following warning on the GlassFish terminal while deploying an application that has lazy fetching in entities, WARNING: Reverting the lazy setting on the OneToOne or ManyToOne attribute [zoneTable] for the entity class [class…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
2 answers

Pessimistic Lock doesn't work

I'm developing an application with JPA2.1. I have the followed trouble. I'm trying to lock an entity in this way : Book book = em.find(Book.class, 12); em.lock(book, LockModeType.PESSIMISTIC_WRITE); but if try to access from another windows browser…
Skizzo
  • 2,883
  • 8
  • 52
  • 99
2
votes
2 answers

How to set keys and values of a hashmap as tags and values of a xml file

I followed http://blog.bdoughan.com/2013/06/moxys-xmlvariablenode-using-maps-key-as.html and wrote my code as follows Request and response XML Apple Ball Cat Dog Elephant
kvbrahmam
  • 143
  • 2
  • 14
2
votes
1 answer

Loading eclipselink domain model with custom classloader under weblogic

I have written a custom classloader to be able to dynamically load domain models for each step of an update process. In each step of the update a new thread is created to insure that not only the contextClassloader but the current classloader is…
pentike
  • 418
  • 4
  • 14
2
votes
1 answer

Criteria API: can I access a given alias by its name

Is it possible with Criteria API to access a given alias via the Root object? I have defined a Join and gave it the alias "lead": final Root project = cq.from(Project.class); project.join(Project_.lead).alias("lead"); How can i gain access…
Steve Oh
  • 1,149
  • 10
  • 18
2
votes
2 answers

JPA EclipseLink 'Characters' in IN clause

How can I use a character in JPA's IN Clause in JPQL? For Example In oracle DB I have this Query: select * from channel o where channel_mode IN ('O','R') Channel mode is a char column in DB. I get a error from JPQL that invalid IN argument[o], it…
2
votes
1 answer

Configuring the Mule JPA module to use Eclipse Link and MySQL

I'm trying to write a Mule ESB application that reads an XML file into a domain object and then writes that object to a MySQL database using JPA. I have figured out most of the needed config but I am running into a problem where the Mule JPA module…
Ryan Crichton
  • 219
  • 2
  • 9