You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freddy Exposito (JIRA)" <ji...@apache.org> on 2013/12/30 19:53:50 UTC

[jira] [Updated] (CXF-5480) Element Id not unique in AbstractBindingBuilder

     [ https://issues.apache.org/jira/browse/CXF-5480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freddy Exposito updated CXF-5480:
---------------------------------

    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

  was:
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). 

---------------------
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-945293019 for Element soap:Body
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1860657187 for Element soap:Body
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-455749827 for Element To
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1860657187 for Element To
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-408474295 for Element ReplyTo
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1869740253 for Element ReplyTo
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-455749827 for Element soap:Body
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-945293019 for Element soap:Body
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-620811627 for Element To
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1505457863 for Element To
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-577974487 for Element ReplyTo
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-948667628 for Element ReplyTo
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1338228468 for Element MessageID
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1009626645 for Element MessageID
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@58c8f5b1 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1526727568 for Element Action
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@717a6500 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1575621020 for Element Action
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-605298438 for Element MessageID
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-596225620 for Element MessageID
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@1a7d1d34 Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-841631983 for Element Action
imageon.router.pipeline.sender.internal.work.dicomws.StoreTask@6628dafb Mon Dec 23 08:31:35 CST 2013-ICCLOG - In AbstractBindingBuilder, created id =Id-1981439139 for Element Action
imageon.router.pipeline.sender.internal.work.dicomws.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

imageon.router.pipeline.sender.internal.work.dicomws.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


> Element Id not unique in AbstractBindingBuilder
> -----------------------------------------------
>
>                 Key: CXF-5480
>                 URL: https://issues.apache.org/jira/browse/CXF-5480
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.7.7, 2.6.11
>            Reporter: Freddy Exposito
>            Priority: Minor
>         Attachments: LOGGING-for-DUPLICATE.patch
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)