0

嗨,当我尝试执行我的 JUNIT 测试用例时,我收到以下错误。如果有人可以帮助我解决这个问题,那将是非常有帮助的。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'commonValuesBackingBean' defined in class path resource [resources/ffms-storevisit-spring.xml]: Cannot resolve reference to bean 'cycleBackingBean' while setting bean property 'cycleBackingBean'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cycleBackingBean' defined in class path resource [resources/ffms-storevisit-spring.xml]: Cannot resolve reference to bean 'cycleManager' while setting bean property 'cycleManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cycleManager' defined in class path resource [resources/ffms-storevisit-spring.xml]: Cannot resolve reference to bean 'cycleBO' while setting bean property 'cycleBO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cycleBO' defined in class path resource [resources/ffms-storevisit-spring.xml]: Cannot resolve reference to bean 'cycleDAO' while setting bean property 'cycleDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cycleDAO' defined in class path resource [resources/ffms-storevisit-spring.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [resources/ffms-common-spring.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(Ljava/io/InputStream;Ljava/util/Properties;)Lcom/ibatis/sqlmap/client/SqlMapClient;
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)

急切地等待答复。提前致谢。

4

1 回答 1

1

正如您所说,您ibatis-sqlmap的 CLASSPATH 中有 jar。然后尝试打开它(它是 zip 文件)并检查是否有com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.class文件。

如果它不存在,则意味着您的 jar 已损坏或已修改。如果它在那里,那么你的 CLASSPATH 是错误的。

于 2012-12-22T00:30:35.780 回答