Error happens when undeploying SwitchYard application with transformers
Issue
- I’m having trouble with undeploying SwitchYard applications with pending requests and their response transformations.
- It seems that after the JBoss FSW waits for all requests to be completed and undeploys the applications, all response transformations are skipped.
-
As an example, I have two simple SwitchYard applications: Hello and World.
- The Hello application communicates with the World application using a SCA Binding.
- The World application contains a bean that returns a
WorldOutputobject, but since the SCA Binding returns aString, I created theSCATransformerclass to transform the response into aString. - All requests to the World application will take longer than 15 seconds, because it contains a
Thread.sleepcommand. - After Hello application received a request and called the World application, I tried to undeploy the World application and the JBoss FSW waited for 30 seconds for all pending requests to be completed.
-
Afterwards, the application was undeployed and I got this exception:
org.switchyard.HandlerException: SWITCHYARD014011: Transformations not applied. Required payload type of 'java:java.lang.String'. Actual payload type is 'java:com.example.switchyard.interfaces.WorldOutput'. You must define and register a Transformer to transform between these types. -
The Hello application received a response that was not transformed.
- Does this exception make sense or is it a bug? If it’s not a bug, is there any workaround?
Environment
- Red Hat JBoss Fuse
- 6.2.x
- Red Hat JBoss Fuse Service Works (FSW)
- 6.0.x
- SwitchYard
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
