You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org> on 2011/09/21 17:17:08 UTC

[jira] [Created] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
-----------------------------------------------------------------------------------------------

                 Key: AXIS2-5152
                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
             Project: Axis2
          Issue Type: Bug
            Reporter: Udayanga Wickramasinghe


Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
Exception in thread "Timer-3" java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
        at java.util.HashMap$EntryIterator.next(HashMap.java:834)
        at java.util.HashMap$EntryIterator.next(HashMap.java:832)
        at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
epositoryListener.java:270)
        at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
ryListener.java:253)
        at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
ryListener.java:365)
        at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
chedulerTask.java:73)
        at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
.java:94)
        at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
n(Scheduler.java:93)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Commented] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109569#comment-13109569 ] 

Udayanga Wickramasinghe commented on AXIS2-5152:
------------------------------------------------

this is also relate to jira https://wso2.org/jira/browse/ESBJAVA-797

> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Udayanga Wickramasinghe updated AXIS2-5152:
-------------------------------------------

    Component/s: kernel

> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Issue Comment Edited] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122685#comment-13122685 ] 

Udayanga Wickramasinghe edited comment on AXIS2-5152 at 10/7/11 10:52 AM:
--------------------------------------------------------------------------

i am attaching the patch which uses concurrent Hash Map for this issue . please review and commit , the most appropriate solution. i think both soultions are correct , but personally i prefer the patch i submitted earlier since it would be the most simple and consistent solution with the existing implementation :)
                
      was (Author: udayangaw@wso2.com):
    i am attaching the patch which uses concurrent Hash Map for this issue . please review and commit , the most appropriate solution. personally i prefer the patch i submitted earlier since it would be the most simple and consistent solution with the existing implementation :)
                  
> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>         Attachments: AXIS2-5152.patch, AXIS2-5152_update.patch
>
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Udayanga Wickramasinghe updated AXIS2-5152:
-------------------------------------------

    Attachment: AXIS2-5152.patch

i am including a patch for this issue. please review and commit.

> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>         Attachments: AXIS2-5152.patch
>
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Updated] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Udayanga Wickramasinghe updated AXIS2-5152:
-------------------------------------------

    Attachment: AXIS2-5152_update.patch

i am attaching the patch which uses concurrent Hash Map for this issue . please review and commit , the most appropriate solution. personally i prefer the patch i submitted earlier since it would be the most simple and consistent solution with the existing implementation :)
                
> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>         Attachments: AXIS2-5152.patch, AXIS2-5152_update.patch
>
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] [Issue Comment Edited] (AXIS2-5152) RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap

Posted by "Udayanga Wickramasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-5152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109569#comment-13109569 ] 

Udayanga Wickramasinghe edited comment on AXIS2-5152 at 9/21/11 3:17 PM:
-------------------------------------------------------------------------

this also relate to jira https://wso2.org/jira/browse/ESBJAVA-797

      was (Author: udayangaw@wso2.com):
    this is also relate to jira https://wso2.org/jira/browse/ESBJAVA-797
  
> RepositoryListener ConcurrentModification Exception when accessing DeploymentEngine deployerMap
> -----------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-5152
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5152
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>            Reporter: Udayanga Wickramasinghe
>
> Axis2 DeploymentEngine deployerMap seems to be not thread safe. Following exception can be thrown when there is a high concurrent acceess scenario with multiple deployers in place..
> Exception in thread "Timer-3" java.util.ConcurrentModificationException
>         at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:834)
>         at java.util.HashMap$EntryIterator.next(HashMap.java:832)
>         at org.apache.axis2.deployment.RepositoryListener.loadOtherDirectories(R
> epositoryListener.java:270)
>         at org.apache.axis2.deployment.RepositoryListener.checkServices(Reposito
> ryListener.java:253)
>         at org.apache.axis2.deployment.RepositoryListener.startListener(Reposito
> ryListener.java:365)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(S
> chedulerTask.java:73)
>         at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask
> .java:94)
>         at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.ru
> n(Scheduler.java:93)
>         at java.util.TimerThread.mainLoop(Timer.java:512)
>         at java.util.TimerThread.run(Timer.java:462)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org