eclipselink

jpa error uses a non-entity [class ch.printsoft.mailhouse.usermgr.entity.Department] as target entity in the relationship attribute

时光毁灭记忆、已成空白 提交于 2020-01-20 05:32:44
问题 I try to persist my Department and Mandator classes to hsqhldb but it gives this error. Exception Description: [class ch.printsoft.mailhouse.usermgr.entity.Mandator] uses a non-entity [class ch.printsoft.mailhouse.usermgr.entity.Department] as target entity in the relationship attribute [field departments]. at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126) at org.eclipse.persistence.jpa

EclipseLink - Error: Attempted to redeploy a session without closing it

早过忘川 提交于 2020-01-17 04:13:34
问题 I have a application running in AWS BeanStalk (Tomcat8 + SpringMVC + PostgreSQL + EclipseLink). The application is running ok but after some time running (2 hours) one error starting to happen: The intercepted error is: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28013] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse

joinTransaction has been called on a resource-local EntityManager in ApacheCamel

﹥>﹥吖頭↗ 提交于 2020-01-16 11:20:29
问题 I am new to apache camel and I am testing camel-jpa to poll from table and display records Following is main class EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("LoanServicePU"); CamelContext camelContext = new DefaultCamelContext(); JpaComponent jpa = new JpaComponent(); jpa.setEntityManagerFactory(entityManagerFactory); JpaTransactionManager myTM=new JpaTransactionManager(); myTM.setEntityManagerFactory(entityManagerFactory); jpa.setTransactionManager(

Dynamic JAXB support to convert XML to JSON

你离开我真会死。 提交于 2020-01-16 03:25:50
问题 I am using eclipse link(v2.5.0) Dynamic JAXB to convert XML to JSON and viceversa. customer.xsd <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="address" type="address"/> <xs:element name="customer" type="customer"/> <xs:complexType name="address"> <xs:sequence> <xs:element name="city" type="xs:string" minOccurs="0"/> <xs:element name="street" type="xs:string" minOccurs="0"/> <xs:element name="type"

Null pointer exception only on application startup org.eclipse.persistence.jaxb.JAXBMarshaller.marshal

荒凉一梦 提交于 2020-01-16 01:10:35
问题 I have a very strange problem. I am creating a JPA (Eclipselink) application, with a Jersey rest service, and an angularJS front end. When the application starts up, when I go to my angular page, I get a marshalling exception which seems to be caused by a null pointer somewhere. Press refresh in my browser, and the data comes back - no exceptions, and I am good to go from there on in. I am using @XMLInverseReference on a one to many join, and the way I have set the annotations is the only way

How an I get MOXy to just output on one line to save space

自闭症网瘾萝莉.ら 提交于 2020-01-15 19:16:31
问题 To solve another problem I have moved from using Jersey to EclipseLink MOXy to generate JSON from a JAXB created object model ( created by Sun JAXB 2.1.12). One difference I've noticed is the formatting of the output that Jersey outputs {"artist-list":{"offset":0,"count":1,"artist":[{"score":"100","type":"Group","id":"4302e264-1cf0-4d1f-aca7-2a6f89e34b36","name":"Farming Incident","sort-name":"Incident, Farming","gender":"male","country":"AF","disambiguation":"the real one","ipi-list":{"ipi":

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

不羁岁月 提交于 2020-01-15 12:44:17
问题 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 cutting killing inactive connections. Basically if a connection is inactive for a while a firewall the sits between the Tomcat server and the DB server kill it, with the result of leaving "stale" connections in the pool. The next time that connection

JPA 2 + EclipseLink : Caching Issue

只愿长相守 提交于 2020-01-15 10:57:19
问题 I have a strange behavior with caching and JPA Entities (EclipseLink 2.4.1 ) + GUICE PERSIST I will not use caching, nevertheless I get randomly an old instance that has already changed in MySQL database. I have tried the following: Add @ Cacheable (false) to the JPA Entity. Disable Cache properties in the persistence.xml file : <class>MyEntity</class> <shared-cache-mode>NONE</shared-cache-mode> <properties> <property name="eclipselink.cache.shared.default" value="false"/> <property name=

JPA 2 + EclipseLink : Caching Issue

拜拜、爱过 提交于 2020-01-15 10:57:05
问题 I have a strange behavior with caching and JPA Entities (EclipseLink 2.4.1 ) + GUICE PERSIST I will not use caching, nevertheless I get randomly an old instance that has already changed in MySQL database. I have tried the following: Add @ Cacheable (false) to the JPA Entity. Disable Cache properties in the persistence.xml file : <class>MyEntity</class> <shared-cache-mode>NONE</shared-cache-mode> <properties> <property name="eclipselink.cache.shared.default" value="false"/> <property name=

Show generated SQL in toplink in eclipse

强颜欢笑 提交于 2020-01-15 06:56:06
问题 I am using EclipseLink libraries in eclipse (at dev time) and deploy on TopLink, I need to show the generated sql statement. I am using the following persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="myPUnit"