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

Eclipse link jpa problem

With two users simultaneously using my simple app, I'm getting exception: Error Code: 0 Call: SELECT ID, NAME, IMAGE FROM GameObjectTable ORDER BY ID ASC Query: ReadAllQuery(referenceClass=GameObject sql="SELECT ID, NAME, IMAGE FROM GameObjectTable…
nablik
  • 153
  • 2
  • 12
2
votes
0 answers

EclipseLink doesn't create tables

I'm developing an application with eclipseLink and Spring. For now I'm using h2 like database. My trouble is that eclipseLink is not able to create tables. This is my configuration. Persistence.xml:
Skizzo
  • 2,883
  • 8
  • 52
  • 99
2
votes
1 answer

eclipselink JPA: combining @MappedSuperclass with @Cacheable

If I annotate a mapped superclass with @cachable(false), like so... @MappedSuperclass @Cacheable(false) public abstract class MySuperclass { ... } ... will all subclass entities be non-cacheable by default? I guess what I'm more generally asking…
Daniel Loiterton
  • 5,073
  • 5
  • 33
  • 46
2
votes
1 answer

JPQL count returning 0 when there is a row

I am using two identical JPQL NamedQueries, except that one is a COUNT. Here are the queries: select i from IssueRingReqsBrit i where i.ringDataRequest = 'I' and i.onRingIssue = 'Y' and i.noCardIssued = 0 select COUNT(i) from IssueRingReqsBrit i…
MasNotsram
  • 2,105
  • 18
  • 28
2
votes
1 answer

Creating a JPA Entity from a Map representing a database row

UPDATE While I will not delete this question, in case an answer gets provided that helps someone in the future, the project that this question is related to was abandoned for other reasons. Question Is it possible to create a instance of a JPA…
Scott Dennison
  • 425
  • 4
  • 13
2
votes
1 answer

JPA NullPointerException with Map

I have the following JPA map setup using EclipseLink 2.5.1 @Entity @Table(name = "ACCOUNTS") public class Account extends AbstractAggregateRoot { ... private AccountMetadata metadata = new…
shoop
  • 21
  • 3
2
votes
1 answer

Filtering out elements based on sub elements with XMLStreamReader and StreamFilter

I want to do something similar to XMLStreamReader example @BlaiseDoughan gave in his response to JAXB filtered parsing however I need to make the filtering decision based on sub elements not current node attributes. XMLStreamReader does not have a…
NBW
  • 1,467
  • 2
  • 18
  • 27
2
votes
1 answer

How do I solve EclipseLink's (MOXy) 'getting property "eclipselink.oxm.metadata-source" is not supported'?

I've got the following piece of code which I've put together mainly based on tutorials on EclipseLink's website: Partner p = new Partner(); p.setId(1); p.setKey("a"); p.setName("this is the name"); Map
sbrattla
  • 5,274
  • 3
  • 39
  • 63
2
votes
4 answers

Easiest way of programatically checking that a class has a valid JPA defintion

I'm working with many classes which are annotated with javax.persistence.Entity and the like. My project is about generating metadata about JPA-annotated classes rather than persistence by itself, so I'm using them as test cases. Rather than firing…
Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
2
votes
1 answer

SonarQube (Sonar) + EclipseLink: incorrect error 'Comparison of String parameter using == or !='

I have the following class, using EclipseLink JPA: package my.package; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import…
user969039
  • 511
  • 2
  • 7
  • 18
2
votes
2 answers

Sort child rows of each group in the desired order and take the desired number of top rows in each group in JPA

Is it possible to sort child rows of each group (child rows of each parent row) in the desired order and take the desired number of top rows in each group in JPA? For example, I have three tables in MySQL…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
3 answers

Generating Tables from entities - JPA

I want to gernerate a table in a Database. I use a non-embedded Derbry Database and glassfish4.0 + ecipse link. First I configured a new JDBC connectionpool with the glassfish admin-console. The URL ist…
Ohmen
  • 6,194
  • 3
  • 25
  • 35
2
votes
1 answer

Eclipselink UNION + SELECT NEW

I am using eclipselink 2.4.2. I have to do a query that uses a UNION and the SELECT NEW clause. My jpa query is like this: SELECT new com.*.*.MyObject(s.field1, s.field2, s.field3) FROM MyEntityBean1 s WHERE s.someField = :someField UNION SELECT…
alexb83
  • 191
  • 2
  • 8
2
votes
2 answers

How to store date-time in UTC into a database using EclipseLink and Joda-Time?

I have been fumbling with the following EclipseLink Joda-Time converter for a long time to store date-time in UTC into MySQL database with no success at all. import java.util.Date; import org.eclipse.persistence.mappings.DatabaseMapping; import…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
0 answers

EclipseLink New L2 Cache

How to create my own implementation of EclipseLink's L2 cache? My current issue is that I want to be able to use memcache/redis as a distributed cache, but currently I can't find any way of doing this. Most of the solutions I found is about cache…
Jan Michael Tan
  • 299
  • 3
  • 10