Erreur lors de la création de bean de type java.io.Le fichier [Ambigu constructeur types d'argument]

J'ai pas le printemps suivant, le haricot de configuration

  <bean id="fileBean" class="java.io.File">
    <constructor-arg type="java.lang.String" 
                     value="$prop{file.path.property}" />    
  </bean>

J'obtiens l'erreur suivante

org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'fileBean' defined in class path resource [context.xml]:  
Unsatisfied dependency expressed through constructor argument with index 0 of type
[java.net.URI]: Ambiguous constructor argument types - did you specify the correct 
bean references as constructor arguments?

Il n'y a qu'un seul constructeur pour java.io.Fichier avec un seul paramètre de Chaîne donc je ne sais pas pourquoi c'est ambigu. Toute aide appréciée.

OriginalL'auteur cyber-monk | 2011-09-06