Adolfo created TRINIDAD-2505: -------------------------------- Summary: URLEncoderFactory ThreadLocal memory leak causing NullPointerException in JSF on Weblogic Key: TRINIDAD-2505 URL: https://issues.apache.org/jira/browse/TRINIDAD-2505 Project: MyFaces Trinidad Issue Type: Bug Affects Versions: 2.1.0-core Environment: Weblogic 12.1.1c Windows 7, Linux Ubuntu Reporter: Adolfo Priority: Critical
URLEncoderFactory has an ThreadLocal to store an instance of URLEncoder for the entire Request. The instance initialization store an reference to the current ExternalContext. The request lifecicle is not cleaning the ThreadLocal, so the next request that reuse the same thread will retrieve the last instance that has a ExternalContext refering to an ServletRequest that Weblogic has cleaned the context reference. This behavior cause NullPointerException when JSF use encodeResourceURL. ----- URLEncoderFactory.java line 74 ------- public URLEncoder getURLEncoder(ExternalContext ec) { //even though we should wait until we have a faces context and throw an error //if we don't, go ahead and fudge it if the threadlocal is not null. This just //means that a URLEncoder has already been set for this thread. URLEncoder enc = _local.get(); if(null != enc) { return enc; } -- This message was sent by Atlassian JIRA (v6.2#6252)