使用@ContextConfiguration在spring中运行JUNIT测试时出错

时间:2014-07-15 19:49:55

标签: junit spring-integration

我有这个奇怪的错误,运行junit测试,但无法找到原因。奇怪的是,这在本地日食中运行良好,但在构建服务器上运行不正常。 任何线索都将受到高度赞赏,谢谢

我正在使用@ContextConfiguration(...)并且是自动连接的

13:42:30.372 [main] ERROR o.s.test.context.TestContextManager - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@7f4e0ba] to prepare test instance [com.abc.wss.bes.portal.integration.TestCommon@34330fb9]
java.lang.IllegalStateException: Failed to load ApplicationContext

这是由 -

引起的最内层
Caused by: java.lang.IllegalArgumentException: Found ambiguous parameter type [class java.lang.Void] for method match: [public static int[] com.abc.wss.bes.portal.integration.data.portal.DataTransformer.__cobertura_get_and_reset_counters(), public static void com.abc.wss.bes.portal.integration.data.portal.DataTransformer.__cobertura_classmap_0(com.coverity.capture.cobertura.coveragedata.LightClassmapListener)]
    at org.springframework.util.Assert.isNull(Assert.java:89) ~[spring-core-4.0.5.RELEASE.jar:4.0.5.RELEASE]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.findHandlerMethodsForTarget(MessagingMethodInvokerHelper.java:429) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:186) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:136) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:131) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.<init>(MethodInvokingMessageProcessor.java:57) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.transformer.MethodInvokingTransformer.<init>(MethodInvokingTransformer.java:47) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.config.TransformerFactoryBean.createMethodInvokingHandler(TransformerFactoryBean.java:56) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean.createHandler(AbstractStandardMessageHandlerFactoryBean.java:97) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.createHandlerInternal(AbstractSimpleMessageHandlerFactoryBean.java:113) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:101) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:43) ~[spring-integration-core-4.0.1.RELEASE.jar:na]
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE]
    ... 53 common frames omitted

0 个答案:

没有答案