Announcement Announcement Module
Collapse
No announcement yet.
Error in bean creation via instance factory method Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error in bean creation via instance factory method

    I am getting error:
    Attribute "factory-bean" must be declared for element type "bean".
    when configuring beans as follows:

    <bean id="dataSourceFactory" class="DataSourceFactory"/>

    <bean id="dataSource" factory-bean="dataSourceFactory" factory-method="getDataSource">
    <constructor-arg>
    <value>XDocsLocalDBPool</value>
    </constructor-arg>
    </bean>

    It seems to complain "dataSourceFactory" is not of type "bean" which I am not sure why. Also, could you please let me know if I can use <constructor-arg> as shown above?

    Thanks,
    Hannah

  • #2
    I am getting error:
    Attribute "factory-bean" must be declared for element type "bean".
    when configuring beans as follows:
    You should be using Spring 1.1 to use "factory-bean".

    Comment

    Working...
    X