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

Element Id not unique in AbstractBindingBuilder

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.7, 2.6.11
    • Fix Version/s: 2.6.12, 2.7.9
    • Component/s: JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hi All,
      We are facing duplicate issues running CXF in a heavy multi-thread application. It's very hard to replicate it but It's happening creating the id in the method AbstractBindingBuilder.addWsuIdToElement(). Right now hashCode is being used (id="Id-" + elem.hashCode()) for it.

      Although we did the test for CXF 2.6.2, we believe the issue remains as CXF is still using hasCode() there to generate the IDS.

      Are we missing something or a fix is required here to ensure a unique ID?

      This is the fix that we added in our environment:
      //id = "Id-" + elem.hashCode();
      id = "Id-" + UUID.randomUUID().toString().replace("-", "").toUpperCase();

      Below, is the trace that we got adding some "prints" (patch for the prints is attached).

      ---------------------
      StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-945293019 for Element soap:Body
      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1860657187 for Element soap:Body
      StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-455749827 for Element To
      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1860657187 for Element To
      StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-408474295 for Element ReplyTo
      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1869740253 for Element ReplyTo
      StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-455749827 for Element soap:Body
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-945293019 for Element soap:Body
      StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-620811627 for Element To
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1505457863 for Element To
      StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-577974487 for Element ReplyTo
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-948667628 for Element ReplyTo
      StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1338228468 for Element MessageID
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1009626645 for Element MessageID
      StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1526727568 for Element Action
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1575621020 for Element Action
      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-605298438 for Element MessageID
      StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-596225620 for Element MessageID
      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-841631983 for Element Action
      StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1981439139 for Element Action
      StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - Executing doSignatureDK ***
      id=Id-945293019
      id=Id-1505457863
      id=Id-948667628
      id=Id-1009626645
      id=Id-1575621020
      id=TS-10599689

      StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - Executing doSignatureDK ***
      id=Id-1860657187
      id=Id-1860657187
      id=Id-1869740253
      id=Id-605298438
      id=Id-841631983
      id=TS-10599690

      Thanks,
      Freddy

        Attachments

        1. LOGGING-for-DUPLICATE.patch
          3 kB
          Freddy Exposito

          Activity

            People

            • Assignee:
              coheigea Colm O hEigeartaigh
              Reporter:
              freddy.exposito Freddy Exposito
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: