com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorRegistrationException: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification.

Atlassian JIRA | Luis Miranda | 6 years ago
  1. 0

    h3. Symptoms During startup, JIRA exhibits the following error within {{atlassian-jira.log}}: {noformat} 2012-08-06 17:32:43,456 http-80-1 ERROR anonymous 1052x3x3 - 10.24.2.1 /secure/TaskBoard.jspa [crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoaderImpl] Could not add a monitor for the directory with id: 10000 com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorRegistrationException: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification. at com.atlassian.crowd.manager.directory.monitor.poller.AbstractQuartzDirectoryPollerManager.addPoller(AbstractQuartzDirectoryPollerManager.java:29) at com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorManagerImpl.addMonitor(DirectoryMonitorManagerImpl.java:60) at com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoaderImpl.getNewDirectory(DbCachingRemoteDirectoryInstanceLoaderImpl.java:97) at com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader.getDirectory(CachingDirectoryInstanceLoader.java:41) at com.atlassian.crowd.directory.loader.DelegatingDirectoryInstanceLoader.getDirectory(DelegatingDirectoryInstanceLoader.java:70) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.getDirectoryImplementation(DirectoryManagerGeneric.java:271) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:283) at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:266) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:92) at com.atlassian.crowd.embedded.core.DelegatingCrowdService.getUser(DelegatingCrowdService.java:40) at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getUser(FilteredCrowdServiceImpl.java:43) at com.atlassian.jira.security.login.JiraSeraphAuthenticator.getUser(JiraSeraphAuthenticator.java:37) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromCookie(DefaultAuthenticator.java:437) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:327) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463) at com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification. at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:220) at com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:269) at com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:249) at com.atlassian.scheduler.OfBizJobStore.storeJobAndTrigger(OfBizJobStore.java:242) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:613) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:238) at com.atlassian.crowd.manager.directory.monitor.poller.AbstractQuartzDirectoryPollerManager.addPoller(AbstractQuartzDirectoryPollerManager.java:25) ... 93 more {noformat} h3. Resolution As in [the below comment|https://jira.atlassian.com/secure/ViewProfile.jspa?name=tcampbell]: {quote} This is caused by a race condition, when 2 (or more) threads try and access a directory at the same time before the Directory Instance has been instantiated. There appear to be no harmful side effects beyond the log messages. {quote}

    Atlassian JIRA | 6 years ago | Luis Miranda
    com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorRegistrationException: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification.
  2. 0

    h3. Symptoms During startup, JIRA exhibits the following error within {{atlassian-jira.log}}: {noformat} 2012-08-06 17:32:43,456 http-80-1 ERROR anonymous 1052x3x3 - 10.24.2.1 /secure/TaskBoard.jspa [crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoaderImpl] Could not add a monitor for the directory with id: 10000 com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorRegistrationException: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification. at com.atlassian.crowd.manager.directory.monitor.poller.AbstractQuartzDirectoryPollerManager.addPoller(AbstractQuartzDirectoryPollerManager.java:29) at com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorManagerImpl.addMonitor(DirectoryMonitorManagerImpl.java:60) at com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoaderImpl.getNewDirectory(DbCachingRemoteDirectoryInstanceLoaderImpl.java:97) at com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader.getDirectory(CachingDirectoryInstanceLoader.java:41) at com.atlassian.crowd.directory.loader.DelegatingDirectoryInstanceLoader.getDirectory(DelegatingDirectoryInstanceLoader.java:70) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.getDirectoryImplementation(DirectoryManagerGeneric.java:271) at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:283) at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:266) at com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:92) at com.atlassian.crowd.embedded.core.DelegatingCrowdService.getUser(DelegatingCrowdService.java:40) at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getUser(FilteredCrowdServiceImpl.java:43) at com.atlassian.jira.security.login.JiraSeraphAuthenticator.getUser(JiraSeraphAuthenticator.java:37) at com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromCookie(DefaultAuthenticator.java:437) at com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:327) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150) at com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99) at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49) at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346) at com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463) at com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) Caused by: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification. at org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:220) at com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:269) at com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:249) at com.atlassian.scheduler.OfBizJobStore.storeJobAndTrigger(OfBizJobStore.java:242) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:613) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:238) at com.atlassian.crowd.manager.directory.monitor.poller.AbstractQuartzDirectoryPollerManager.addPoller(AbstractQuartzDirectoryPollerManager.java:25) ... 93 more {noformat} h3. Resolution As in [the below comment|https://jira.atlassian.com/secure/ViewProfile.jspa?name=tcampbell]: {quote} This is caused by a race condition, when 2 (or more) threads try and access a directory at the same time before the Directory Instance has been instantiated. There appear to be no harmful side effects beyond the log messages. {quote}

    Atlassian JIRA | 6 years ago | Luis Miranda
    com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorRegistrationException: org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification.
  3. 0

    Error scheduling jobs

    terracotta.org | 1 year ago
    org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: 'JobSchedulingDataLoaderPlugin_jobInitializer_quartz_data_c2_xml' and group: 'JobSchedulingDataLoaderPlugin', because one already exists with this identification.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I started testing the Quartz Scheduler for performance, first with RAM Store, then with JDBC Store Cluster, and finally with TerracottaJobStore. I was not able to complete the TerracottaJobStore tests, due to the bug. I used Windows 7 x64, jdk1.6.0_17 64-Bit, and Terracotta 3.2.0 without permanent-store. Within a test class, I scheduled a few hundred jobs with SimpleTrigger, with start times distributed randomly within one minute, and no repeat. I started the scheduler, and everything went fine, the jobs ran at their scheduled time. I stopped the application with End Process from task manager. Then I tried to run the application again, without restarting the Terracotta server, but I received this error: Exception in thread "main" org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: 'test' and group: 'test', because one already exists with this identification. at org.terracotta.quartz.ClusteredJobStore.storeJob(ClusteredJobStore.java:329) at org.terracotta.quartz.ClusteredJobStore.storeJobAndTrigger(ClusteredJobStore.java:305) at org.terracotta.quartz.PlainTerracottaJobStore.storeJobAndTrigger(PlainTerracottaJobStore.java:196) at org.terracotta.quartz.TerracottaJobStore.storeJobAndTrigger(TerracottaJobStore.java:513) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:743) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) at ro.objects.quartz.test.TerracottaQuartzBug.main(TerracottaQuartzBug.java:38) This didn't happen when I used an Oracle database as the store. The jobs were cleared from the database after the jobs were executed. I don't know if this is another bug, or the intended behaviour, but I attempted to find a workaround, so I added a deleteJob call before scheduling, to remove any old jobs with the same name as the new jobs, like this: scheduler.deleteJob("test", "test"); I tried to run the test again, but I received a different exception: Exception in thread "main" org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'test' and group: 'test', because one already exists with this identification. at org.terracotta.quartz.ClusteredJobStore.storeTrigger(ClusteredJobStore.java:403) at org.terracotta.quartz.ClusteredJobStore.storeJobAndTrigger(ClusteredJobStore.java:306) at org.terracotta.quartz.PlainTerracottaJobStore.storeJobAndTrigger(PlainTerracottaJobStore.java:196) at org.terracotta.quartz.TerracottaJobStore.storeJobAndTrigger(TerracottaJobStore.java:513) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:743) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:243) at ro.objects.quartz.test.TerracottaQuartzBug.main(TerracottaQuartzBug.java:38) The job was deleted, but the trigger remained, although the JavaDoc specifies that deleteJob should delete both the job and the trigger: boolean deleteJob(String jobName, String groupName) throws SchedulerException - Delete the identified Job from the Scheduler - and any associated Triggers. So, after also restarting the Terracotta server and running the application successfully one time, I tried to delete the trigger before deleting the job, to workaround the new bug, adding a new line before the deleteJob line: scheduler.unscheduleJob("test", "test"); scheduler.deleteJob("test", "test"); And, of course, I received a new exception: Exception in thread "main" java.lang.NullPointerException at org.terracotta.quartz.ClusteredJobStore.removeTrigger(ClusteredJobStore.java:483) at org.terracotta.quartz.ClusteredJobStore.removeTrigger(ClusteredJobStore.java:450) at org.terracotta.quartz.PlainTerracottaJobStore.removeTrigger(PlainTerracottaJobStore.java:136) at org.terracotta.quartz.TerracottaJobStore.removeTrigger(TerracottaJobStore.java:445) at org.quartz.core.QuartzScheduler.unscheduleJob(QuartzScheduler.java:863) at org.quartz.impl.StdScheduler.unscheduleJob(StdScheduler.java:290) at ro.objects.quartz.test.TerracottaQuartzBug.main(TerracottaQuartzBug.java:31) I restarted the Terracotta server and repeated the tests but now I called deleteJob before calling unscheduleJob, like this: scheduler.deleteJob("test", "test"); scheduler.unscheduleJob("test", "test"); I received the same NullPointerException. So it seems there is no way to delete the trigger (which should have probably deleted itself after the job execution anyway), except restarting the Terracotta server. And probably restarting it would not have helped if I had configured a permanent store for Terracotta. I attached a class that reproduces the bug, and the Terracotta cluster configuration file.

    Terracotta Project Issue Tracker | 7 years ago | Vladimir Nicolici
    org.quartz.ObjectAlreadyExistsException: Unable to store Job with name: 'test' and group: 'test', because one already exists with this identification.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.quartz.ObjectAlreadyExistsException

      Unable to store Job with name: '10000' and group: 'DirectoryPoller', because one already exists with this identification.

      at org.quartz.simpl.RAMJobStore.storeJob()
    2. quartz
      RAMJobStore.storeJob
      1. org.quartz.simpl.RAMJobStore.storeJob(RAMJobStore.java:220)
      1 frame
    3. com.atlassian.scheduler
      OfBizJobStore.storeJobAndTrigger
      1. com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:269)
      2. com.atlassian.scheduler.OfBizJobStore.storeJob(OfBizJobStore.java:249)
      3. com.atlassian.scheduler.OfBizJobStore.storeJobAndTrigger(OfBizJobStore.java:242)
      3 frames
    4. quartz
      StdScheduler.scheduleJob
      1. org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:613)
      2. org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:238)
      2 frames
    5. com.atlassian.crowd
      FilteredCrowdServiceImpl.getUser
      1. com.atlassian.crowd.manager.directory.monitor.poller.AbstractQuartzDirectoryPollerManager.addPoller(AbstractQuartzDirectoryPollerManager.java:25)
      2. com.atlassian.crowd.manager.directory.monitor.DirectoryMonitorManagerImpl.addMonitor(DirectoryMonitorManagerImpl.java:60)
      3. com.atlassian.crowd.directory.loader.DbCachingRemoteDirectoryInstanceLoaderImpl.getNewDirectory(DbCachingRemoteDirectoryInstanceLoaderImpl.java:97)
      4. com.atlassian.crowd.directory.loader.CachingDirectoryInstanceLoader.getDirectory(CachingDirectoryInstanceLoader.java:41)
      5. com.atlassian.crowd.directory.loader.DelegatingDirectoryInstanceLoader.getDirectory(DelegatingDirectoryInstanceLoader.java:70)
      6. com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.getDirectoryImplementation(DirectoryManagerGeneric.java:271)
      7. com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.findUserByName(DirectoryManagerGeneric.java:283)
      8. com.atlassian.crowd.manager.application.ApplicationServiceGeneric.findUserByName(ApplicationServiceGeneric.java:266)
      9. com.atlassian.crowd.embedded.core.CrowdServiceImpl.getUser(CrowdServiceImpl.java:92)
      10. com.atlassian.crowd.embedded.core.DelegatingCrowdService.getUser(DelegatingCrowdService.java:40)
      11. com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getUser(FilteredCrowdServiceImpl.java:43)
      11 frames
    6. com.atlassian.jira
      JiraSeraphAuthenticator.getUser
      1. com.atlassian.jira.security.login.JiraSeraphAuthenticator.getUser(JiraSeraphAuthenticator.java:37)
      1 frame
    7. com.atlassian.seraph
      SecurityFilter.doFilter
      1. com.atlassian.seraph.auth.DefaultAuthenticator.getUserFromCookie(DefaultAuthenticator.java:437)
      2. com.atlassian.seraph.auth.DefaultAuthenticator.getUser(DefaultAuthenticator.java:327)
      3. com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:125)
      3 frames
    8. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    9. com.atlassian.security
      TrustedApplicationsFilter.doFilter
      1. com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:98)
      1 frame
    10. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    11. com.atlassian.seraph
      BaseLoginFilter.doFilter
      1. com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:150)
      1 frame
    12. com.atlassian.jira
      JiraLoginFilter.doFilter
      1. com.atlassian.jira.web.filters.JiraLoginFilter.doFilter(JiraLoginFilter.java:70)
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    14. com.atlassian.plugin
      DelegatingPluginFilter$1.doFilter
      1. com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)
      2. com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)
      2 frames
    15. com.atlassian.oauth
      OAuthFilter.doFilter
      1. com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:71)
      1 frame
    16. com.atlassian.plugin
      ServletFilterModuleContainerFilter.doFilter
      1. com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)
      2. com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)
      3. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)
      4. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
      4 frames
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    18. com.atlassian.util
      ProfilingFilter.doFilter
      1. com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:99)
      1 frame
    19. com.atlassian.jira
      JIRAProfilingFilter.doFilter
      1. com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:19)
      1 frame
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    21. com.atlassian.johnson
      AbstractJohnsonFilter.doFilter
      1. com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:71)
      1 frame
    22. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    23. UrlRewriteFilter
      UrlRewriteFilter.doFilter
      1. org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350)
      1 frame
    24. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    25. com.atlassian.gzipfilter
      GzipFilter.doFilter
      1. com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:81)
      2. com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:51)
      2 frames
    26. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    27. com.atlassian.plugin
      DelegatingPluginFilter$1.doFilter
      1. com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46)
      2. com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66)
      2 frames
    28. com.sysbliss.jira
      JWDSendRedirectFilter.doFilter
      1. com.sysbliss.jira.plugins.workflow.servlet.JWDSendRedirectFilter.doFilter(JWDSendRedirectFilter.java:25)
      1 frame
    29. com.atlassian.plugin
      ServletFilterModuleContainerFilter.doFilter
      1. com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74)
      2. com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42)
      3. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77)
      4. com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63)
      4 frames
    30. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    31. com.atlassian.jira
      ChainedFilterStepRunner.doFilter
      1. com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74)
      1 frame
    32. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    33. com.atlassian.core
      AbstractHttpFilter.doFilter
      1. com.atlassian.core.filters.cache.AbstractCachingFilter.doFilter(AbstractCachingFilter.java:33)
      2. com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
      2 frames
    34. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    35. com.atlassian.core
      AbstractHttpFilter.doFilter
      1. com.atlassian.core.filters.encoding.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:41)
      2. com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
      2 frames
    36. com.atlassian.jira
      PathMatchingEncodingFilter.doFilter
      1. com.atlassian.jira.web.filters.PathMatchingEncodingFilter.doFilter(PathMatchingEncodingFilter.java:49)
      1 frame
    37. com.atlassian.core
      AbstractHttpFilter.doFilter
      1. com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)
      1 frame
    38. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    39. com.atlassian.jira
      ActiveRequestsFilter.doFilter
      1. com.atlassian.jira.web.monitor.ActiveRequestsFilter$PassToChainFilterFunc.doFilter(ActiveRequestsFilter.java:346)
      2. com.atlassian.jira.web.monitor.ActiveRequestsFilter$DebugLogFilterFunc.doFilter(ActiveRequestsFilter.java:463)
      3. com.atlassian.jira.web.monitor.ActiveRequestsFilter.doFilter(ActiveRequestsFilter.java:173)
      3 frames
    40. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    41. com.atlassian.jira
      JiraStartupChecklistFilter.doFilter
      1. com.atlassian.jira.startup.JiraStartupChecklistFilter.doFilter(JiraStartupChecklistFilter.java:75)
      1 frame
    42. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    43. com.atlassian.multitenant
      MultiTenantServletFilter.doFilter
      1. com.atlassian.multitenant.servlet.MultiTenantServletFilter.doFilter(MultiTenantServletFilter.java:91)
      1 frame
    44. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    45. com.atlassian.jira
      ChainedFilterStepRunner.doFilter
      1. com.atlassian.jira.web.filters.steps.ChainedFilterStepRunner.doFilter(ChainedFilterStepRunner.java:74)
      1 frame
    46. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
      9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      9 frames
    47. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      3 frames
    48. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame