Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError indexing huge history branch #3252

Closed
ghost opened this issue Sep 28, 2020 · 4 comments
Closed

java.lang.NoClassDefFoundError indexing huge history branch #3252

ghost opened this issue Sep 28, 2020 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Sep 28, 2020

I get the following java.lang.NoClassDefFoundError when indexing relatively huge history included branch.

Indexer command failed (return code 1)
Logging filehandler pattern: /opt/pisces/WORKSPACE/temp8/log/opengrok%g.%u.log
java.lang.NoClassDefFoundError: org/apache/lucene/index/MergeTrigger
... 10 more
java.lang.NoClassDefFoundError: org/opengrok/indexer/authorization/AuthorizationEntity$PluginDecisionPredicate
... 40 more

This was working fine until 1.3.16, starting from 1.4.1.
At first, I got "java.lang.OutOfMemoryError: Java heap space" error on 1.4.1.
So, I increased the Java heap memory from "Xmx4096m" to "Xmx6144m & Xms6144m" then I now get this error.
Please let me know if I can I workaround this error. (Should I increase more memory?)
Thank you very much for your help!!!

17.opengrok0.0.log

Java: 11.0.2
Tomcat: 9.0.13
RHEL: 7.6

pisces@sjc-opengrok-17>./ctags --version
Universal Ctags 0.0.0, Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Feb 13 2020, 06:52:57
URL: https://ctags.io/
Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +packcc

@vladak
Copy link
Member

vladak commented Sep 29, 2020

Definitely try increasing heap size first. Sometimes the errors that arise from the lack of memory are fairly non obvious.

@vladak
Copy link
Member

vladak commented Sep 29, 2020

This might be related to #3243 - also having troubles when creating history cache for sizeable history. However looking at the log this failed when writing the new configuration file so the cause is probably different.

@vladak
Copy link
Member

vladak commented Sep 29, 2020

The second exception when writing configuration file is likely just a fall out from the previous exception:

2020-09-25 04:01:51.715-0700 INFO t31 HistoryGuru.createCache: Creating historycache for /opt/pisces/WORKSPACE/temp8/src/polaris (GitRepository) without renamed file handling
2020-09-25 04:01:51.715-0700 FINE t31 Executor.exec: Executing command [...}
2020-09-25 18:35:31.532-0700 SEVERE t31 IndexDatabase$1.run: Problem updating index database in directory /opt/pisces/WORKSPACE/temp8/data/index/polaris: 
java.lang.NoClassDefFoundError: org/apache/lucene/index/MergeTrigger
	at org.apache.lucene.index.IndexWriter.waitForMerges(IndexWriter.java:2536)
	at org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1098)
	at org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1140)
	at org.opengrok.indexer.index.IndexDatabase.update(IndexDatabase.java:517)
	at org.opengrok.indexer.index.IndexDatabase$1.run(IndexDatabase.java:219)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.index.MergeTrigger
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 10 more

The exception was thrown after some 14 hours after the history cache creation process started.

@ghost
Copy link
Author

ghost commented Oct 5, 2020

I increased the Java heap memory again to "Xmx8192m & Xms8192m" then this problem was disappeared.

@ghost ghost closed this as completed Oct 5, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant