You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by brian4 <bq...@gmail.com> on 2014/12/22 22:52:43 UTC
Solr unit tests intermittently fail with error:
java.lang.NoClassDefFoundError:
org/eclipse/jetty/util/security/CertificateUtils
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.
Re: Solr unit tests intermittently fail with error: java.lang.NoClassDefFoundError:
org/eclipse/jetty/util/security/CertificateUtils
Posted by Shawn Heisey <ap...@elyograg.org>.
On 1/13/2015 2:50 PM, brian4 wrote:
> The problem is the jetty-util version included in the Solr build is 6.1.26,
> but this particular package is from version 7+. Looks like it is a bug in
> the build files for Solr.
>
> I fixed it by downloading jetty 7 separately and manually adding
> jetty-util-7.6.16.v20140903.jar to the end of my classpath.
The jetty version included in the Solr build for 4.x is
8.1.10.v20130312. There is a dependency in *Lucene* for 6.1.26, but
it's a completely optional Lucene add-on that is not used in *Solr*.
Thanks,
Shawn
Re: Solr unit tests intermittently fail with error:
java.lang.NoClassDefFoundError:
org/eclipse/jetty/util/security/CertificateUtils
Posted by brian4 <bq...@gmail.com>.
The problem is the jetty-util version included in the Solr build is 6.1.26,
but this particular package is from version 7+. Looks like it is a bug in
the build files for Solr.
I fixed it by downloading jetty 7 separately and manually adding
jetty-util-7.6.16.v20140903.jar to the end of my classpath.
--
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-tp4175652p4179356.html
Sent from the Solr - User mailing list archive at Nabble.com.