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

Partial mapping of XML in JAXB (MOXy)

I would like to unmarshall only the trk and its child elements from the below XML. However, I want to create gpx as the root element while marshalling
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
2
votes
1 answer

Accessing multiple tables

I am learning EJB,JPA and have very basic doubt I have 3 Tables A,B,C A - ID, Name B - ID, Name C - ID, A_ID, B_ID When i create a Entity Class from Database, i get 3 EJB classes with JPA stuff. Now in my Managed bean i get either A.Name or B.Name…
user1433804
  • 657
  • 5
  • 17
  • 31
2
votes
2 answers

JPA and SYS_REFCURSOR like OUT parameter

I want to call a procedure using JPA with SYS_REFCURSOR like OUT parameter. This is very easy using plain JDBC but I'm not sure that is possible in JPA. My procedure is like following: CREATE OR REPLACE FUNCTION FN_GET_COINS RETURN…
Paul Vargas
  • 41,222
  • 15
  • 102
  • 148
2
votes
1 answer

Create Foreign key ON UPDATE CASCADE in JPA (eclipselink)

I am using CascadeType.MERGE but the generated sql does not contain any ON UPDATE in the foreign key. Here is my code @Entity public class Address { @Id private int id; private String address; } @Entity public class Employee { @Id …
Srinivas
  • 390
  • 2
  • 11
2
votes
2 answers

JAXB (Moxy) XML Metadata mapping issue

I am trying to map the below interface using Moxy's XML Metadata extension. But when I try to load it, I am getting the below error. I can't add a public constructor to the AddressType as it is an enum. My question is: Why is Moxy impl looking at…
Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
2
votes
0 answers

eclipselink and postresql large objects on Glasshfish

I have a trouble whit eclipselink and postresql I use Glassfish 3.1.2 and his eclipselink for connect to a postgresql database with persistence, in my table I have an postresql large object file that in my entity is convert into bytearray with @lob…
max
  • 21
  • 3
2
votes
0 answers

Maven eclipselink metamodel doesn't generated after clean

My project is configured to use Eclipselink, build tool is Maven. I need to use JPA2 metamodel inside my code, so my pom.xml contains related configuration: org.bsc.maven
user641652
  • 65
  • 1
  • 7
2
votes
2 answers

How to force JPA(eclipselink) to use joins instead of independent queries?

I'm using JPA 2 in my project (eclipselink provider), and I have the following problem: When I execute the following code: em.createQuery("select t from " + entityName + " t where t.id = ?1" ).setParameter(1, id) .setHint(QueryHints.REFRESH,…
Kerb
  • 1,138
  • 2
  • 20
  • 39
2
votes
2 answers

How to create webservice function that return xml as well as json?

I have created a web service function: @GET @Path("getusers/") @Produces({"application/xml","application/json"}) public Object getUsers() { String distanceQuery="SELECT UGL.user_id,UP.fname,UGL.mlatitude,UGL.mlogitude,UGL.mlogitude from…
user1522804
  • 149
  • 2
  • 11
2
votes
0 answers

NamedQuery returns nothing

I have written a namedQuery in my Entity class as @NamedQuery(name="Place.findByPlaceCode", query="select p from Place p where p.Code = :placeCode") I execute the named query with the following : List result = getEntityManager() …
MindBrain
  • 7,398
  • 11
  • 54
  • 74
2
votes
1 answer

How do I persist Map with map semantics in JPA2

I have the following model: An entity of type A has an association to many pairs of entities of types (B, C). Each B entity appears in at most one pair in A, but the same C entity can show in multiple pairs. For example: A1 --> (B1, C1) --> (B2,…
2
votes
2 answers

Abstraction layer for table partitioning - JPA

Facts Database: PostgreSQL (latest) Programming language: Java Problem statement (simplified) We have 2 tables - overview and details. There could be millions of rows in "overview" and each row of "overview" can have millions of rows associated…
2
votes
1 answer

EclipseLink MOXy - How to avoid keeping jaxb.index and jaxb.properties file in Model classes package?

I am using EclipseLink external mapping file to marshal Java objects to XML and JSON. Since my model classes are defined in different projects where i don't have access to add/modify any file or classes. So how can i avoid keeping jaxb.index and…
Navin
  • 31
  • 2
2
votes
1 answer

How to use Apache-Commons DBCP with EclipseLink JPA and Tomcat 7.x

I've been working on a web application, deployed on Tomcat 7, which use EclipseLink JPA to handle the persistence layer. Everything works fine in a test environment but we're having serious issues in the production environment due to a firewall…
elbuild
  • 4,869
  • 4
  • 24
  • 31
2
votes
1 answer

MongoDB Persistence via EclipseLink NoSql JBoss AS 7.1.1.Final

I am trying to use EclipseLink NoSql Persistence for MongoDB in JBoss AS 7.1.1.Final. I am trying to use the EntityManager like: EntityManager em = Persistence.createEntityManagerFactory("mongo") .createEntityManager(); Model m…
Bob B
  • 4,484
  • 3
  • 24
  • 32