Tomas Kloucek created WICKET-6551: ------------------------------------- Summary: LazyInitProxyFactory doesn't work correctly at Weblogic Key: WICKET-6551 URL: https://issues.apache.org/jira/browse/WICKET-6551 Project: Wicket Issue Type: Bug Components: wicket, wicket-spring Affects Versions: 6.21.0 Reporter: Tomas Kloucek
When weblogic serializes HTTP session then it's not an Wicket Application thread and Thread.currentThread().getClassLoader() can return different NOT-application classloader... which ends in LazyInitProxyFactory.readResolve() ClassNotFoundException crash...This ends in Wicket's WebSession being not saved into HTTP session which is fatal consequence.... We have sucessfully tested following patch of LazyInitProxyFactory: static class ProxyReplacement implements IClusterable { private static final long serialVersionUID = 1L; private final IProxyTargetLocator locator; private final String type; /** * Constructor * * @param type * @param locator */ public ProxyReplacement(final String type, final IProxyTargetLocator locator) { this.type = type; this.locator = locator; } private Object readResolve() throws ObjectStreamException { Class<?> clazz = WicketObjects.resolveClass(type); if (clazz == null) { try { clazz = Class.forName(type, false, WicketObjects.class.getClassLoader()); System.out.println("Clazz resolved through application classloade"); } catch (ClassNotFoundException e) { ClassNotFoundException cause = new ClassNotFoundException( "Could not resolve type [" + type + "] with the currently configured org.apache.wicket.application.IClassResolver"); throw new WicketRuntimeException(cause); } } return LazyInitProxyFactory.createProxy(clazz, locator); } } With this patched LazyInitProxyFactory class problem went away. Can you please accomodate this fix into Wicket 6.x line? -- This message was sent by Atlassian JIRA (v7.6.3#76005)