Home » Eclipse Projects » EclipseLink » uses a non-entity as target entity in the relationship attribute
uses a non-entity as target entity in the relationship attribute [message #707859] |
Tue, 02 August 2011 06:34 |
Missing name Mising name Messages: 12 Registered: July 2011 |
Junior Member |
|
|
I am getting the following exception, which just started happening and I'm not sure of the problem:
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [XXXcmsPU] failed.
Internal Exception: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [class com.XXX.data.Wwwwebsites] uses a non-entity [class com.XXX.data.WWWWebsitesCategories] as target entity in the relationship attribute [field categorytypeid].
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:136)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:65)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
This is the WWWWEBSITES class
@Entity
@Table(name = "WWWWEBSITES")
@NamedQueries(
{
@NamedQuery(name = "Wwwwebsites.findAll", query = "SELECT w FROM Wwwwebsites w"),
@NamedQuery(name = "Wwwwebsites.findBySiteownerid", query = "SELECT w FROM Wwwwebsites w WHERE w.siteownerid = :siteownerid"),
@NamedQuery(name = "Wwwwebsites.findByWebsitetradingname", query = "SELECT w FROM Wwwwebsites w WHERE w.websitetradingname = :websitetradingname"),
@NamedQuery(name = "Wwwwebsites.findByWebsiteprefereddomainname", query = "SELECT w FROM Wwwwebsites w WHERE w.websiteprefereddomainname = :websiteprefereddomainname"),
@NamedQuery(name = "Wwwwebsites.findByMetakeywords", query = "SELECT w FROM Wwwwebsites w WHERE w.metakeywords = :metakeywords"),
@NamedQuery(name = "Wwwwebsites.findByMetadescription", query = "SELECT w FROM Wwwwebsites w WHERE w.metadescription = :metadescription"),
@NamedQuery(name = "Wwwwebsites.findByAnalyticssiteid", query = "SELECT w FROM Wwwwebsites w WHERE w.analyticssiteid = :analyticssiteid"),
@NamedQuery(name = "Wwwwebsites.findByCarsalesdealerid", query = "SELECT w FROM Wwwwebsites w WHERE w.carsalesdealerid = :carsalesdealerid"),
@NamedQuery(name = "Wwwwebsites.findByWebsitetypeid", query = "SELECT w FROM Wwwwebsites w WHERE w.websitetypeid = :websitetypeid"),
@NamedQuery(name = "Wwwwebsites.findByPermitdeeplinking", query = "SELECT w FROM Wwwwebsites w WHERE w.permitdeeplinking = :permitdeeplinking"),
@NamedQuery(name = "Wwwwebsites.findByWebsitestatus", query = "SELECT w FROM Wwwwebsites w WHERE w.websitestatus = :websitestatus"),
@NamedQuery(name = "Wwwwebsites.findByWebsitestatuschangedate", query = "SELECT w FROM Wwwwebsites w WHERE w.websitestatuschangedate = :websitestatuschangedate"),
@NamedQuery(name = "Wwwwebsites.findByWebsiteupdatedtimestamp", query = "SELECT w FROM Wwwwebsites w WHERE w.websiteupdatedtimestamp = :websiteupdatedtimestamp"),
@NamedQuery(name = "Wwwwebsites.findByWebsiteprefereddomainnameandcountryid", query = "SELECT w FROM Wwwwebsites w WHERE w.websiteprefereddomainname = :websiteprefereddomainname AND w.countryid.sitecountryid = :sitecountryid"),
@NamedQuery(name = "Wwwwebsites.findByHomefolder", query = "SELECT w FROM Wwwwebsites w WHERE w.websitehomefolder = :websitehomefolder"),
@NamedQuery(name = "Wwwwebsites.findByDealerid", query = "SELECT w FROM Wwwwebsites w WHERE w.dealerid = :dealerid")
}
)
public class Wwwwebsites implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "Site_owner_id")
private Integer siteownerid;
@Column(name = "Website_trading_name")
private String websitetradingname;
@Column(name = "Website_prefered_domain_name")
private String websiteprefereddomainname;
@Column(name = "Meta_keywords")
private String metakeywords;
@Column(name = "Website_homefolder")
private String websitehomefolder;
@Column(name = "DealerID")
private String dealerid;
@Column(name = "Meta_description")
private String metadescription;
@Column(name = "Analytics_site_id")
private String analyticssiteid;
@Column(name = "Carsales_dealer_id")
private String carsalesdealerid;
@Column(name = "Website_type_id")
private Integer websitetypeid;
@Column(name = "Permit_deep_linking")
private Integer permitdeeplinking;
@Lob
@Column(name = "Notes")
private String notes;
@Column(name = "Website_status")
private Integer websitestatus;
@Column(name = "Website_status_change_date")
@Temporal(TemporalType.TIMESTAMP)
private Date websitestatuschangedate;
@Column(name = "Website_updated_time_stamp")
@Temporal(TemporalType.TIMESTAMP)
private Date websiteupdatedtimestamp;
@OneToMany(mappedBy = "siteownerid")
private List<WWWWebsitesDomainNames> wWWWebsitesDomainNamesCollection;
@JoinColumn(name = "Country_id", referencedColumnName = "Site_country_id")
@ManyToOne
private WWWWebsitesCountryType countryid;
@OneToMany(cascade = CascadeType.ALL, mappedBy = "wwwwebsites")
private List<WWWWebsitesLocationSequence> wWWWebsitesLocationSequenceCollection;
@OneToMany(mappedBy = "siteownerid")
private List<WWWWebsitesLogin> wWWWebsitesLoginCollection;
@JoinColumn(name = "Category_type_id", referencedColumnName = "Category_type_id")
@ManyToOne
private WWWWebsitesCategories categorytypeid;
public Wwwwebsites() {
}
public Wwwwebsites(Integer siteownerid) {
this.siteownerid = siteownerid;
}
public Integer getSiteownerid() {
return siteownerid;
}
public void setSiteownerid(Integer siteownerid) {
this.siteownerid = siteownerid;
}
public String getWebsitetradingname() {
return websitetradingname;
}
public void setWebsitetradingname(String websitetradingname) {
this.websitetradingname = websitetradingname;
}
public String getWebsiteprefereddomainname() {
return websiteprefereddomainname;
}
public void setWebsiteprefereddomainname(String websiteprefereddomainname) {
this.websiteprefereddomainname = websiteprefereddomainname;
}
public String getMetakeywords() {
return metakeywords;
}
public void setMetakeywords(String metakeywords) {
this.metakeywords = metakeywords;
}
public String getWebsitehomefolder() {
return websitehomefolder;
}
public void setWebsitehomefolder(String hot) {
this.websitehomefolder = hot;
}
public String getDealerID() {
return dealerid;
}
public void setDealerID(String hot) {
this.dealerid = hot;
}
public String getMetadescription() {
return metadescription;
}
public void setMetadescription(String metadescription) {
this.metadescription = metadescription;
}
public String getAnalyticssiteid() {
return analyticssiteid;
}
public void setAnalyticssiteid(String analyticssiteid) {
this.analyticssiteid = analyticssiteid;
}
public String getCarsalesdealerid() {
return carsalesdealerid;
}
public void setCarsalesdealerid(String carsalesdealerid) {
this.carsalesdealerid = carsalesdealerid;
}
public Integer getWebsitetypeid() {
return websitetypeid;
}
public void setWebsitetypeid(Integer websitetypeid) {
this.websitetypeid = websitetypeid;
}
public Integer getPermitdeeplinking() {
return permitdeeplinking;
}
public void setPermitdeeplinking(Integer permitdeeplinking) {
this.permitdeeplinking = permitdeeplinking;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public Integer getWebsitestatus() {
return websitestatus;
}
public void setWebsitestatus(Integer websitestatus) {
this.websitestatus = websitestatus;
}
public Date getWebsitestatuschangedate() {
return websitestatuschangedate;
}
public void setWebsitestatuschangedate(Date websitestatuschangedate) {
this.websitestatuschangedate = websitestatuschangedate;
}
public Date getWebsiteupdatedtimestamp() {
return websiteupdatedtimestamp;
}
public void setWebsiteupdatedtimestamp(Date websiteupdatedtimestamp) {
this.websiteupdatedtimestamp = websiteupdatedtimestamp;
}
public List<WWWWebsitesDomainNames> getWWWWebsitesDomainNamesCollection() {
return wWWWebsitesDomainNamesCollection;
}
public void setWWWWebsitesDomainNamesCollection(List<WWWWebsitesDomainNames> wWWWebsitesDomainNamesCollection) {
this.wWWWebsitesDomainNamesCollection = wWWWebsitesDomainNamesCollection;
}
public WWWWebsitesCountryType getCountryid() {
return countryid;
}
public void setCountryid(WWWWebsitesCountryType countryid) {
this.countryid = countryid;
}
public List<WWWWebsitesLocationSequence> getWWWWebsitesLocationSequenceCollection() {
return wWWWebsitesLocationSequenceCollection;
}
public void setWWWWebsitesLocationSequenceCollection(List<WWWWebsitesLocationSequence> wWWWebsitesLocationSequenceCollection) {
this.wWWWebsitesLocationSequenceCollection = wWWWebsitesLocationSequenceCollection;
}
public List<WWWWebsitesLogin> getWWWWebsitesLoginCollection() {
return wWWWebsitesLoginCollection;
}
public void setWWWWebsitesLoginCollection(List<WWWWebsitesLogin> wWWWebsitesLoginCollection) {
this.wWWWebsitesLoginCollection = wWWWebsitesLoginCollection;
}
public WWWWebsitesCategories getCategorytypeid() {
return categorytypeid;
}
public void setCategorytypeid(WWWWebsitesCategories categorytypeid) {
this.categorytypeid = categorytypeid;
}
@Override
public int hashCode() {
int hash = 0;
hash += (siteownerid != null ? siteownerid.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Wwwwebsites)) {
return false;
}
Wwwwebsites other = (Wwwwebsites) object;
if ((this.siteownerid == null && other.siteownerid != null) || (this.siteownerid != null && !this.siteownerid.equals(other.siteownerid))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.XXX.data.Wwwwebsites[siteownerid=" + siteownerid + "]";
}
}
This is the WWWWebsitesCategories class:
@Entity
@Table(name = "WWWWebsites_Categories")
@NamedQueries({@NamedQuery(name = "WWWWebsitesCategories.findAll", query = "SELECT w FROM WWWWebsitesCategories w"), @NamedQuery(name = "WWWWebsitesCategories.findByCategorytypeid", query = "SELECT w FROM WWWWebsitesCategories w WHERE w.categorytypeid = :categorytypeid"), @NamedQuery(name = "WWWWebsitesCategories.findByCategorytypename", query = "SELECT w FROM WWWWebsitesCategories w WHERE w.categorytypename = :categorytypename"), @NamedQuery(name = "WWWWebsitesCategories.findByCategorytypestatus", query = "SELECT w FROM WWWWebsitesCategories w WHERE w.categorytypestatus = :categorytypestatus")})
public class WWWWebsitesCategories implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(name = "Category_type_id")
private Integer categorytypeid;
@Column(name = "Category_type_name")
private String categorytypename;
@Column(name = "Category_type_status")
private Integer categorytypestatus;
@OneToMany(mappedBy = "categorytypeid")
private List<Wwwwebsites> wwwwebsitesList;
public WWWWebsitesCategories() {
}
public WWWWebsitesCategories(Integer categorytypeid) {
this.categorytypeid = categorytypeid;
}
public Integer getCategorytypeid() {
return categorytypeid;
}
public void setCategorytypeid(Integer categorytypeid) {
this.categorytypeid = categorytypeid;
}
public String getCategorytypename() {
return categorytypename;
}
public void setCategorytypename(String categorytypename) {
this.categorytypename = categorytypename;
}
public Integer getCategorytypestatus() {
return categorytypestatus;
}
public void setCategorytypestatus(Integer categorytypestatus) {
this.categorytypestatus = categorytypestatus;
}
public List<Wwwwebsites> getWwwwebsitesList() {
return wwwwebsitesList;
}
public void setWwwwebsitesList(List<Wwwwebsites> wwwwebsitesList) {
this.wwwwebsitesList = wwwwebsitesList;
}
@Override
public int hashCode() {
int hash = 0;
hash += (categorytypeid != null ? categorytypeid.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof WWWWebsitesCategories)) {
return false;
}
WWWWebsitesCategories other = (WWWWebsitesCategories) object;
if ((this.categorytypeid == null && other.categorytypeid != null) || (this.categorytypeid != null && !this.categorytypeid.equals(other.categorytypeid))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.XXX.data.WWWWebsitesCategories[categorytypeid=" + categorytypeid + "]";
}
}
What have I done wrong?
|
|
| | | | | |
Goto Forum:
Current Time: Thu Apr 25 03:53:13 GMT 2024
Powered by FUDForum. Page generated in 0.03557 seconds
|