-->
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.  [ 6 posts ] 
Author Message
 Post subject: PropertyNotFoundException
PostPosted: Thu May 12, 2005 2:26 pm 
Newbie

Joined: Thu May 12, 2005 2:24 pm
Posts: 7
I'm really confused. I can't figure this out:

10:58:33,671 ERROR [HibernatePlugIn] Rethrowing exception...
org.hibernate.PropertyNotFoundException: Could not find a getter for axleType in
class ca.cummings.dto.Trailer

but in ca.cummings.dto.Trailer i have:

int axleType;
public int getAxleType() {
return this.axleType;
}


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 2:34 pm 
Newbie

Joined: Wed May 04, 2005 1:10 pm
Posts: 8
What does you axleType.hbm.xml look like?

_________________
There's lies, damn lies and slashdot.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 2:41 pm 
Newbie

Joined: Thu May 12, 2005 2:24 pm
Posts: 7
Heres Trailers.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="ca.cummings.dto.Trailer" table="trailers">
<id name="id" column="trailerId">
<generator class="native"/>
</id>
<property name="model"/>
<property name="vin"/>
<property name="year"/>
<property name="gvw"/>
<property name="color"/>

<!-- everything is ok but this one -->
<property name="axleType" type="int"/>


<property name="purchasePrice"/>
<property name="freightCost"/>
<property name="pacCost"/>
<property name="brokerCost"/>
<property name="miscCost"/>
<property name="retailPrice"/>
<property name="comments"/>
<property name="purchaseDate"/>
</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 3:39 pm 
Newbie

Joined: Thu May 12, 2005 2:24 pm
Posts: 7
Spent all morning trying to figure this out...

Deleted my binaries, recompiled. The I finally shut down eclipse, deleted everything, rebooted, restarted Eclipse recompiled and it works.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 3:44 pm 
Newbie

Joined: Wed May 04, 2005 1:10 pm
Posts: 8
Well, I just tried setting an int valued entity in my test application and everything worked OK, so I don't think it's hibernate's problem per se.

A couple of things:
1. Did you cut/paste your java code to the message or re-type it? Any chance you have Axel instead of Axle?
2. I notice that you are returning this.axleType. The 'this.' is not really needed since the scope of axleType is unambiguous in this method. This is not causing your issue, however, because I tried that out as well.
3. Any reason why you are not declaring axleType as private?

I'll play around a bit more but hopefully someone else will see something that can help you.

_________________
There's lies, damn lies and slashdot.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 3:46 pm 
Newbie

Joined: Wed May 04, 2005 1:10 pm
Posts: 8
aaachooo wrote:
Spent all morning trying to figure this out...

Deleted my binaries, recompiled. The I finally shut down eclipse, deleted everything, rebooted, restarted Eclipse recompiled and it works.


If your shop allows it, try out the netbeans 4.1 release - It's not all that bad.

_________________
There's lies, damn lies and slashdot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.