Results 1 to 2 of 2

Thread: could not satisfy dependencies

  1. #1

    Default could not satisfy dependencies

    I'm getting the following message with the code below:-

    org.springframework.beans.factory.UnsatisfiedDepen dencyException: Error creating bean with name 'field1' defined in file [c:\config\thebean.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: Did you specify the correct bean references as generic constructor arguments

    <property name="fields">
    <map>
    <entry key="CITY">
    <bean id="field1" class="com.ourco.DBField">
    <constructor-arg type="String" index="0">
    <value>CITY</value>
    </constructor-arg>
    <constructor-arg type="char" index="1">
    <value>L</value>
    </constructor-arg>
    <constructor-arg type="int" index="2">
    <value>7 </value>
    </constructor-arg>
    <constructor-arg type="int" index="3">
    <value>0</value>
    </constructor-arg>
    </bean>
    </entry>
    </map>
    </property>

  2. #2

    Default workaround (ish)

    Well, further investigation leads me to believe that the constructor-arg of type="char" is causing the problem. eg if I add a no arg constructor to the DBField type and attempt to set the property using <property name="type"><value>L</value>..... I get an error indicating an invalid argument. If I change the datatype from char to String it works fine

Similar Threads

  1. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  2. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM
  3. Debug exceptions using ContextSingletonBeanFactoryLocator
    By timothygordon32 in forum Container
    Replies: 2
    Last Post: Feb 21st, 2005, 11:19 AM
  4. Replies: 3
    Last Post: Nov 5th, 2004, 09:47 AM
  5. Inject Dependencies to a Stateless Session Bean.
    By maramonar in forum Container
    Replies: 2
    Last Post: Sep 14th, 2004, 09:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •