Closed GoogleCodeExporter closed 9 years ago
Example use cases where this is a problem:
1. WMQ (JMS-compliant) inbound --> WMQ (native) outbound
2. SFTP (using keys) inbound --> SFTP (using username/password) outbound
Original comment by hakan.dahl@gmail.com
on 7 May 2012 at 9:33
Did you specify what file-connector to use also for the
mySample-teststub-service once you introduced two file-connectors in the code?
If not, I guess that you simple have broken the test yourself by not doing so
:-)
But it should be simple to fix by specifying what file connector to use also on
the mySample-teststub-service, right?
Regards,
Magnus.
Original comment by magnus.l...@gmail.com
on 17 May 2012 at 6:13
Original comment by magnus.l...@gmail.com
on 17 May 2012 at 6:47
See issue 256 "Generated flows should always specify a connector-ref for
endpoints" for a related issue regarding usage of explicit connector-refs on
endpoints instead of relying on the default connector.
I guess that issue will help you a bin in this case, you however always needs
to consider all your endpoints anyhow when adding a new connector for a
transport, including the test-endpoints. Even though you will not be required
to update them all once issue 256 is completed :-)
I set this as blocked by issue 256 an continue the work there.
Original comment by magnus.l...@gmail.com
on 20 May 2012 at 6:50
No action will be taken for this issue, see related issue 256.
Original comment by magnus.l...@gmail.com
on 20 May 2012 at 6:53
Sorry for explaining a a non-problem. I forgot to reference the connector in
the stub in my example and the above stacktrace is the wrong one. If you put a
connector-ref on the stub-endpoint (mySample-teststub-service) you will get the
problem that I really wanted to report. I hope that this issue will be
reopened. This is the description I should have posted in the first case. Issue
256 will in my opinion not solve this problem.
What steps will reproduce the problem?
1. Create a component and a file-to-file service
2. Declare two file connectors in the service file and create a reference from
the inbound-endpoint to one of them and and a reference from the
outbound-endpoint to the other connector.
3. Add a connector-ref to the stub endpoint
4. Run the integration test.
What is the expected output? What do you see instead?
I would expect the tests to run, since all endpoints have references to
connectors, but there is an exception thrown.
java.lang.RuntimeException:
org.mule.transport.service.TransportFactoryException: There are at least 2
connectors matching protocol "file", so the connector to use must be specified
on the endpoint using the 'connector' property/attribute. Connectors in your
configuration that support "file" are: c1, c2,
(java.lang.IllegalStateException)
at org.soitoolkit.commons.mule.test.DispatcherMuleClientImpl.doDispatch(DispatcherMuleClientImpl.java:34)
at org.soitoolkit.commons.mule.test.junit4.AbstractTestCase.dispatchAndWaitForServiceComponent(AbstractTestCase.java:221)
at org.soitoolkit.commons.mule.test.junit4.AbstractTestCase.dispatchAndWaitForServiceComponent(AbstractTestCase.java:274)
at org.sample.sample1.mysample.MySampleIntegrationTest.testMySample_ok(MySampleIntegrationTest.java:174)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)
at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:62)
Caused by: org.mule.transport.service.TransportFactoryException: There are at
least 2 connectors matching protocol "file", so the connector to use must be
specified on the endpoint using the 'connector' property/attribute. Connectors
in your configuration that support "file" are: c1, c2,
(java.lang.IllegalStateException)
at org.mule.endpoint.AbstractEndpointBuilder.getConnector(AbstractEndpointBuilder.java:635)
at org.mule.endpoint.AbstractEndpointBuilder.getDefaultConnector(AbstractEndpointBuilder.java:452)
at org.mule.endpoint.AbstractEndpointBuilder.getConnector(AbstractEndpointBuilder.java:447)
at org.mule.endpoint.AbstractEndpointBuilder.doBuildOutboundEndpoint(AbstractEndpointBuilder.java:251)
at org.mule.endpoint.AbstractEndpointBuilder.buildOutboundEndpoint(AbstractEndpointBuilder.java:122)
at org.mule.endpoint.DefaultEndpointFactory.getOutboundEndpoint(DefaultEndpointFactory.java:89)
at org.mule.module.client.MuleClient.getOutboundEndpoint(MuleClient.java:748)
at org.mule.module.client.MuleClient.dispatch(MuleClient.java:268)
at org.mule.module.client.MuleClient.dispatch(MuleClient.java:254)
at org.soitoolkit.commons.mule.test.DispatcherMuleClientImpl.doDispatch(DispatcherMuleClientImpl.java:31)
... 15 more
Caused by: java.lang.IllegalStateException: There are at least 2 connectors
matching protocol "file", so the connector to use must be specified on the
endpoint using the 'connector' property/attribute. Connectors in your
configuration that support "file" are: c1, c2,
at org.mule.transport.service.TransportFactory.getConnectorByProtocol(TransportFactory.java:179)
at org.mule.endpoint.AbstractEndpointBuilder.getConnector(AbstractEndpointBuilder.java:625)
... 24 more
What version of the product are you using? On what operating system?
0.5.0
Please provide any additional information below.
The MuleClient creates a dynamic outbound endpoint in order to dispatch the
test message on the inbound endpoint. The outbound endpoint needs a connector,
but since there are two connectors defined in the component the EndpointBuilder
gets confused. As far as I can see from the Mule source code there is no way to
define which of the connectors to use, so it might be a case for a issue on
Mule.
The endpoint is created in method
org.mule.module.client.MuleClient.getOutboundEndpoint(String,
MessageExchangePattern, Integer)
Original comment by par.wena...@gmail.com
on 20 May 2012 at 6:54
Attachments:
Move all closed v0.5.1 issues to v0.6.0
Original comment by magnus.l...@gmail.com
on 26 Jul 2012 at 4:24
Original issue reported on code.google.com by
par.wena...@gmail.com
on 27 Apr 2012 at 2:35