Hi:
I have a working application on v7.2.11 and Intellij 2020.3.2. I am trying to use the JPA Console to test a query. The error message I am getting is:
pa-ql> select count(e.id) from rade$Item e
[2021-02-25 10:04:23] Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.7.3.14-cuba): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
[2021-02-25 10:04:23] Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@42a57993
[2021-02-25 10:04:23] Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.3.14-cuba): org.eclipse.persistence.exceptions.EntityManagerSetupException
[2021-02-25 10:04:23] Exception Description: Predeployment of PersistenceUnit [rade] failed.
[2021-02-25 10:04:23] Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.7.3.14-cuba): org.eclipse.persistence.exceptions.ValidationException
[2021-02-25 10:04:23] Exception Description: [class com.paslists.rade.entity.Offer] uses a non-entity [class com.haulmont.cuba.core.entity.FileDescriptor] as target entity in the relationship attribute [field thumbnail].
[2021-02-25 10:04:23] javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.7.3.14-cuba): org.eclipse.persistence.exceptions.EntityManagerSetupException
[2021-02-25 10:04:23] Exception Description: Predeployment of PersistenceUnit [rade] failed.
[2021-02-25 10:04:23] Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.7.3.14-cuba): org.eclipse.persistence.exceptions.ValidationException
Here is a screenshot of my Persistence screen, showing that the entity is listed in the context:
The entity making the reference looks like this:
/*
* (C) 2017 Professional Advertising Systems Inc.
*/
package com.paslists.rade.entity;
import com.haulmont.chile.core.annotations.MetaProperty;
import com.haulmont.chile.core.annotations.NamePattern;
import com.haulmont.cuba.core.entity.BaseLongIdEntity;
import com.haulmont.cuba.core.entity.FileDescriptor;
import com.haulmont.cuba.core.entity.annotation.Lookup;
import com.haulmont.cuba.core.entity.annotation.LookupType;
import com.haulmont.cuba.core.global.DesignSupport;
import java.math.BigDecimal;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;
@NamePattern("%s|offercode")
@DesignSupport("{'imported':true,'generateDdl':false}")
@Table(name = "OFFERS")
@Entity(name = "rade$Offer")
public class Offer extends BaseLongIdEntity {
private static final long serialVersionUID = -6690090930591828106L;
@Column(name = "OFFERCODE", length = 20)
private String offercode;
.... other fields removed ...
@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "thumbnail")
protected FileDescriptor thumbnail;
public void setThumbnail(FileDescriptor thumbnail) {
this.thumbnail = thumbnail;
}
public FileDescriptor getThumbnail() {
return thumbnail;
}
... other getters/setters removed ...
}
Any idea how I can get this to work in the JPA Console?