  import java.lang.reflect.InvocationTargetException;
  import java.lang.reflect.Method;
  import java.lang.reflect.Modifier;
-@@ -125,6 +126,7 @@
- 
+@@ -123,6 +124,8 @@
+ 		}
+ 	}
+ 
++	private static final ExpressionFactory DEFAULT_FACTORY = ExpressionFactory.newInstance();
++
  	private final boolean readOnly;
  	private final ConcurrentHashMap<Class<?>, BeanProperties> cache;
-+	private final ExpressionFactory factory;
- 
- 	/**
- 	 * Creates a new read/write BeanELResolver.
-@@ -139,6 +141,7 @@
- 	public BeanELResolver(boolean readOnly) {
- 		this.readOnly = readOnly;
- 		this.cache = new ConcurrentHashMap<Class<?>, BeanProperties>();
-+		this.factory = ExpressionFactory.newInstance();
- 	}
- 
- 	/**
+ 
 @@ -186,13 +189,15 @@
  			try {
  				properties = Introspector.getBeanInfo(base.getClass()).getPropertyDescriptors();

+				throw new MethodNotFoundException(e);
+			}
+		}
+		Method[] methods = base.getClass().getMethods();
+		for (Method method : methods) {
+			if (method.getName().equals(name)) {
+				if (paramCount == method.getParameterTypes().length) {
+					return method;
+				}
+			}
+		}
+		for (Method method : methods) {
+			if (method.isVarArgs()) {
+				if (paramCount >= method.getParameterTypes().length - 1) {
+					return method;
+				}
+			}
+		}
+		throw new MethodNotFoundException("Cannot find matching method " + name + " on class " + base);
+	}
+
+	private Object[] coerceParams(ELContext context, Method method, Object[] params) {
+		Class<?>[] types = method.getParameterTypes();
+		Object[] args = new Object[types.length];
+		if (method.isVarArgs()) {
+			int varargIndex = types.length - 1;
+			if (params.length < varargIndex) {
+				throw new ELException("bad argument count");
+			}
+			for (int i = 0; i < varargIndex; i++) {
+				coerceValue(args[i], i, params[i], types[i]);
+			}
+			Class<?> varargType = types[varargIndex].getComponentType();
+			int length = params.length - varargIndex;
+			Object array = null;
+			if (length == 1) {
+				Object source = params[varargIndex];
+				if (source == null) { // create empty array
+					array = Array.newInstance(varargType, 0);
+				} else if (source.getClass().isArray()) {
+					if (types[varargIndex].isInstance(source)) { // use source array as is
+						array = source;
+					} else { // coerce array elements
+						length = Array.getLength(source);
+						array = Array.newInstance(varargType, length);
+						for (int i = 0; i < length; i++) {
+							coerceValue(array, i, Array.get(source, i), varargType);
+						}
+					}
+				} else { // single element array
+					array = Array.newInstance(varargType, 1);
+					coerceValue(array, 0, source, varargType);
+				}
+			} else {
+				array = Array.newInstance(varargType, length);
+				for (int i = 0; i < length; i++) {
+					coerceValue(array, i, params[varargIndex + i], varargType);
+				}
+			}
+			args[varargIndex] = array;
+		} else {
+			if (params.length != args.length) {
+				throw new ELException("bad argument count");
+			}
+			for (int i = 0; i < args.length; i++) {
+				coerceValue(args, i, params[i], types[i]);
+			}
+		}
+		return args;
+	}
+
+	private void coerceValue(Object array, int index, Object value, Class<?> type) {
+		if (value != null || type.isPrimitive()) {
+			Array.set(array, index, factory.coerceToType(value, type));
+		}

Index: build.xml
===================================================================
--- build.xml	(revision 67)
+++ build.xml	(working copy)
@@ -1,5 +1,5 @@
 <project name="juel" default="jars" basedir=".">
-	<property name="version" value="2.1.2" />
+	<property name="version" value="2.1.3-SNAPSHOT" />
 
 	<property file="build.properties" />
 
Index: src/main/java/de/odysseus/el/ExpressionFactoryImpl.java
===================================================================
--- src/main/java/de/odysseus/el/ExpressionFactoryImpl.java	(revision 63)
