[ 
https://issues.apache.org/jira/browse/TAPESTRY-1301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesse Kuhnert resolved TAPESTRY-1301.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1.2
         Assignee: Jesse Kuhnert

I took the cglib enhancement stuff out for now, so I guess that has fixed the 
problem. Not sure if this style of property watching will come back or not yet.

> Class not found with cglib loaded in a parent (non-webapp) classloader. 
> (CglibProxiedPropertyChangeObserverImpl)
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1301
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1301
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.2
>         Environment: Tomcat 5.5.20
>            Reporter: Marcus Schulte
>         Assigned To: Jesse Kuhnert
>             Fix For: 4.1.2
>
>
> We need CGLIB to reside in Tomcat's common/lib Classloader due to 
> Hibernate-Issues.
> In this case, there is a ClassNotFoundException from 
> CglibProxiedPropertyChangeObserverImpl.observePropertyChanges().
> This is, because net.sf.cglib.proxy.Enhancer's static create-method falls 
> back on the classloader, in which it is loaded. The correct behaviour, imo, 
> would be to make the enhancer use the thread-context-classloader. 
> Proposed patch (tested, works well):
> In o.a.t.record.CglibPropertyChangeInterceptor change the lines (90ff):
> _________________
> Object ret = Enhancer.create(property.getClass(), interfaces, 
>                     new ObservableMethodFilter(), 
>                     new Callback[] { new LazyProxyDelegate(property), new 
> CglibPropertyChangeInterceptor(component, property, propertyName)});
> _______________            
> into:
> ______________________
>             Enhancer e = new Enhancer();
>             e.setClassLoader( Thread.currentThread().getContextClassLoader() 
> );
>             e.setSuperclass(property.getClass());
>             e.setInterfaces(interfaces);
>             e.setCallbackFilter(new ObservableMethodFilter());
>             e.setCallbacks(new Callback[] { new LazyProxyDelegate(property), 
>                       new CglibPropertyChangeInterceptor(component, property, 
> propertyName)});
>             Object ret = e.create();
> ________________________

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to