-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: net.sf.hibernate.PropertyNotFoundException
PostPosted: Thu Aug 17, 2006 1:40 am 
Newbie

Joined: Fri Aug 04, 2006 5:54 am
Posts: 6
Hi,

I am getting the following error:

net.sf.hibernate.PropertyNotFoundException: Could not find a getter for deleteInd in class .......

when the page is being loaded. I have defined the property "deleteInd" in the .hbm.xml file as well as added set()/get() methods for the same. Please advise as to what could be the cause of the error.

Given below are the necessary details:

Hibernate version: 2.0

Mapping documents:
MtUuidLink.hbm.xml
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class name="sg.gov.ciris.entity.MtUuidLink" table="MT_UUID_LINK">
<id
name="linkedUuid"
type="java.lang.Long"
column="LINKED_UUID"
>
<generator class="assigned" />
</id>
<version name="version" column="VERSION" type="java.lang.Long"/>
<property
name="activeUuid"
type="java.lang.Long"
column="ACTIVE_UUID"
not-null="true"
length="14"
/>
<property
name="activeId"
type="java.lang.String"
column="ACTIVE_ID"
not-null="true"
length="9"
/>
<property
name="linkedId"
type="java.lang.String"
column="LINKED_ID"
not-null="true"
length="9"
/>
<property
name="deptCd"
type="java.lang.String"
column="DEPT_CD"
length="7"
/>
<property
name="linkedTy"
type="java.lang.String"
column="LINKED_TY"
not-null="true"
length="1"
/>
<property
name="createBy"
type="java.lang.String"
column="CREATE_BY"
insert="true"
update="false"
not-null="true"
length="9"
/>
<property
name="createDt"
type="java.sql.Timestamp"
column="CREATE_DT"
insert="false"
update="false"
not-null="true"
length="7"
/>
<property
name="updBy"
type="java.lang.String"
column="UPD_BY"
insert="true"
update="true"
not-null="true"
length="9"
/>
<property
name="lastTimestp"
type="java.sql.Timestamp"
column="LAST_TIMESTP"
not-null="true"
insert="false"
update="true"
length="11"
/>
<property
name="deleteInd"
type="java.lang.String"
column="DELETE_IND"
insert="false"
update="true"
not-null="true"
length="1"
/>

<!-- Associations -->
</class>
</hibernate-mapping>

