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

ClassCastException in WS-RM when RMP 200702 assertions are used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.2
    • 2.5.6, 2.6.3
    • WS-* Components
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: