在Spring集成中结合使用FailoverCCF和CachingCCF

时间:2015-07-17 16:16:42

标签: spring spring-integration tcpclient

我试图将FailoverCCF与CachingCCF结合起来,但这些都没有成功。 这是我尝试过的:

FailoverClientConnectionFactory failoverClientConnectionFactory = new FailoverClientConnectoinFactory(underlyingCF());
failoverClientConnectionFactory.setSingleUse(true); // this is because CachingClient connection factory will force the singleUse = true

public List<AbstractClientConnectionFactory> underlyingCF() {
    return Arrays.asList(servers).stream().map(svr -> {
        TcpNioClientConnectionFactory tcpNio = new TcpNioClientConnectionFactory(server, port);
        tcpNio.setSingleUse(false);
        return CachingClientConnectionFactory(tcpNio, 8);
    }).collect(toList());

}

变量服务器初始化为:

String[] servers = new String[]{"local","localhost"};

但是,当它无法连接到第一台服务器时,它不会尝试连接第二台服务器。如果我不使用CachingCCF,它会故障转移到第二台服务器。

Spring集成版:4.1.4.RELEASE Spring框架版本:4.1.6.RELEASE

这是stacktrace(消息的内容被删除)

2015-07-19 00:26:44,877 [main] DEBUG o.s.i.i.t.TcpOutboundGateway - outboundClient received message: GenericMessage [payload={}, headers={replyChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@569348e1, errorChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@569348e1, id=ddf4e460-6829-c784-db09-d78162051530, json__TypeId__=class com.mycompany.app.client.request.RequestObject, contentType=application/json, timestamp=1437236804876}]
2015-07-19 00:26:44,878 [main] DEBUG o.s.i.i.t.c.TcpNioClientConnectionFactory - Opening new socket connection to local:20000
2015-07-19 00:27:06,330 [main] ERROR o.s.i.i.t.TcpOutboundGateway - Tcp Gateway exception
java.net.ConnectException: Connection timed out: connect
at sun.nio.ch.Net.connect0(Native Method) ~[na:1.8.0_31]
at sun.nio.ch.Net.connect(Net.java:457) ~[na:1.8.0_31]
at sun.nio.ch.Net.connect(Net.java:449) ~[na:1.8.0_31]
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647) ~[na:1.8.0_31]
at java.nio.channels.SocketChannel.open(SocketChannel.java:189) ~[na:1.8.0_31]
at org.springframework.integration.ip.tcp.connection.TcpNioClientConnectionFactory.buildNewConnection(TcpNioClientConnectionFactory.java:83) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.obtainNewConnection(AbstractClientConnectionFactory.java:101) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.obtainConnection(AbstractClientConnectionFactory.java:64) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:63) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
... 79 common frames omitted
Wrapped by: org.springframework.messaging.MessagingException: Failed to obtain connection; nested exception is java.net.ConnectException: Connection timed out: connect
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:66) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:58) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.util.SimplePool.doGetItem(SimplePool.java:188) ~[spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.util.SimplePool.getItem(SimplePool.java:169) ~[spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory.obtainConnection(CachingClientConnectionFactory.java:133) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory$FailoverTcpConnection.findAConnection(FailoverClientConnectionFactory.java:199) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory$FailoverTcpConnection.<init>(FailoverClientConnectionFactory.java:172) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory.obtainConnection(FailoverClientConnectionFactory.java:110) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.TcpOutboundGateway.handleRequestMessage(TcpOutboundGateway.java:115) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:286) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:245) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:231) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:154) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:102) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:286) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:245) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:150) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:45) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.sendAndReceive(AbstractMessagingTemplate.java:42) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:79) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:70) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:321) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceive(MessagingGatewaySupport.java:298) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:414) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.doInvoke(GatewayProxyFactoryBean.java:374) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:365) [spring-integration-core-4.1.4.RELEASE.jar:na]

在Linux中,异常甚至是不同的

