Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4454

Custom TypeConverter Resolution Fails when Profile Containing camel-hl7 is deployed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • jboss-fuse-6.3
    • jboss-fuse-6.1-patches
    • Camel, Fabric8 v1
    • None
    • % %
    • Hide
      • Install JBoss Fuse 6.1.0 GA
      • Create an admin user
      • Create a Fabric with fabric:create --wait-for-provisioning
      • Install Security Advisory Patch R2 according to instructions
      • Install Patch R2P6 according to instructions
      • In Hawtio create a new profile (like msg-service) and add the attached ConnectionFactoryService bundle to the profile
      • Add the profile to the fabric container
      • Create a second profile (like acme-test) and add the attached acme-converter-test bundle to the profile
      • Add the profile to the fabric container
      • Go to the container view / ActiveMq tab and locate the q.acme.person.notification.in queue in the tree
      • Select the "Send" option and click the "+Header" button to add a header to the message with the values "JMSType" and "AcmePerson"
      • Paste the unquoted text
        [Person{LN:Smith|FN:John|MN:Jacob-JJJJJ|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Somewhere/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}]

        as the body and click "Send Message" to send the message to the queue

      • The message is processed successfully, as evidenced by statements like:
      2015-11-18 17:29:09,593 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: LN:Smith
      2015-11-18 17:29:09,593 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: FN:John
      2015-11-18 17:29:09,593 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: MN:Jacob-Jingleheimer
      2015-11-18 17:29:09,593 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ID:000-00-0000
      2015-11-18 17:29:09,594 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: GN:M
      2015-11-18 17:29:09,594 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: AGE:45
      2015-11-18 17:29:09,594 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: MS:S
      2015-11-18 17:29:09,594 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}]
      2015-11-18 17:29:09,594 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmePerson   161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: PH:(000)111-2222
      2015-11-18 17:29:09,595 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmeAddress  108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: STR:100 Main St
      2015-11-18 17:29:09,595 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmeAddress  108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: CTY:Cleveland
      2015-11-18 17:29:09,595 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmeAddress  108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ST:OH
      2015-11-18 17:29:09,595 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmeAddress  108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: PC:44113
      2015-11-18 17:29:09,595 | INFO  | notification.in] | AcmePerson                       | com.redhat.test.acme.AcmeAddress  108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: CTRY:USA
      

      in the log.

      • Create a third profile and add camel-hl7 and hapi-osgi-base to the profile:
      mvn:org.apache.camel/camel-hl7/2.12.0.redhat-611423 
      mvn:ca.uhn.hapi/hapi-osgi-base/2.1
      
      • Add the profile to the fabric container
      • Retry sending the message as above and now the exception occurs.
      Show
      Install JBoss Fuse 6.1.0 GA Create an admin user Create a Fabric with fabric:create --wait-for-provisioning Install Security Advisory Patch R2 according to instructions Install Patch R2P6 according to instructions In Hawtio create a new profile (like msg-service) and add the attached ConnectionFactoryService bundle to the profile Add the profile to the fabric container Create a second profile (like acme-test) and add the attached acme-converter-test bundle to the profile Add the profile to the fabric container Go to the container view / ActiveMq tab and locate the q.acme.person.notification.in queue in the tree Select the "Send" option and click the "+Header" button to add a header to the message with the values "JMSType" and "AcmePerson" Paste the unquoted text [Person{LN:Smith|FN:John|MN:Jacob-JJJJJ|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Somewhere/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}] as the body and click "Send Message" to send the message to the queue The message is processed successfully, as evidenced by statements like: 2015-11-18 17:29:09,593 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: LN:Smith 2015-11-18 17:29:09,593 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: FN:John 2015-11-18 17:29:09,593 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: MN:Jacob-Jingleheimer 2015-11-18 17:29:09,593 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ID:000-00-0000 2015-11-18 17:29:09,594 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: GN:M 2015-11-18 17:29:09,594 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: AGE:45 2015-11-18 17:29:09,594 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: MS:S 2015-11-18 17:29:09,594 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}] 2015-11-18 17:29:09,594 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmePerson 161 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: PH:(000)111-2222 2015-11-18 17:29:09,595 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmeAddress 108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: STR:100 Main St 2015-11-18 17:29:09,595 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmeAddress 108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: CTY:Cleveland 2015-11-18 17:29:09,595 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmeAddress 108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: ST:OH 2015-11-18 17:29:09,595 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmeAddress 108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: PC:44113 2015-11-18 17:29:09,595 | INFO | notification.in] | AcmePerson | com.redhat.test.acme.AcmeAddress 108 | 274 - acme-converter-test - 1.1.0.SNAPSHOT | Field: CTRY:USA in the log. Create a third profile and add camel-hl7 and hapi-osgi-base to the profile: mvn:org.apache.camel/camel-hl7/2.12.0.redhat-611423 mvn:ca.uhn.hapi/hapi-osgi-base/2.1 Add the profile to the fabric container Retry sending the message as above and now the exception occurs.
    • 6.3 Sprint 1 (4-Jan->29-Jan)

      A profile containing a bundle with a custom TypeConverter is deployed and tested with a route referencing the converters. The route and converter resolution test good.

      A second profile containing mvn:org.apache.camel/camel-hl7/2.12.0.redhat-611423 and dependency mvn:ca.uhn.hapi/hapi-osgi-base/2.1 or mvn:ca.uhn.hapi/hapi-osgi-base/2.0 is deployed.

      Now testing the route using the custom TypeConverter fails with:

      org.apache.camel.InvalidPayloadException: No body available of type: com.redhat.test.xml.Person but has value: [Person{LN:Smith|FN:John|MN:Jacob-Jingleheimer|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}] of type: com.redhat.test.acme.AcmePerson on: JmsMessage[JmsMessageID: ID:dhawkins.remote.csb-49841-1447879627778-1:1:1:1:1]. Caused by: No type converter available to convert from type: com.redhat.test.acme.AcmePerson to the required type: com.redhat.test.xml.Person with value [Person{LN:Smith|FN:John|MN:Jacob-Jingleheimer|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}]. Exchange[JmsMessage[JmsMessageID: ID:dhawkins.remote.csb-49841-1447879627778-1:1:1:1:1]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: com.redhat.test.acme.AcmePerson to the required type: com.redhat.test.xml.Person with value [Person{LN:Smith|FN:John|MN:Jacob-Jingleheimer|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}]]
      	at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:78)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:111)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[206:org.apache.camel.camel-jms:2.12.0.redhat-611431]
      	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:243)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[184:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_1]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_91]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_91]
      	at java.lang.Thread.run(Thread.java:745)[:1.7.0_91]
      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: com.redhat.test.acme.AcmePerson to the required type: com.redhat.test.xml.Person with value [Person{LN:Smith|FN:John|MN:Jacob-Jingleheimer|ID:000-00-0000|GN:M|AGE:45|MS:S|ADDR:[Address{STR:100 Main St/CTY:Cleveland/ST:OH/PC:44113/CTRY:USA}]|PH:(000)111-2222}]
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:181)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      	at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:123)[150:org.apache.camel.camel-blueprint:2.12.0.redhat-611423]
      	at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)[142:org.apache.camel.camel-core:2.12.0.redhat-611433]
      

            janstey@redhat.com Jonathan Anstey
            rhn-support-dhawkins Duane Hawkins
            Roman Jakubco Roman Jakubco (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: