Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4517

ClassCastException in WS-RM when RMP 200702 assertions are used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.2
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: WS-* Components
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      RM11AssertionBuilder needs to be included in the bus extension of cxf-rt-ws-rm.

      Without this assertion builder, RM assertions of QName

      {http://docs.oasis-open.org/ws-rx/wsrmp/200702}

      RMAssertion are not instantiated correctly and this may lead to ClassCastException in some places where the assertions are retrieved.

      java.lang.ClassCastException: org.apache.neethi.builders.PolicyContainingPrimitiveAssertion cannot be cast to org.apache.cxf.ws.policy.builder.jaxb.JaxbAssertion
      at org.apache.cxf.ws.rm.policy.RM10PolicyUtils.getAssertion(RM10PolicyUtils.java:227) ~[na:na]
      at org.apache.cxf.ws.rm.policy.RM10PolicyUtils.getRMAssertion(RM10PolicyUtils.java:81) ~[na:na]
      at org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl$ResendCandidate.<init>(RetransmissionQueueImpl.java:492) ~[na:na]
      at org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.cacheUnacknowledged(RetransmissionQueueImpl.java:299) ~[na:na]
      at org.apache.cxf.ws.rm.soap.RetransmissionQueueImpl.addUnacknowledged(RetransmissionQueueImpl.java:105) ~[na:na]

      So, we need to add this builder in the bus extension and also need to change RM10PolicyUtils so that it does not try to class-cast the 200702 assertion to the 200502 assertion.

        Attachments

          Activity

            People

            • Assignee:
              ay Akitoshi Yoshida
              Reporter:
              ay Akitoshi Yoshida
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: