Bug 1054809

Summary: JMS errror in mulitApp demo client
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: ExamplesAssignee: Keith Babo <kbabo>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Sedlacek <jsedlace>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, dlesage, kconner, oskutka, soa-p-jira
Target Milestone: CR2   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The Camel JmsBinding formerly expected the message body returned to be a DOMSource, causing it to convert the response into an InputStream and create a BytesMessage. The body is now a Node, causing it to choose a TextMessage. As a result, mvn exec:java throws an exception.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Pechanec 2014-01-17 14:05:14 UTC
mvn exec:java throws an exception
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
	at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassCastException: org.hornetq.jms.client.HornetQTextMessage cannot be cast to javax.jms.BytesMessage
	at org.switchyard.quickstarts.demo.multiapp.consumer.OrderIntakeClient.main(OrderIntakeClient.java:62)
	... 6 more

The test client expects ByteMessage but TextMessage is received instead of it.

Comment 1 kconner 2014-01-17 18:48:09 UTC
This occurs because the Camel JmsBinding now makes a different determination about the type of JMS message to be sent.

In ER8 the body returned was a DOMSource, causing it to convert the response into an InputStream and create a BytesMessage.  In CR1 the body is now a Node, causing it to choose a TextMessage.

This is probably due to SWITCHYARD-1920

Comment 2 kconner 2014-01-17 20:15:15 UTC
PR has been added for the changes

Comment 3 Jiri Pechanec 2014-01-24 10:52:49 UTC
Verified in CR2

Comment 4 JBoss JIRA Server 2014-06-16 23:50:47 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1933 to Closed

Comment 5 JBoss JIRA Server 2014-06-16 23:53:27 UTC
Keith Babo <kbabo> updated the status of jira SWITCHYARD-1920 to Closed