[ 
https://issues.apache.org/jira/browse/WICKET-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14349202#comment-14349202
 ] 

ASF GitHub Bot commented on WICKET-5850:
----------------------------------------

GitHub user shuraa opened a pull request:

    https://github.com/apache/wicket/pull/105

    WICKET-5850 Fix class loading issue in LazyInitProxyFactory

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/shuraa/wicket wicket-6.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/wicket/pull/105.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #105
    
----
commit e00c54c310000924290476f91797a2197a756782
Author: Alexander Morozov <alexander.v.moro...@gmail.com>
Date:   2015-03-05T18:16:59Z

    WICKET-5850 Fix class loading issue in LazyInitProxyFactory in case of 
multimodule deployment

----


> LazyInitProxyFactory causes NoClassDefFound 
> org/apache/wicket/proxy/ILazyInitProxy in case of multimodule deployment
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5850
>                 URL: https://issues.apache.org/jira/browse/WICKET-5850
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 6.18.0, 6.19.0
>         Environment: Windows 7 Pro x64, Oracle JDK 7u45 x64, Glassfish 3 (EE6)
>            Reporter: Alexander Morozov
>
> In case of multimodule deployment, LazyInitProxyFactory#createProxy() ends up 
> with NoClassDefFound error while trying to wrap a class which is being 
> injected into a Wickets component.
> {code:java}
>                       CGLibInterceptor handler = new CGLibInterceptor(type, 
> locator);
>                       Enhancer e = new Enhancer();
>                       e.setInterfaces(new Class[] { Serializable.class, 
> ILazyInitProxy.class,
>                                       IWriteReplace.class });
>                       e.setSuperclass(type);
>                       e.setCallback(handler);
>                       e.setNamingPolicy(new DefaultNamingPolicy()
>                       {
>                               @Override
>                               public String getClassName(final String prefix, 
> final String source,
>                                       final Object key, final Predicate names)
>                               {
>                                       return super.getClassName("WICKET_" + 
> prefix, source, key, names);
>                               }
>                       });
>                       return e.create();
> {code}
> As we can see, Enhancer is not configured with an context-relative 
> classloader. This is the root of the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to