My entity class is defined as follows:
public class MtUuidLink implements Serializable {

/** identifier field */
private Long linkedUuid;


/** persistent field */
private Long activeUuid;


/** persistent field */
private String activeId;


/** persistent field */
private String linkedId;


/** nullable persistent field */
private String deptCd;


/** persistent field */
private String linkedTy;


/** persistent field */
private String createBy;


/** persistent field */
private Date createDt;


/** persistent field */
private String updBy;


/** persistent field */
private Date lastTimestp;


/** persistent field */
private Long version;

/** persistent field */
private String deleteInd;

/** persistent field */
private String reqName;

/** full constructor */
public MtUuidLink(Long linkedUuid, Long activeUuid, String activeId,
String linkedId, String deptCd, String linkedTy,
String createBy, Date createDt, String updBy,
Date lastTimestp, String deleteInd) {
this.linkedUuid = linkedUuid;
this.activeUuid = activeUuid;
this.activeId = activeId;
this.linkedId = linkedId;
this.deptCd = deptCd;
this.linkedTy = linkedTy;
this.createBy = createBy;
this.createDt = createDt;
this.updBy = updBy;
this.lastTimestp = lastTimestp;
this.deleteInd = deleteInd;
}


/** default constructor */
public MtUuidLink() {
}


/** minimal constructor */
public MtUuidLink(Long linkedUuid, Long activeUuid, String activeId,
String linkedId, String linkedTy, String createBy,
Date createDt, String updBy, Date lastTimestp) {
this.linkedUuid = linkedUuid;
this.activeUuid = activeUuid;
this.activeId = activeId;
this.linkedId = linkedId;
this.linkedTy = linkedTy;
this.createBy = createBy;
this.createDt = createDt;
this.updBy = updBy;
this.lastTimestp = lastTimestp;
}

public Long getLinkedUuid() {
return this.linkedUuid;
}

public void setLinkedUuid(Long linkedUuid) {
this.linkedUuid = linkedUuid;
}

public Long getActiveUuid() {
return this.activeUuid;
}

public void setActiveUuid(Long activeUuid) {
this.activeUuid = activeUuid;
}

public String getActiveId() {
return this.activeId;
}

public void setActiveId(String activeId) {
this.activeId = activeId;
}

public String getLinkedId() {
return this.linkedId;
}

public void setLinkedId(String linkedId) {
this.linkedId = linkedId;
}

public String getDeptCd() {
return this.deptCd;
}

public void setDeptCd(String deptCd) {
this.deptCd = deptCd;
}

public String getLinkedTy() {
return this.linkedTy;
}

public void setLinkedTy(String linkedTy) {
this.linkedTy = linkedTy;
}

public String getCreateBy() {
return this.createBy;
}

public void setCreateBy(String createBy) {
this.createBy = createBy;
}

public Date getCreateDt() {
return this.createDt;
}

public void setCreateDt(Date createDt) {
this.createDt = createDt;
}

public String getUpdBy() {
return this.updBy;
}

public void setUpdBy(String updBy) {
this.updBy = updBy;
}

public Date getLastTimestp() {
return this.lastTimestp;
}

public void setLastTimestp(Date lastTimestp) {
this.lastTimestp = lastTimestp;
}

public Long getVersion() {
return version;
}

public void setVersion(Long version) {
this.version = version;
}

public String toString() {
return new ToStringBuilder(this)
.append("linkedUuid", getLinkedUuid())
.toString();
}

public void setDeleteInd(String deleteInd)
{
this.deleteInd = deleteInd;
}

public String getDeleteInd()
{
return this.deleteInd;
}
}


Full stack trace of the Exception that occurs:
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for deleteInd in class sg.gov.ciris.entity.MtUuidLink
at net.sf.hibernate.property.BasicPropertyAccessor.getGetter(BasicPropertyAccessor.java:182)
at net.sf.hibernate.mapping.Property.getGetter(Property.java:175)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:749)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:690)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:805)
at com.mp.dao.db.DbDaoFactory.init(DbDaoFactory.java:82)
at com.mp.dao.db.DbDaoFactory.<init>(DbDaoFactory.java:53)
at com.mp.dao.DaoFactory.getInstance(DaoFactory.java:49)
at sg.gov.ciris.idm.MtMgrBean.getRequestingDept(MtMgrBean.java:2747)
at sg.gov.ciris.idm.MtMgr_lpphm8_ELOImpl.getRequestingDept(MtMgr_lpphm8_ELOImpl.java:740)
at sg.gov.ciris.idm.delegate.MtDelegate.getRequestingDept(MtDelegate.java:1287)
at idm.unlinkFin.UnlinkFinController.getRequestingDeptList(UnlinkFinController.jpf:245)
at idm.unlinkFin.UnlinkFinController.begin(UnlinkFinController.jpf:124)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1507)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1433)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:764)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:594)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:328)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.java:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

Name and version of the database you are using:
Oracle 9


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 2:15 am 
Beginner
Beginner

Joined: Thu Jun 09, 2005 3:18 am
Posts: 34
Location: India
If you have any records in database check the value of deleteInd in the database.

Check with remove all records in the database if any.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 17, 2006 2:49 am 
Newbie

Joined: Fri Aug 04, 2006 5:54 am
Posts: 6
Yes, I do have records in the database. And the value for this field is by default 'N' if no value is inserted.

So do you mean that I need to delete all the values currently in the database since this may not be possible as this not anullable field.

Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.