I'm trying to run a unit test for a custom request handler component with Solr 4.10.0.
I followed the pattern of existing "unit tests", extending "SolrTestCaseJ4". I first ran "ant eclipse" on the 4.10 source, then included all lib files generated (as well as all the solr and lucene core lib files and the testing framework lib files) on the build path in Eclipse. Usually running the tests works fine. However, seemingly at random, it will sometimes fail with the following error (even if I make no changes from a previous successful version): java.lang.NoClassDefFoundError: org/eclipse/jetty/util/security/CertificateUtils at __randomizedtesting.SeedInfo.seed([632CB8A91CFAD9B4]:0) at org.apache.solr.util.SSLTestConfig.buildKeyStore(SSLTestConfig.java:85) at org.apache.solr.util.SSLTestConfig.buildSSLContext(SSLTestConfig.java:77) at org.apache.solr.util.SSLTestConfig$SSLHttpClientConfigurer.configure(SSLTestConfig.java:99) at org.apache.solr.client.solrj.impl.HttpClientUtil.configureClient(HttpClientUtil.java:142) at org.apache.solr.client.solrj.impl.HttpClientUtil.createClient(HttpClientUtil.java:118) at org.apache.solr.handler.component.HttpShardHandlerFactory.init(HttpShardHandlerFactory.java:155) at org.apache.solr.handler.component.ShardHandlerFactory.newInstance(ShardHandlerFactory.java:49) at org.apache.solr.core.CoreContainer.load(CoreContainer.java:211) at org.apache.solr.util.TestHarness.<init>(TestHarness.java:137) at org.apache.solr.util.TestHarness.<init>(TestHarness.java:147) at org.apache.solr.util.TestHarness.<init>(TestHarness.java:98) at org.apache.solr.SolrTestCaseJ4.createCore(SolrTestCaseJ4.java:559) at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:551) at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:371) at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:378) at com.mathworks.solr.related.content.params.parse.ExtraQueryAdderTest.beforeClass(ExtraQueryAdderTest.java:43) 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.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1618) at com.carrotsearch.randomizedtesting.RandomizedRunner$4.evaluate(RandomizedRunner.java:767) at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:783) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) at com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule$1.evaluate(SystemPropertiesRestoreRule.java:53) at org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:46) at org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42) at com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55) at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39) at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:43) at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48) at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65) at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55) at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:365) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.security.CertificateUtils at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 40 more Any ideas what is going on / how I can fix this? I see that the jetty-util version that comes with this Solr is 6.1.26 - maybe it's not the version that should be used? It also shows messages like the following only in the cases where it fails: NOTE: test params are: codec=Lucene42, sim=DefaultSimilarity, locale=fi_FI, timezone=Asia/Yakutsk NOTE: Windows 7 6.1 amd64/Oracle Corporation 1.7.0_67 (64-bit)/cpus=8,threads=1,free=308420280,total=384827392 NOTE: All tests run in this JVM: [ExtraQueryAdderTest] NOTE: reproduce with: ant test -Dtestcase=ExtraQueryAdderTest -Dtests.seed=14A39F961AF82FBC -Dtests.locale=fi_FI -Dtests.timezone=Asia/Yakutsk -Dtests.file.encoding=UTF-8 NOTE: test params are: codec=Lucene46, sim=RandomSimilarityProvider(queryNorm=true,coord=crazy): {}, locale=iw_IL, timezone=America/Nassau NOTE: Windows 7 6.1 amd64/Oracle Corporation 1.7.0_67 (64-bit)/cpus=8,threads=1,free=407653288,total=485490688 NOTE: All tests run in this JVM: [ExtraQueryAdderTest] NOTE: reproduce with: ant test -Dtestcase=ExtraQueryAdderTest -Dtests.seed=DEAEB12060EBE9AB -Dtests.locale=iw_IL -Dtests.timezone=America/Nassau -Dtests.file.encoding=UTF-8 -- View this message in context: http://lucene.472066.n3.nabble.com/Solr-unit-tests-intermittently-fail-with-error-java-lang-NoClassDefFoundError-org-eclipse-jetty-utils-tp4175652.html Sent from the Solr - User mailing list archive at Nabble.com.