-->
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.  [ 9 posts ] 
Author Message
 Post subject: Access exception when trying to access db
PostPosted: Mon May 17, 2004 1:42 pm 
Beginner
Beginner

Joined: Sun May 16, 2004 3:53 pm
Posts: 47
Location: Belo Horizonte, Brazil
Hi,


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 2:44 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Problem is in mapping, not in cglib, probably "age" is null in DB.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:12 pm 
Beginner
Beginner

Joined: Sun May 16, 2004 3:53 pm
Posts: 47
Location: Belo Horizonte, Brazil
It`s weird because i got ages for all persons in the table.

Then, it`s not because it`s null.

Do u have any other sugestion?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Try doing what the exception recommends - set hibernate.cglib.use_reflection_optimizer=false


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:39 pm 
Beginner
Beginner

Joined: Sun May 16, 2004 3:53 pm
Posts: 47
Location: Belo Horizonte, Brazil
Where ( or how) can i do that?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:41 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Look for it in the documentation.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:53 pm 
Beginner
Beginner

Joined: Sun May 16, 2004 3:53 pm
Posts: 47
Location: Belo Horizonte, Brazil
Everything i`ve been doing for one week is based on hibernate docs (actually from the site).

It has helped me a lot, however, i think that hibernates documentation has some scattered pieces of information that sometimes are hard to put together.

When i get home from work, i`ll sure take a look at the documentation and try to solve the problem, but if it`s a simple thing to do (or to explain), i`d appreciate any help.

Thanks,
ltcmelo


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:54 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just use the search function of your web browser or PDF reader!

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 1:09 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Generated code does this: person.setAge( ((Integer)args[0]).intValue() );
It can throw ClassCastException or NullPointerException, reflection does the same in native code and I do not think message will be more clear.


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