2015-08-06 10:41:22,850 [main] ERROR o.s.i.i.t.TcpOutboundGateway - Tcp Gateway exception java.nio.channels.UnresolvedAddressException: null
at sun.nio.ch.Net.checkAddress(Net.java:123) ~[na:1.8.0_45]
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) ~[na:1.8.0_45]
at java.nio.channels.SocketChannel.open(SocketChannel.java:189) ~[na:1.8.0_45]
at org.springframework.integration.ip.tcp.connection.TcpNioClientConnectionFactory.buildNewConnection(TcpNioClientConnectionFactory.java:83) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.obtainNewConnection(AbstractClientConnectionFactory.java:101) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.obtainConnection(AbstractClientConnectionFactory.java:64) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory$FailoverTcpConnection.findAConnection(FailoverClientConnectionFactory.java:199) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory$FailoverTcpConnection.<init>(FailoverClientConnectionFactory.java:172) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.FailoverClientConnectionFactory.obtainConnection(FailoverClientConnectionFactory.java:110) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:63) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
... 84 common frames omitted
Wrapped by: org.springframework.messaging.MessagingException: Failed to obtain connection; nested exception is java.nio.channels.UnresolvedAddressException
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:66) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$1.createForPool(CachingClientConnectionFactory.java:58) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.util.SimplePool.doGetItem(SimplePool.java:188) ~[spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.util.SimplePool.getItem(SimplePool.java:169) ~[spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory.obtainConnection(CachingClientConnectionFactory.java:133) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.connection.AbstractClientConnectionFactory.getConnection(AbstractClientConnectionFactory.java:54) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.ip.tcp.TcpOutboundGateway.handleRequestMessage(TcpOutboundGateway.java:115) ~[spring-integration-ip-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:286) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:245) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:231) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:154) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:102) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:286) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:245) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:150) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:45) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.sendAndReceive(AbstractMessagingTemplate.java:42) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:79) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.messaging.core.AbstractMessagingTemplate.convertSendAndReceive(AbstractMessagingTemplate.java:70) [spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:321) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceive(MessagingGatewaySupport.java:298) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:414) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.doInvoke(GatewayProxyFactoryBean.java:374) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:365) [spring-integration-core-4.1.4.RELEASE.jar:na]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at com.sun.proxy.$Proxy78.getReferenceData(Unknown Source) [na:na]
at com.jpmorgan.cm.tpm.refdata.client.ReferenceDataServiceImpl.getHolidayCalendar(ReferenceDataServiceImpl.java:54) [tpm-ref-data-client-0.6.0-SNAPSHOT.jar:na]
at com.jpmorgan.cm.tpm.refdata.client.ReferenceDataServiceImpl.getHolidayCalendar(ReferenceDataServiceImpl.java:48) [tpm-ref-data-client-0.6.0-SNAPSHOT.jar:na]
at com.jpmorgan.cm.tpm.refdata.client.FailoverIT.should_failover_to_second_server(FailoverIT.java:55) [test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) [junit-4.12.jar:4.12]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.12.jar:4.12]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) [junit-4.12.jar:4.12]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.12.jar:4.12]
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:73) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:73) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:224) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) [junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) [junit-4.12.jar:4.12]
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363) [junit-4.12.jar:4.12]
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163) [spring-test-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) [surefire-junit4-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) [surefire-junit4-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) [surefire-junit4-2.12.4.jar:2.12.4]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) [surefire-api-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) [surefire-booter-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) [surefire-booter-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) [surefire-booter-2.12.4.jar:2.12.4]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) [surefire-booter-2.12.4.jar:2.12.4]

1 个答案:

答案 0 :(得分:0)

我认为我们已经测试了缓存故障转移和故障转移缓存,但似乎我们只支持前者(缓存故障转移)......

https://github.com/spring-projects/spring-integration/pull/848

你有什么理由不能以这种方式连接工厂吗?

请打开JIRA问题,以便我们可以支持两种方式,或者至少检测不起作用的配置。