ClassCastException during indexing

We're getting the following stack dump during indexing in our test Jira instance (v5.2, build 812). I've looked around and found similar issues/fixes, but they don't seem to apply in our case. Does anyone have any pointers? Thanks

2013-09-10 16:58:32,874 JiraTaskExectionThread-9 ERROR mhammel 1017x3229x1 1h6t7sx 10.125.1.66 /secure/admin/jira/IndexReIndex.jspa [jira.util.index.CompositeIndexLifecycleManager] Reindex All FAILED. Indexer: DefaultIndexManager: paths: [/var/atlassian/application-data/jira/caches/indexes/comments, /var/atlassian/application-data/jira/caches/indexes/issues, /var/atlassian/application-data/jira/caches/indexes/changes]

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException

at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35)

at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82)

at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:855)

at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:825)

at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:335)

at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:301)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:81)

at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)

at $Proxy117.reIndexAll(Unknown Source)

at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:54)

at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:28)

at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54)

at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.call(ReIndexAsyncIndexerCommand.java:16)

at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:23)

at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:366)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForTenant(DefaultMultiTenantManager.java:61)

at com.atlassian.multitenant.juc.MultiTenantExecutors$WrappedRunnable.run(MultiTenantExecutors.java:160)

at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:249)

at java.lang.Thread.run(Unknown Source)

Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException

at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)

at java.util.concurrent.FutureTask.get(Unknown Source)

at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31)

... 27 more

Caused by: java.lang.ClassCastException

2013-09-10 16:58:32,875 JiraTaskExectionThread-9 INFO mhammel 1017x3229x1 1h6t7sx 10.125.1.66 /secure/admin/jira/IndexReIndex.jspa [action.admin.index.IndexAdminImpl] Re-indexing finished

3 answers

Could you please consider submitting a bug report for this issue?

0 vote
Daryl Chuah Atlassian Team Sep 10, 2013

Can you just try the following steps which clear up all the cache and rebuild all the indexing and bundled plugin files to see whether the problem is still reproducible or not:

  1. ShutdownJIRAinstance
  2. Delete the contents of<tt>JIRA Installation Directory\work</tt>directory
  3. Delete contents of the<tt>JIRA Home Directory\caches\indexes\changes</tt>directory
  4. Delete contents of the<tt>JIRA Home Directory\caches\indexes\comments</tt>directory
  5. Delete contents of the<tt>JIRA Home Directory\caches\indexes\entities</tt>directory
  6. Delete contents of the<tt>JIRA Home Directory\caches\indexes\issues</tt>directory
  7. Remove the content of the following directory:
    • <JIRA Home Directory>/plugins/.bundled-plugins
    • <JIRA Home Directory>/plugins/.osgi-plugins
  8. RestartJIRAinstance.
  9. Perform re-indexing.

Hope it helps!

Daryl:

I did what you suggested, and it still fails. However, the stack dump is different from before:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.lang.String

at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35)

at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82)

at com.atlassian.jira.issue.index.DefaultIndexManager.doIndexIssuesInBatchMode(DefaultIndexManager.java:855)

at com.atlassian.jira.issue.index.DefaultIndexManager.doStopTheWorldReindex(DefaultIndexManager.java:825)

at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:335)

at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:301)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:81)

at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)

at $Proxy146.reIndexAll(Unknown Source)

at com.atlassian.jira.util.index.CompositeIndexLifecycleManager.reIndexAll(CompositeIndexLifecycleManager.java:54)

at com.atlassian.jira.web.action.admin.index.ReIndexAsyncIndexerCommand.doReindex(ReIndexAsyncIndexerCommand.java:28)

at com.atlassian.jira.web.action.admin.index.AbstractAsyncIndexerCommand.call(AbstractAsyncIndexerCommand.java:54)

(trimmed due to length constraints)

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,254 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot