[KULRICE-5135] fix ojb proxies for classes with protected setters Created: 09/May/11  Updated: 23/Feb/12  Resolved: 10/May/11

Status: Closed
Project: Kuali Rice Development
Component/s: Development
Affects Version/s: None
Fix Version/s: 2.0.0-m5, 2.0
Security Level: Public (Public: Anyone can view)

Type: Bug Fix Priority: Major
Reporter: Travis Schneeberger Assignee: Travis Schneeberger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Similar issues:
KULRICE-2125Fix ContextClassLoader proxy issues in KEWHttpInvokerServiceExporter
KULRICE-6577KRAD Infrastructure not handling null OJB proxies?
KULRICE-7704AttributeDefinition missing setter for dependancy constraints
KULRICE-2674UiDocumentService OJB proxy handling
KULRICE-2572proxy="true" on EntityPrivacyPreferences causes OJB errors
KULRICE-11417Fix the mixing of OJB and JPA in KEW Rule Maintenance
KULRICE-3643Make private methods in document-related classes protected to improve overridability
KULRICE-11664DocumentBase JPA versus OJB change regarding saving/restoring documentHeader
KULRICE-4532Make all private members protected for framework base classes
KULRICE-7020No setter property for ojbSuperFieldInternal
KAI Review Status: Not Required
KTI Review Status: Not Required

 Description   

Groovy BOs generate setter methods that are protected. This chokes ojb (see error below). The fix is the call method.setAccessible(true) in the AbstractIndirectionHandler class in ojb.

Caused by: org.apache.ojb.broker.PersistenceBrokerException: Error invoking method $getStaticMetaClass
at org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractIndirectionHandler.java:363)
at org.kuali.rice.krms.impl.repository.AgendaItemBo$$EnhancerByCGLIB$$dd9bd8b6.$getStaticMetaClass(<generated>)
at org.kuali.rice.krms.impl.repository.AgendaItemBo.<init>(AgendaItemBo.groovy)
at org.kuali.rice.krms.impl.repository.AgendaItemBo$$EnhancerByCGLIB$$dd9bd8b6.<init>(<generated>)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
... 84 more
Caused by: java.lang.IllegalAccessException: Class org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler can not access a member of class org.kuali.rice.krms.impl.repository.AgendaItemBo with modifiers "protected"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.reflect.Method.invoke(Method.java:588)
at org.apache.ojb.broker.core.proxy.AbstractIndirectionHandler.invoke(AbstractIndirectionHandler.java:353)
... 92 more



 Comments   
Comment by Jessica Coltrin (Inactive) [ 23/Feb/12 ]

Closing since these items are now in the release notes.

Generated at Mon Jul 13 18:55:09 CDT 2020 using JIRA 6.1.5#6160-sha1:a61a0fc278117a0da0ec9b89167b8f29b6afdab2.