Announcement Announcement Module
Collapse
No announcement yet.
PropertyNotFoundException: couldnt find setter, it has Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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">
    <list>
    <value>com/dataaccess/hibernate/mapping/ClaimFinancialDetailPaymentDataBean.hbm.xml</value>
    </list>
    </property>

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

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

    <composite-id
    name="claimFinancialDetailPaymentDataBeanPK"
    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"/>

    </composite-id>

    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.
    :lol:

    Comment


    • #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.

      Comment

      Working...
      X