Should a deployment fail if duplicate Transformers are detected
beve Aug 5, 2011 9:08 AMHi,
I'm running into this issue at the moment upon deployment of a quickstart I get the following error in AS 7:
15:00:36,315 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."switchyard-quickstarts-hornetq-binding-0.2.0-SNAPSHOT.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."switchyard-quickstarts-hornetq-binding-0.2.0-SNAPSHOT.jar".SwitchYardService: org.switchyard.exception.SwitchYardException: Failed to register Transformer 'org.switchyard.component.hornetq.transformer.ByteArrayToStringTransformer(java:byte[], java:java.lang.String)'. A Transformer for these types is already registered: 'org.switchyard.component.camel.transformer.CamelTransformer(java:byte[], java:java.lang.String)'. at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:90) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26] at java.lang.Thread.run(Thread.java:680) [:1.6.0_26] Caused by: org.switchyard.exception.SwitchYardException: Failed to register Transformer 'org.switchyard.component.hornetq.transformer.ByteArrayToStringTransformer(java:byte[], java:java.lang.String)'. A Transformer for these types is already registered: 'org.switchyard.component.camel.transformer.CamelTransformer(java:byte[], java:java.lang.String)'. at org.switchyard.transform.TransformerRegistryLoader.registerTransformers(TransformerRegistryLoader.java:88) at org.switchyard.transform.TransformerRegistryLoader.loadOOTBTransforms(TransformerRegistryLoader.java:131) at org.switchyard.deploy.internal.AbstractDeployment.init(AbstractDeployment.java:148) at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:89) at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:83) ... 5 more
Now this is correct and I think this situation might arise now and again. In this case the hornetq component has a transformer and so does the camel component for the same types. But if the camel component is not installed as a subsystem the hornetq one would be used instead.
Could we change this into logging a warning instead so that the deployment does not fail?
Regards,
/Daniel