Mantis - Resin
Viewing Issue Advanced Details
3598 block always 07-15-09 03:05 08-24-09 09:29
rymsha  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.2  
0003598: javax.el.ELException: java.lang.IllegalAccessException
in BeanELResolver.java

code
if (descriptor.getReadMethod() != null)
    descriptor.getReadMethod().setAccessible(true);

behaves not as expected because PropertyDescriptor stores SoftReference
after some GC JVM cleans SoftReferences and we loose .setAccessible(true) setting.
This means, we can't use JSTL on Resin 4.0.0, as after a while application throws

javax.el.ELException: java.lang.IllegalAccessException: Class javax.el.BeanELResolver can not access a member of class java.util.HashMap$Entry with modifiers "public final" at javax.el.BeanELResolver.getValue(BeanELResolver.java:201) at com.caucho.jsp.el.PageContextELResolver.getValue(PageContextELResolver.java:181) at com.caucho.el.ArrayResolverExpr.getValue(ArrayResolverExpr.java:148) at com.caucho.el.PathExpr.getValue(PathExpr.java:142) at com.caucho.el.Expr.evalString(Expr.java:276) at com.caucho.el.Marshall$8.marshall(Marshall.java:116) at com.caucho.el.StaticMethodExpr.evalMethod(StaticMethodExpr.java:128) at com.caucho.el.FunctionExpr.getValue(FunctionExpr.java:69) at com.caucho.el.Expr.print(Expr.java:416) at jsp._WEB_22dINF._tags._common._pageIndextag.doTag(_pageIndextag.java:131) at _jsp._WEB_22dINF._jsp._company._searchResultsjsp._jspService(_searchResultsjsp.java:288) at

Resin 3.2.1 was not affected because it also stored hard reference to the readMethod (in the same BeanELResolver.java)

private void initDescriptor()
    {
      Method readMethod = _descriptor.getReadMethod();

      if (readMethod != null)
    _descriptor.setValue(ELResolver.TYPE, readMethod);
...

Notes
(0004131)
rymsha   
08-19-09 04:41   
4.0.1 still affected