Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
[MULE-8251] HTTP connector throws exception when WSC response is received Created: 21/Jan/15 Updated: 02/Sep/15 Resolved: 05/May/15 Status: Project: Component/s: Affects Version/s: Fix Version/s: Closed Mule Modules: HTTP, Modules: WS Consumer 3.6.0 Type: Reporter: Resolution: Labels: Remaining Estimate: Time Spent: Original Estimate: Bug Josh Rosso Fixed esb-backlog, target-3.7 Not Specified Attachments: http-exception-when-receiving-xml-stream.zip 1.png screenshot-2.png screenshot-3.png Issue Links: Related relates to MULE-8917 JMS transformer is selected even when... 3.6.3 (EE Only), 3.7.0 Priority: Assignee: Votes: Critical Andres Gregoire 0 Not Specified Not Specified screenshotscreenshot-4.png Closed Medium User impact: Similar Issues: Fix Release Date: 9/Jul/15 Description WS Consumer response type, org.mule.module.ws.consumer.NamespaceRestorerXMLStreamReader , is not abl be sent to the new HTTP Connector endpoint in the response phase. Previously WSC responses could be seen as a string representation of the XML when sent to the old http connec (see screenshot-1 and screenshot-2) The new HTTP consumer now throws an exception. It appears as if it's unable to find an appropriate transformer screenshot-3 and 4). The stack trace is: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Started app 'deltalab' + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ WARN 2015-01-21 13:41:22,018 [[deltalab].HTTP_Listener_Configuration.worker.01] org.jetel.exception.ConfigurationStatus: Issue in component [XML WRITER:EXT_XML_WRITER0] Invalid mapping (Port binding to a root element may produce invalid XML file. Set 'Records per file' or 'Max nu of records' component attributes to '1'.) ERROR 2015-01-21 13:41:23,032 [[deltalab].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: ******************************************************************************** Message : This transformer needs a valid endpoint (java.lang.IllegalStateException) Code : MULE_ERROR--2 -------------------------------------------------------------------------------Exception stack is: 1. This transformer needs a valid endpoint (java.lang.IllegalStateException) org.mule.transport.jms.transformers.AbstractJmsTransformer:203 (null) 2. This transformer needs a valid endpoint (java.lang.IllegalStateException) (org.mule.api.transformer.TransformerException) org.mule.transport.jms.transformers.AbstractJmsTransformer:79 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerException.html) -------------------------------------------------------------------------------Root Exception stack trace: java.lang.IllegalStateException: This transformer needs a valid endpoint at org.mule.transport.jms.transformers.AbstractJmsTransformer.getSession(AbstractJmsTransformer.java:203) at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformToMessage(AbstractJmsTransformer.jav at org.mule.transport.jms.transformers.ObjectToJMSMessage.transformMessage(ObjectToJMSMessage.java:54 + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** Comments Comment by Alejandro Sequeira [ 02/Feb/15 ] Josh Rosso, please provide an xml configuration and all we need to reproduce the issue. Thanks. Comment by Josh Rosso [ 07/Feb/15 ] Attached project. Exception has changed, but still throwing exceptions when trying to resolve the transformer. Comment by Alejandro Sequeira [ 09/Feb/15 ] Josh Rosso, I don't understand why AbstractJmsTransformer appears in the stack trace. Did you try running the same application in Mule Standalone? When I exercise the application you attached I get: Exception stack is: 1. There are two transformers that are an exact match for input: "class org.apache.cxf.staxutils.DepthXMLStreamReader", output: "class [B". Transformers are: "XmlToW3CDocument(class org.mule.module.xml.transformer.XmlToDomDocument)" and "_XmlToXMLStreamReader(class org.mule.module.xml.transformer.XmlToXMLStreamReader)" (org.mule.api.registry.ResolverException) org.mule.registry.TypeBasedTransformerResolver:166 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/registry/ResolverException.html) Is this the issue you are trying to report? Comment by German Solis [ 27/Feb/15 ] Alejandro Sequeira Ale, I've seen the original "This transformer needs a valid endpoint" exception in my environment. Basically, the issue is that the new HTTP Module doesn't apply the default MuleMessageToHttpResponse response transformer, but relies on the auto discovery mechanism to find a transformer that accepts an Object as input and a byte array as output. This search will find two candidates, the ObjectToByteArray transformer and the ObjectToJMSMessage transformer. Now, depending on how these classes are loaded, Mule will try to use one or the other, if we use the ObjectToByteArray everything is fine, however if the ObjectToJMSMessage is chosen you'll see this exception. Unfortunately there is no way to consistently reproduce the issue, because it depends on how these classes are loaded (maybe copying the jms transport jar to the lib/user folder ? ) Thanks Generated at Sun May 14 15:27:47 CDT 2017 using JIRA 7.2.4#72006sha1:91606a849e49df24789f9d9a6614de45c98c37a8.