eclipselink

JPA EclipseLink entities not refreshing

半城伤御伤魂 提交于 2020-01-05 12:17:23
问题 I have a problem with entities not being refreshed when values in the database are changed from outside the JPA session. For instance, I have a user entity: @Entity @Cacheable(false) public class UserBean implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @OneToMany(mappedBy = "receiver") @JoinTable(name = "NOTIFICATIONS_RECEIVED") private List<NotificationBean> notificationsReceived; ... } And notifications entity: @Entity @Cacheable(false) public

Display parameters bound to query when fail happens

喜欢而已 提交于 2020-01-05 08:02:55
问题 Using Eclipselink with MySQL. When my entities are not validated properly and invalid data tries to leak into the database, the runtime exception is being thrown with following details: Caused by: org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.0.v20130815-a4708b6): org.eclipse.persistence.exceptions.DatabaseException Internal

JPA (EclipseLink) connection timeouts

岁酱吖の 提交于 2020-01-05 07:27:54
问题 I am using JPA 2.0 with EclipseLink, Glassfish, and NetBeans. I am experiencing issues with connection timeouts after extended periods of inactivity. I've looked pretty hard for ways to either: (1) Check for JPA's connection and then re-establish its connection if disconnected (2) Keep the JPA's connection active as much as possible However, I can't really find a solution for either. The closest thing I can find is this post: How To modify Eclipselink JPA 2.0 connection retry behavior . If

XmlPath mapping problems using eclipselink MOXy

别来无恙 提交于 2020-01-05 07:22:16
问题 I don't see why the XmlPath mappings I have made below are coming out as null. Is there something wrong with my syntax? I used similar syntax elsewhere without problem. Thanks for any clues.. John <clip lane="-1" offset="2591065664/720000s" name="Music" duration="22304160/240000s" start="176794/48000s" enabled="0" format="r5"> <adjust-volume amount="1dB"> <param name="amount"> <fadeIn type="easeIn" duration="1220/262144s"/> </param> </adjust-volume> <audio ref="r9" name="VoiceOver-26 - audio"

MOXy XMLCompositeCollectionMapping descriptor is missing

柔情痞子 提交于 2020-01-05 07:01:12
问题 docx4j (which I host) is typically used with the Sun/Oracle JAXB implementation; the classes of interest below were generated using XJC. I thought I'd try EclipseLink MOXy, to see how it went. On context init, I get the following error: ERROR org.docx4j.jaxb.Context .<clinit> line 107 - Cannot initialize context javax.xml.bind.JAXBException: Descriptor Exceptions: --------------------------------------------------------- Exception [EclipseLink-110] (Eclipse Persistence Services - 2.3.2

Does OpenJPA work with OSGi

给你一囗甜甜゛ 提交于 2020-01-05 03:51:09
问题 The software we work on is fully on OSGi. So we need JPA implementation which can WELL work with OSGI. Currently we use eclipselink (2.6.3)+eclipse gemini. The problem is that according to specs (jpa or osgi-ee ?) entities are not supported to be in different bundles. However, the developer of gemini said that he also doesn't understand this issue with specs and finds it strange that's why he allowed using entities from different bundles, although no special work was done. So eclipselink

JPA ERROR: relation does not exist

不羁岁月 提交于 2020-01-04 17:35:50
问题 I can't figure out what I'm doing wrong. I'm learning JPA mapping to a relational DB, by following some tutorials on the web, but can't find one that is straightforward. When I run my project, it gives me an error. I guess it's upon persisting em.persist(); . If I comment that line, all looks good, and no errors, but no data is written to table, obviously. Here's my code: persistence.xml (generated, untouched) <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http:/

JPA ERROR: relation does not exist

淺唱寂寞╮ 提交于 2020-01-04 17:34:43
问题 I can't figure out what I'm doing wrong. I'm learning JPA mapping to a relational DB, by following some tutorials on the web, but can't find one that is straightforward. When I run my project, it gives me an error. I guess it's upon persisting em.persist(); . If I comment that line, all looks good, and no errors, but no data is written to table, obviously. Here's my code: persistence.xml (generated, untouched) <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http:/

JPA ERROR: relation does not exist

三世轮回 提交于 2020-01-04 17:34:01
问题 I can't figure out what I'm doing wrong. I'm learning JPA mapping to a relational DB, by following some tutorials on the web, but can't find one that is straightforward. When I run my project, it gives me an error. I guess it's upon persisting em.persist(); . If I comment that line, all looks good, and no errors, but no data is written to table, obviously. Here's my code: persistence.xml (generated, untouched) <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http:/

JPA manytomany transient collection

半世苍凉 提交于 2020-01-04 16:25:28
问题 I would like to have a queriable collection in my entity that does not persist. In other words, a transient ManytoMany relationship. I have tried: @Transient @ManyToMany(fetch = FetchType.EAGER) @JoinTable(name="QuestionSetClass_Link", schema = "SVY", joinColumns={@JoinColumn(name="QuestionSetID", referencedColumnName="QuestionSetID")}, inverseJoinColumns={@JoinColumn(name="QuestionSetClassID", referencedColumnName="ID")}) private Collection<QuestionSetClass> questionSetClasses; public