Announcement Announcement Module
No announcement yet.
PropertyNotFoundException: couldnt find setter, it has Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • PropertyNotFoundException: couldnt find setter, it has

    Iam getting this error. Help needed

    net.sf.hibernate.PropertyNotFoundException: Could not find a setter for property cFindtSequenceNumber in class com.dataaccess.bean.ClaimFinancialDetailPaymentDat aBeanPK

    I do have a setter/getter for the property in the PK file

    public Integer getCFindtSequenceNumber() {
    return cFindtSequenceNumber;
    public void setCFindtSequenceNumber(Integer cFindtSequenceNumber) {
    this.cFindtSequenceNumber = cFindtSequenceNumber;

    Mapping ref is
    <property name="mappingResources">

    Mapping file is
    <hibernate-mapping package="com.dataaccess.bean">

    <class name="ClaimFinancialDetailPaymentDataBean" table="ABC">

    class="com.dataaccess.bean.ClaimFinancialDetailPay mentDataBeanPK" >

    <key-property name="ptnKey" column="FK_CCLAIM_PTN_KEY" type="java.lang.Integer"/>
    <key-property name="claimNumber" column="FK_CCLAIM_ID_NUM" type="java.lang.String" length="11"/>
    <key-property name="cFindtSequenceNumber" column="FK_CFINDT_SEQ_NUM" type="java.lang.Integer"/>
    <key-property name="sequenceNumber" column="SEQUENCE_NUMBER" type="java.lang.Integer"/>


    Will be greatful if it can be solved

  • #2
    Hi friends I got the solution to this problem but still I do not know the reason

    I just changed the case from cFindtSequenceNumber to cfindtSequenceNumber and accordingly all the getter and setter and all mapping file, and surprisingly it worked for me.


    • #3
      I believe the spec for getters and setters is that if the first 'word' of a property name is one character in length - i.e. the second character is capitalised - then first character is not capitalised in the getter/setter name.

      So in the case of cFindtSequenceNumber,
      they would be getcFindtSequenceNumber() and setcFindtSequenceNumber().

      Certainly that's what IDEA auto-generates.