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

Postgresql: Cannot insert to path field using EclipseLink

I have a java app running in JBoss that uses EclipseLink to persist to a Postgres database. I've added a field with a 'path' datatype to one of the tables but I keep getting exceptions when I try to insert data. Here's the table definition: CREATE…
El Goodo
  • 284
  • 1
  • 4
  • 14
2
votes
2 answers

How to cascade persist if object not in database, otherwise merge?

@Entity public class Auction{ @ManyToOne(cascade=CascadeType.MERGE) private Member seller; @OneToOne(cascade=CascadeType.PERSIST) private Question question; } @Entity public class Member{ } @Entity public class Question{ …
Tim
  • 514
  • 8
  • 17
2
votes
1 answer

JPA Eclipselink Database Change Notification does not invalidate cache entry

I have two Java 1.7 applications using Eclipselink 2.4.2 for persistence. One application is a JEE application running in Glassfish 3.1.2.2 and the other is a Java SE application. These applications read and write the same data, so there is the…
Jeff
  • 227
  • 4
  • 17
2
votes
1 answer

How to interact with Tables using EclipseLink without using Entity classes?

I don't have Entity classes in my project. My requirement is When I am connecting to DataBase Based on schema I have to Get the all Tables names from that schema. Here I have a Schema as "companydb" with 5 tables. Below is my code to retrieve total…
user3117840
2
votes
2 answers

JPA Criteria JOIN et ON

I have been searching for a while, I haven't found any responses to my problem. I am making an application in JSF, EclipseLink, Glassfish in which the user can have one or more groups. The application contains modules and permissions as…
Archi
  • 35
  • 6
2
votes
0 answers

Best Practices for Building Where-In Clause in EclipseLink 1.1

I'm on a project using EclipseLink 1.1, and I have a query where the obvious thing for me to do is use a Where-In clause, like so: List things = populateListOfThings(); String queryString = " select s from Stuff s where s.thing…
BlairHippo
  • 9,502
  • 10
  • 54
  • 78
2
votes
1 answer

Using @FetchGroup with eclipseLink

I have tried to get source running as explained in http://eclipse.org/eclipselink/documentation/2.4/jpa/extensions/a_fetchgroup.htm @FetchGroup(name="names", attributes={ @FetchAttribute(name="firstName"), …
2
votes
0 answers

stream handler to @lob field in jpa entity

Is there posibility to get buffered stream directly from db CLOB data mapped in JPA by String field annotted by @Lob. I want to read field line by line without getting all field to my service. I'am using: BufferedReader reader = new…
bmlynarczyk
  • 808
  • 10
  • 19
2
votes
4 answers

How to write Data into XML file using JAXB?

I am using eclipse-link, and I am retrieving data from table and trying to store the retrieved data into XML file using JAXB. While writing into XML file last record only saved in that file. Here User is My POJO class have Two…
Prabha
  • 707
  • 2
  • 11
  • 27
2
votes
1 answer

JPA eclipselink: Error while commit: Transaction rolled back because transaction was set to RollbackOnly

I am pretty new to JPA and using eclipselink as JPA engine in my Struts 2 project. I am having problems while committing my records as it throws an exception: javax.persistence.RollbackException: Transaction rolled back because transaction was set…
Prakhar Mishra
  • 1,586
  • 4
  • 28
  • 52
2
votes
1 answer

Any way to marshal @XmlElement List fieldName to instead of an absent node?

I'm trying to get MOXy or JAXB RI to marshal null collections to an xsi:nil element like so: The use case is: Axis2 SOAP endpoint I have no control of I'm on the client…
Christian
  • 23
  • 2
2
votes
4 answers

JPA, Eclipselink, MySQL. How do you query for null?

So in MySQL, NULL != NULL. So if you write a query like the following: SELECT id, city, last_updated, street_address, zipcode, state_id FROM addresses WHERE street_address = null You will get 0 rows, even if you have a column where street_address…
Jonathan S. Fisher
  • 8,189
  • 6
  • 46
  • 84
2
votes
0 answers

Lookup failed for 'java:comp/BeanManager' when deploying to Glassfish 4

I already made some research on Google and SO but could not find a solution. I am writing a java ee 7 Web application including Omnifaces and Primefaces using Eclipse. When deploying the application to Glassfish 4, I get the following…
th_eg
  • 21
  • 5
2
votes
1 answer

Entitymanager works chaotically, do not merge in some cases

Seriously, i cannot believe this: I use entityManager in Vaadin framework. Implemented this pattern (ThreadLocal and filter for generating entityManager for every request): https://vaadin.com/book/-/page/jpacontainer.hibernate.html If i write a…
czupe
  • 4,740
  • 7
  • 34
  • 52
2
votes
2 answers

JPA Entity is not updated

I am using Servlet->EJB->JPA on Glassfish 4. Application deploys successfully. When I run the servlet, it updates the entity with id=1 in db, but doesn't do anything for the one with id=2. No exception is thrown. @WebServlet("/AnimalServlet") public…
Half Diminished
  • 193
  • 1
  • 11