-
15. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
puttime Apr 11, 2013 12:44 PM (in response to kcbabo)No, I did not make any changes, other than try to create a new project.
I closed jBoss Dev Studio, and restarted, and cleaned the project.
I did that twice, and it worked the second time.
Ok, now the project has JCA end point.
I have attached the contents of the project.
But I get this error,
22:06:39,095 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] (Thread-3 (HornetQ-client-global-threads-15943630)) Failed to deliver message: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy38.onMessage(Unknown Source)
at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:278)
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:983)
at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:48)
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1113)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_17]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_17]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_17]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_17]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.7.0_17]
at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.7.0_17]
at org.switchyard.component.jca.EndpointProxy.delivery(EndpointProxy.java:193) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.jca.EndpointProxy.invoke(EndpointProxy.java:158) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
... 9 more
Caused by: org.switchyard.exception.SwitchYardException: org.switchyard.exception.SwitchYardException: Operation lang does not exist for service {urn:com.example.switchyard:episode9-hornetq-test2:1.0}HornetQTestServiceInterfacePortType
at org.switchyard.component.jca.endpoint.JMSEndpoint.onMessage(JMSEndpoint.java:56) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
... 15 more
Caused by: org.switchyard.exception.SwitchYardException: Operation lang does not exist for service {urn:com.example.switchyard:episode9-hornetq-test2:1.0}HornetQTestServiceInterfacePortType
at org.switchyard.internal.ServiceReferenceImpl.createExchange(ServiceReferenceImpl.java:139) [switchyard-runtime-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.jca.endpoint.AbstractInflowEndpoint.createExchange(AbstractInflowEndpoint.java:200) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.jca.endpoint.AbstractInflowEndpoint.createExchange(AbstractInflowEndpoint.java:210) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
at org.switchyard.component.jca.endpoint.JMSEndpoint.onMessage(JMSEndpoint.java:53) [switchyard-component-jca-0.8.0.Final.jar:0.8.0.Final]
... 15 more-
episode9-hornetq-test2.zip 10.7 KB
-
-
16. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
puttime Apr 11, 2013 12:51 PM (in response to puttime)I had made a small mistake in "HornetQClientTest.java" file.
I corrected it, and it works now.
I get the message in the server logs as: "episode9-test2:: Hello dippy"
-
episode9-hornetq-test2 (2).zip 10.7 KB
-
-
17. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
kcbabo Apr 11, 2013 12:56 PM (in response to puttime)You have an operation selector on your binding which executes an XPath that returns the value "lang". That means we look for an operation called "lang" on the service, which is what the error indicates. Your service has two operations: english and spanish. Try a test message with one of those as the value for <language>. You can probably tweak the test client just to do this:
String[] vals = { "dippy", "english" };
instead of this:
String[] vals = { "dippy", "lang" };
-
18. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
puttime Apr 11, 2013 1:18 PM (in response to kcbabo)Thanks for helping out,
I'm going to try another one with JMS binding (instead of JCA).
Any pointers you would like to give?
-
19. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
kcbabo Apr 11, 2013 1:28 PM (in response to puttime)If you use an operation selector then you are going to hit the same error you got before with slf4j not found. I have filed an issue to track it for 1.0:
https://issues.jboss.org/browse/SWITCHYARD-1405
If you get to that point, just attach your application to the thread and I can suggest some workarounds.
-
20. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
kcbabo Apr 11, 2013 1:34 PM (in response to kcbabo)Actually, forget what I just said. I just had another look at SwitchYardProducer and you should only hit that error if the operation selector cannot resolve an operation based on the expression you provided (e.g. xpath). I would give it a go with JMS and let us know if you run into any issues.
-
21. Re: Implementing "quickstart\jca-inflow-hornetq" sample.
puttime Apr 11, 2013 2:21 PM (in response to kcbabo)Ok, I gave it a shot with JMS, and it WORKED without any issues.
I have another question, let's say in the JMS project, I want to hook on to MyQueue2 (which was also used by the other JCA project).
I tried that, but the messages kept going to the JCA service, and not the JMS service.
i.e. if I send message to MyQueue2, I want it to go to both the services (JCA and JMS). How do I do it?
[I've created a new discussion for this, here: https://community.jboss.org/thread/223645]
Message was edited by: Put Time