[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2355) CGLIBLazyInitializer can not access a public member if parent class is not public
Paul Benedict (JIRA)
noreply at atlassian.com
Fri Oct 3 14:31:04 EDT 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31328#action_31328 ]
Paul Benedict commented on HHH-2355:
------------------------------------
This is a nasty bug that I ran into too. Let's get the patch applied in 3.2.x at least.
> CGLIBLazyInitializer can not access a public member if parent class is not public
> ---------------------------------------------------------------------------------
>
> Key: HHH-2355
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2355
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.2.1
> Reporter: Daniel Beland
> Attachments: test.tar.gz
>
>
> In hibernate 3.2.1, CGLIBLazyInitializer cannot acces a public method if it has been inherited from a parent class that is not public.
> Let's say we have a class A, modifier = default (package) with a public method getName() (and setName(String name)).
> Then I create a public class B that extends A.
> in my code I can retrieve B from the database:
> B b = session.load(B.class, new Integer(1), LockMode.NONE);
> I receive b with all the values set correctly (So at this point, Hibernate was able to use the method setName() correctly).
> In my code if I then try to use b.getName(), I receive and error:
> java.lang.IllegalAccessException-->Class org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer can not access a member of class A with modifiers "public"
> But I am not trying to access A.getName(), but B.getName() (which is a public method in a public class).
> This was working perfectly with Hibernate 2.1.7c and 3.1.3.
> The full information about my problem can be found here: http://forum.hibernate.org/viewtopic.php?t=969453
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list