Announcement Announcement Module
Collapse
No announcement yet.
spring 2.0-m5 and MethodInvokingFactoryBean arguments types resolution problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring 2.0-m5 and MethodInvokingFactoryBean arguments types resolution problem

    Hello, all

    Today I tried to run our Spring-based application under 2.0-m5 and
    got error with such MethodInvokingFactoryBean:

    <bean id="init-log4j"
    class ="org.springframework.beans.factory.config.MethodI nvokingFactoryBean"
    lazy-init = "false">
    <property name = "staticMethod" value = "org.springframework.util.Log4jConfigurer.initLogg ing"/>
    <property name = "arguments">
    <list>
    <value>classpath:${log4j.cfg}</value>
    <value>${log4j.refresh}</value>
    </list>
    </property>
    </bean>

    The error was:
    ...
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'init-log4j' defined in class path resource [applicationContext-common.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodException: org.springframework.util.Log4jConfigurer.initLoggi ng(java.lang.String, java.lang.String)
    ...

    This bean definition works with Spring 1.2.8 and Spring 2.0-m4 and
    correctly resolve method signature to existing method
    org.springframework.util.Log4jConfigurer.initLoggi ng(java.lang.String, long)

    Should we change bean definition ? Or it is Spring bug ?

    Thanks in advance.

    Igor Poteryaev
Working...
X