| 
                         异常信息表明OgnlRuntime类不能够访问java.util.Collections的私有成员SingletonList。查看源代码发现能够抛出MethodFailedException异常可以锁定在invokeMethod方法内部。 
- public static Object callAppropriateMethod(OgnlContext context, Object source, Object target, String methodName, String propertyName, List methods, Object[] args) throws MethodFailedException { 
 -         Object reason = null; 
 -         Object[] actualArgs = objectArrayPool.create(args.length); 
 -  
 -         try { 
 -             Method e = getAppropriateMethod(context, source, target, methodName, propertyName, methods, args, actualArgs); 
 -             if(e == null || !isMethodAccessible(context, source, e, propertyName)) { 
 -                 StringBuffer buffer = new StringBuffer(); 
 -                 if(args != null) { 
 -                     int i = 0; 
 -  
 -                     for(int ilast = args.length - 1; i <= ilast; ++i) { 
 -                         Object arg = args[i]; 
 -                         buffer.append(arg == null?NULL_STRING:arg.getClass().getName()); 
 -                         if(i < ilast) { 
 -                             buffer.append(", "); 
 -                         } 
 -                     } 
 -                 } 
 -  
 -                 throw new NoSuchMethodException(methodName + "(" + buffer + ")"); 
 -             } 
 -  
 -             Object var14 = invokeMethod(target, e, actualArgs); 
 -             return var14; 
 -         } catch (NoSuchMethodException var21) { 
 -             reason = var21; 
 -         } catch (IllegalAccessException var22) { 
 -             reason = var22; 
 -         } catch (InvocationTargetException var23) { 
 -             reason = var23.getTargetException(); 
 -         } finally { 
 -             objectArrayPool.recycle(actualArgs); 
 -         } 
 -  
 -         throw new MethodFailedException(source, methodName, (Throwable)reason); 
 -     } 
 
                          (编辑:滁州站长网) 
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! 
                     |