[
https://issues.apache.org/jira/browse/WICKET-5850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Morozov updated WICKET-5850:
--------------------------------------
Comment: was deleted
(was: https://github.com/apache/wicket/pull/105
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
>
> 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)