简体   繁体   中英

Error while running JUNIT testcase

Hi I get the following error when i try to execute my JUNIT test case. If somebody can help me with this, it would be of great help.

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)

Eagerly waiting for the reply. Thanks in advance.

As you said, you have ibatis-sqlmap jar in your CLASSPATH. Then try open it (it's zip file) and check that there is com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.class file.

If it's not there then this means your jar is corrupted or was modified. If it's there then your CLASSPATH is wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM