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

Martin Grigorov resolved WICKET-6551.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 8.1.0
                   7.11.0
                   6.30.0

> 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
>            Assignee: Martin Grigorov
>            Priority: Critical
>             Fix For: 6.30.0, 7.11.0, 8.1.0
>
>
> 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:
>  
> {code:java}
> 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);
>  }
> }
> {code}
> With this patched LazyInitProxyFactory class problem went away. Can you 
> please accomodate this fix into Wicket 6.x line?
>  
> Forum link: 
> [http://apache-wicket.1842946.n4.nabble.com/Wicket-s-LazyInitProxyFactory-runs-incorrectly-at-WebLogic-td4680236.html]
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to