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

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

Github user shuraa closed the pull request at:

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


> 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
>            Assignee: Sven Meier
>             Fix For: 6.20.0, 7.0.0-M6
>
>
> 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