java.lang.IllegalArgumentException: No [EntityType] was found for the key class [] in the Metamodel - please verify that the [Entity] class was referenced in persistence.xml using a specific <class> </class> property or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element.
at org.eclipse.persistence.internal.jpa.metamodel.MetamodelImpl.entityEmbeddableManagedTypeNotFound(MetamodelImpl.java:173)
Entity class:
@Entity
@Table(name="temp_param")
public class ParamConfiguration implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "param_group")
private String paramGroup;
public String getParamGroup() {
return paramGroup;
}
public void setParamGroup(String paramGroup) {
this.paramGroup = paramGroup;
}
DAO code:
CriteriaQuery<ParamConfiguration> cq = entityManager
.getCriteriaBuilder()
.createQuery(ParamConfiguration.class);
final Root<ParamConfiguration> ac = cq.from(ParamConfiguration.class);
cq.select(ac);
TypedQuery<ParamConfiguration> tq=entityManager.createQuery(cq);
List<ParamConfiguration> AClist=tq.getResultList();
persistance xml:
<persistence-unit name="serCoupons_Cdm" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<non-jta-data-source>java:/comp/env/jdbc/CDM</non-jta-data-source>
<class>net.odcorp.sas.mrm.beans.AffinityConfiguration</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
Can anyone help me on this.... Is the @entity class must have all the columns in the DB table.
FYI im using Teradata as DB, Spring, JPA, JSF.