Hibernateのgetterがない例外 PropertyNotFoundException: Could not find a getter for

データベース
スポンサーリンク

Hibernateを使っていてよく見かけるエラーです。

スポンサーリンク

PropertyNotFoundException: Could not find a getter for

出てきたエラーは以下の通りです。

 

同様のケースを以下で見つけました。

https://stackoverflow.com/questions/921239/hibernate-propertynotfoundexception-could-not-find-a-getter-for

https://stackoverflow.com/questions/45265256/org-hibernate-propertynotfoundexception-could-not-find-a-getter-for-a-property

解決策

Stackoverflow見てみると

<property name="DPart1" not-null="true"/>
should work...

 

It looks as if you have a few typos. In your Customer class, rename custID to custId because your mapping expects a field named custId. Then rename the following methods...

 

なるほど、単に大文字小文字の打ち間違え、ミスでした。

 

 

 

データベース
スポンサーリンク
スポンサーリンク
うらしたをフォローする
スポンサーリンク
urashita.com 浦下.com (ウラシタドットコム)

コメント

タイトルとURLをコピーしました