-->
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.  [ 8 posts ] 
Author Message
 Post subject: Weird CGLIB failure
PostPosted: Mon Sep 08, 2003 8:17 am 
Newbie

Joined: Mon Sep 08, 2003 8:00 am
Posts: 7
Location: Weiden, Germany
Hi,

I have the mapping like this:

<class name="eg.ProductData" table="tbProductData">
<!-- PK -->
<id name="tbProductDataID" column="tbProductDataID" type="long">
<generator class="identity"/>
</id>
<!-- local attributes -->
<property name="subject2Warranty" column="subject2Warranty" type="boolean"/>
<property name="replacementPrice" column="replacementPrice" type="big_decimal"/>
</class>


and every time I try to make a simple select like "select productData from ProductData as productData" I get following error:

1 errors occurred while listing (and calling getPathNames).
exception setting property value with CGLIB setter of eg.ProductData.?

Weird thing is that if I remove property "subject2Warranty" everything works fine.

Second weird thing is that if I do select like this: "select productdata.subject2Warranty from ProductData as productdata" it works allright. (I mean I checked setter and getter for this attribute, they're working)

kind regards
reinis.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 8:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
are you sure the subject2Warranty column is not nullable in the db, and primitive in the object model?


Top
 Profile  
 
 Post subject: Shame on me :-(
PostPosted: Mon Sep 08, 2003 8:38 am 
Newbie

Joined: Mon Sep 08, 2003 8:00 am
Posts: 7
Location: Weiden, Germany
Exactlly,

I found failure and wanted to call off my post.

Still, exception was kinda weird... Gavin, is there chance, that some exceptions will get more user friendlly with the next releas(es)?

There are couple of such strange exceptions, that one with less experience would hardly find source of.

kind regards
reinis.


Top
 Profile  
 
 Post subject: Re: Shame on me :-(
PostPosted: Mon Sep 08, 2003 9:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
reinis_v wrote:
Exactlly,

I found failure and wanted to call off my post.

Still, exception was kinda weird... Gavin, is there chance, that some exceptions will get more user friendlly with the next releas(es)?

There are couple of such strange exceptions, that one with less experience would hardly find source of.

kind regards
reinis.


We enhance the exceptions (and their corresponding messages) when we discover a "bad" exception.

So, if you can pinpoint (even suggest) what you want improved - then please do ;)

Regarding setting property exceptoin - I think that if you disable cglib optimizer you will get an even better one.....I even think this stuff is improved in the current branch.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 9:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
The trouble here is that CGLIB doesn't give us much to go by....



P.S. my record on accepting patches to exception messages quickly is Very Good :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 5:14 pm 
Beginner
Beginner

Joined: Fri Aug 29, 2003 3:39 pm
Posts: 33
Location: San Francisco, CA
gavin wrote:
The trouble here is that CGLIB doesn't give us much to go by....


It would be possible to throw a special exception that could tell you which index failed. There would be a small runtime penalty (equivalent to the cost of "i++" * the number of properties), but maybe it is worth it?

Chris


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 6:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
yes, I suppose....

The i++ is unlikely to be relevant, since we already iterated the properties at least once in loading the object.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 08, 2003 6:40 pm 
Beginner
Beginner

Joined: Fri Aug 29, 2003 3:39 pm
Posts: 33
Location: San Francisco, CA
gavin wrote:
yes, I suppose....

The i++ is unlikely to be relevant, since we already iterated the properties at least once in loading the object.


I'll put it on the TODO list...
Chris


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