facebook

org.hibernate.PropertyNotFoundException:

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #308157 Reply

    allen244
    Member

    I have a strange problem I am using myeclipse 8 with jboss 4.0.5 when I try to add a new mapping I am getting this error

    org.hibernate.PropertyNotFoundException: Could not find a getter for test in class com.nydn.domain.EmailVO

    this works in one enviornment but not another.

    private String test ;

    public String getTest() {
    return test;
    }

    public void setTest(String test) {
    this.test = test;
    }

    <?xml version=”1.0″?>
    <!DOCTYPE hibernate-mapping PUBLIC “-//Hibernate/Hibernate Mapping DTD 3.0//EN”
    http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”&gt;
    <!–
    Mapping file autogenerated by MyEclipse – Hibernate Tools
    –>
    <hibernate-mapping>
    <class name=”com.nydn.domain.EmailVO” table=”email” catalog=”nydn”>
    <id name=”objectId” type=”java.lang.Integer”>
    <column name=”EMAIL_ID” />
    <generator class=”identity” />
    </id>
    <many-to-one name=”regsUser” class=”com.nydn.domain.RegsUserVO” fetch=”select”>
    <column name=”USER_ID” />
    </many-to-one>
    <property name=”fromEmailAddr” type=”java.lang.String”>
    <column name=”FROM_EMAIL_ADDR” length=”100″ not-null=”true” />
    </property>
    <property name=”toEmailAddr” type=”java.lang.String”>
    <column name=”TO_EMAIL_ADDR” length=”100″ not-null=”true” />
    </property>
    <property name=”subject” type=”java.lang.String”>
    <column name=”SUBJECT” length=”100″ not-null=”true” />
    </property>
    <property name=”mailBody” type=”java.lang.String”>
    <column name=”email_message” length=”1600″/>
    </property>
    <property name=”storyUrl” type=”java.lang.String”>
    <column name=”STORY_URL” length=”255″ not-null=”true” />
    </property>
    <property name=”receiverName” type=”java.lang.String”>
    <column name=”RECEIVER_NAME” length=”100″ not-null=”true” />
    </property>
    <property name=”senderName” type=”java.lang.String”>
    <column name=”SENDER_NAME” length=”100″ not-null=”true” />
    </property>
    <property name=”storyDesc” type=”java.lang.String”>
    <column name=”STORY_DESC” length=”1024″ not-null=”true” />
    </property>
    <property name=”storyAuthor” type=”java.lang.String”>
    <column name=”STORY_AUTHOR” length=”80″ />
    </property>
    <property name=”storyPublishDate” type=”java.sql.Date”>
    <column name=”STORY_PUBLISH_DATE” />
    </property>
    <property name=”storySource” type=”java.lang.String”>
    <column name=”STORY_SOURCE” length=”40″ />
    </property>
    <property name=”storySection” type=”java.lang.String”>
    <column name=”STORY_SECTION” length=”40″ not-null=”true” />
    </property>
    <property name=”isProcessed” type=”java.lang.Integer”>
    <column name=”IS_PROCESSED” />
    </property>
    <property name=”test” type=”java.lang.String”>
    <column name=”test” length=”10″ />
    </property>

    </class>
    </hibernate-mapping>

    #308169 Reply

    allen244,
    Is “test” the actual parameter that you are using?

    org.hibernate.PropertyNotFoundException: Could not find a getter for test in class

    This error is thrown when the second letter in the property is in uppercase. If that is the case, change your getter method similar to getaBCDEF().
    Please refer to the following for further reference –
    1. https://forum.hibernate.org/viewtopic.php?p=2242948&sid=89b0c236da8c7a73b8dae0c04a415831
    2. https://forum.hibernate.org/viewtopic.php?p=2354734&sid=b9a6817b2d43e3faa5abb1e72d9b7679
    Let me know if that helps.

    #308184 Reply

    allen244
    Member

    It doesnt have anything to do with the property I dont think I followed the example in the 2nd link and it failed.

    private String pKy;

    public String getPKy() {
    return this.pKy;
    }

    public void setPKy(String pKy) {
    this.pky = pky;
    }

    }

    <property name=”pKy” type=”java.lang.String”>
    <column name=”TYPE” length=”10″ />
    </property>

    org.hibernate.PropertyNotFoundException: Could not find a getter for pKy in class com.nydn.domain.EmailVO

    #308201 Reply

    allen244,
    Can you give some more information?
    1. Can you copy paste your installation details from MyEcilpse > Installation Summary > Installation Details?
    2. What is the database that you are working with?
    3. Can you list out the steps in detail, right from the project creation, to replicate this issue?
    4.

    this works in one enviornment but not another.

    Can you clarify what environment you are referring to?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: org.hibernate.PropertyNotFoundException:

You must be logged in to post in the forum log in