Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2372

[DROOLS-437] ClassCastException is thrown while sending SOAP message to the Drools Camel Server application's webservice endpoint

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • CR1
    • Hide
      Apache Camel keeps some objects in the message header for applications to use. Drools-Camel code does not expect that and hence a ClassCastException is thrown when trying to send a SOAP message to the Drools Camel Server application's webservice endpoint. This has now been fixed in the latest version of BRMS.
      Show
      Apache Camel keeps some objects in the message header for applications to use. Drools-Camel code does not expect that and hence a ClassCastException is thrown when trying to send a SOAP message to the Drools Camel Server application's webservice endpoint. This has now been fixed in the latest version of BRMS.

    Description

      Description of problem:

      • This is issue is mirrored from the following Community JIRA [1] as it is faced while using BRMS 6.0.1 product libraries too.

      [1] https://issues.jboss.org/browse/DROOLS-437

      Version-Release number of selected component (if applicable):

      • BRMS 6.0.1

      How reproducible:

      • While trying out the drools-camel-server-example shared in the Community Github project branch [1] and sending a SOAP message to the webservice endpoint the "java.lang.ClassCastException: org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String" exception takes place . This issue is reproducible in BRMS 6.0.1 too with the help of productised jars from the same release.

      [1] https://github.com/droolsjbpm/droolsjbpm-integration/tree/6.0.x/drools-camel-server-example

      Steps to Reproduce:
      1. Firstly build the project after downloading it from here [1] and deploy it in BRMS 6.0.1 installation.
      2. Then send similar SOAP request messages like these to the webservice endpoint [2]
      ~~~
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:soap="http://soap.jax.drools.org/">;
      <soapenv:Header/>
      <soapenv:Body>
      <soap:execute>
      <!-Optional:->
      <soap:arg0>hello</soap:arg0>
      </soap:execute>
      </soapenv:Body>
      </soapenv:Envelope>
      ~~~
      3. Following SOAP fault is received
      ~~~
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">;
      <soap:Body>
      <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String</faultstring>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
      ~~~

      [1] https://github.com/droolsjbpm/droolsjbpm-integration/tree/6.0.x/drools-camel-server-example
      [2] http://localhost:8080/drools-camel-server-example-6.0.3-SNAPSHOT/kservice/soap

      Actual results:

      • The following exception gets thrown.
        ~~~
        18:17:41,606 ERROR [org.apache.camel.processor.DefaultErrorHandler] (http-/localhost:8080-2) Failed delivery for (MessageId: ID-vm22-gsslab-pnq-redhat-com-56326-1399546611115-0-7 on ExchangeId: ID-vm22-gsslab-pnq-redhat-com-56326-1399546611115-0-8). Exhausted after delivery attempt: 1 caught: java.lang.ClassCastException: org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String: java.lang.ClassCastException: org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String
        at org.kie.jax.soap.PreCxfTransportSoapProcessor.process(PreCxfTransportSoapProcessor.java:36) [kie-camel-6.0.3-SNAPSHOT.jar:6.0.3-SNAPSHOT]
        at org.kie.camel.component.KiePolicy$KieProcess.process(KiePolicy.java:323) [kie-camel-6.0.3-SNAPSHOT.jar:6.0.3-SNAPSHOT]
        at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.10.3.jar:2.10.3]
        ...
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86) [camel-core-2.10.3.jar:2.10.3]
        at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:125) [camel-cxf-2.10.3.jar:2.10.3]
        at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75) [camel-cxf-2.10.3.jar:2.10.3]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-bundle-jaxrs-2.6.8.jar:2.6.8]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_51]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51]
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-bundle-jaxrs-2.6.8.jar:2.6.8]
        ...

      18:17:41,610 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-/localhost:8080-2) Application

      {http://soap.jax.drools.org/}

      CommandExecutor has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String
      at org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer.java:200) [camel-cxf-2.10.3.jar:2.10.3]
      at org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:178) [camel-cxf-2.10.3.jar:2.10.3]
      at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(CxfConsumer.java:130) [camel-cxf-2.10.3.jar:2.10.3]
      at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75) [camel-cxf-2.10.3.jar:2.10.3]
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-bundle-jaxrs-2.6.8.jar:2.6.8]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_51]
      at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_51]
      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-bundle-jaxrs-2.6.8.jar:2.6.8]
      ...
      Caused by: java.lang.ClassCastException: org.apache.cxf.binding.soap.SoapMessage cannot be cast to java.lang.String
      at org.kie.jax.soap.PreCxfTransportSoapProcessor.process(PreCxfTransportSoapProcessor.java:36) [kie-camel-6.0.3-SNAPSHOT.jar:6.0.3-SNAPSHOT]
      at org.kie.camel.component.KiePolicy$KieProcess.process(KiePolicy.java:323) [kie-camel-6.0.3-SNAPSHOT.jar:6.0.3-SNAPSHOT]
      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) [camel-core-2.10.3.jar:2.10.3]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.3.jar:2.10.3]
      ...
      ~~~

      Expected results:

      • Would have successfully received a SOAP response.

      Additional info:

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            rhn-support-mhussain Musharraf Hussain
            Archiver:
            rhn-support-ceverson Clark Everson
            Marek Winkler Marek Winkler (Inactive)
            Marek Winkler Marek Winkler (Inactive)
            etirelli, Rajesh Rajasekaran, Vikram Goyal (Inactive)

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty