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.  [ 2 posts ] 
Author Message
 Post subject: internal constructor causes exception - any one know why?
PostPosted: Mon Mar 10, 2008 11:51 pm 
Beginner
Beginner

Joined: Mon Feb 04, 2008 1:48 pm
Posts: 30
Can any one tell me why an internal constructor on an associated class (many-to-one) causes this error: {"Creating a proxy instance failed"}
"Constructor on type ... not found"

when I make it public it works!?

Documentation says "All persistent classes must have a default constructor (which may be non-public) "

So why the error for internal constructor?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 4:08 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
Hibernate tries to create a proxy subclass for your class when you use lazy-loading. So, a "protected internal" constructor should work.

_________________
--Wolfgang


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