当我尝试执行我的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)
急切地等待回复。提前谢谢。
答案 0 :(得分:1)
正如你所说,你的CLASSPATH中有ibatis-sqlmap
jar。然后尝试打开它(它的zip文件)并检查是否有com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.class
文件。
如果它不存在则表示您的jar已损坏或被修改。如果它在那里那么你的CLASSPATH是错误的。