On 04/02/2014 01:37 PM, Andrew Haley wrote:
On 04/02/2014 12:20 PM, Mikolaj Izdebski wrote:
> 4) java.lang.reflect.Proxy - fields of proxy classes cannot be accessed
> using reflection any longer?
I'd like to see a case of this.
Now I've noticed that the proxy class is in some strange package, so I
don't know exactly what's going on here. But the error is:
java.lang.IllegalAccessException: Class
org.hibernate.annotations.common.annotationfactory.AnnotationFactory can
not access a member of class
org.hibernate.annotations.common.test.annotationfactory.$Proxy2 with
modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:101)
at
java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:295)
at
java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:287)
at java.lang.reflect.Constructor.newInstance(Constructor.java:398)
at
org.hibernate.annotations.common.annotationfactory.AnnotationFactory.getProxyInstance(AnnotationFactory.java:63)
at
org.hibernate.annotations.common.annotationfactory.AnnotationFactory.create(AnnotationFactory.java:49)
at
org.hibernate.annotations.common.test.annotationfactory.AnnotationFactoryTest.testCreatesProxyInstancesOfAnnotations(AnnotationFactoryTest.java:33)
Package: hibernate-commons-annotations
--
Mikolaj Izdebski
Software Engineer, Red Hat
IRC: mizdebsk