title: Using @Validated causing CastException in Spring
body: <p>I am using Spring 3.1.</p>
  
  <p>I am trying to use Bean-Validator to validate a method.</p>
  
  <p>My class:</p>
  
  <pre><code>@Named
  @Scope("prototype")
  @Validated
  public class MyClass implements someClass
  {
  ..
      @Override
      public void handle(@NotNull MyObj myObj) {
          ..
      }
  }
  </code></pre>
  
  <p>Now this is the calling class:</p>
  
  <pre><code>@Named
  public class CallingClass{
  ..
    @Inject
    Provider&lt;MyClass&gt; myClass;
  
    public void doSomething(Myobj myObj)
    {
       MyClass handler = myClass.get();  //here I get the exception
       myClass.handle(myObj);
     }
  </code></pre>
  
  <p>That's the exception:</p>
  
  <pre><code>Caused by: java.lang.ClassCastException: com.sun.proxy.$Proxy85 cannot be cast to com...MyClass
  </code></pre>
  
  <p>Any idea?</p>
  
  <p>thanks,
  ray.</p>