title: Simple Spring EL expression does not work; with error TypeMismatchException
body: <p>I have the following simple expression in my application-context.xml:</p>
  
  <pre><code>&lt;bean id="instrument" class="com.ustunozgur.Instrument" init-method="initialize" scope="prototype"&gt;
  &lt;property name="age" value="#{4}"/&gt;
  &lt;property name="name" value="Violin"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>The Instrument class is a simple POJO. However, it is throwing the following error:</p>
  
  <pre><code>[ERROR] ...nested exception is org.springframework.beans.TypeMismatchException: 
  Failed     to convert property value of type 'java.lang.String' to required type
  'int'   for      property 'age'; nested exception is java.lang.NumberFormatException: For input string:
  "{4}" -&gt; 
  </code></pre>
  
  <p>Here is the initial beans declaration in my xml:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:tx="http://www.springframework.org/schema/tx"
     xsi:schemaLocation="http://www.springframework.org/schema/beans
             http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
             http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"&gt;
  </code></pre>
  
  <p>What could be the problem? I have included spring-core, spring-expression, spring-context in my pom.xml. I am not doing any configuration via code; all the configuration is done via xml.</p>
  
  <p>PS: This is a command line application, can it be the culprit?</p>
  
  <p>PPS: The following code works though, so it seems only the spel in XML is ignored:</p>
  
  <pre><code>  ExpressionParser parser = new SpelExpressionParser();
    Expression exp = parser.parseExpression("'Hello World'");
    String message = (String) exp.getValue();
  </code></pre>
  
  <p>Here is my complete application-context.xml and pom.xml: <a href="http://paste.pocoo.org/show/494260/" rel="nofollow">http://paste.pocoo.org/show/494260/</a> and <a href="http://paste.pocoo.org/show/494262/" rel="nofollow">http://paste.pocoo.org/show/494262/</a></p>