严重:无法启动 SOLR。检查 solr/home 属性 java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap

发布于 2025-01-07 12:09:04 字数 7055 浏览 1 评论 0原文

我在运行时遇到此错误

rake sunspot:solr:start

然后在 log/sunspot-solr-development.log 中看到

SEVERE: Could not start SOLR. Check solr/home property
java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.11)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.11)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.11)
   ...24 more
Feb 21, 2012 10:33:00 a.m. org.apache.solr.common.SolrException log
SEVERE: java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.11)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.11)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.11)
   ...24 more

我以这种方式解决了它运行

cd ~/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/
/usr/java/jdk1.7.0_01/jre/bin/java -jar start.jar

但我想直接从 rake 任务运行它,我在 ~/.bashrc 中有这个

export JDK_HOME=/usr/java/jdk1.7.0_01
export JAVA_HOME=/usr/java/jdk1.7.0_01/jre
export PATH=$PATH:$JAVA_HOME/bin

我有什么问题我的配置?

I have this error when running

rake sunspot:solr:start

And then seeing at log/sunspot-solr-development.log

SEVERE: Could not start SOLR. Check solr/home property
java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.11)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.11)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.11)
   ...24 more
Feb 21, 2012 10:33:00 a.m. org.apache.solr.common.SolrException log
SEVERE: java.lang.NoClassDefFoundError: org.apache.solr.core.JmxMonitoredMap
   at java.lang.Class.initializeClass(libgcj.so.11)
   at org.apache.solr.core.SolrCore.<init>(SolrCore.java:525)
   at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
   at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
   at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
   at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
   at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
   at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
   at org.mortbay.jetty.Server.doStart(Server.java:210)
   at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
   at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
   at java.lang.reflect.Method.invoke(libgcj.so.11)
   at org.mortbay.start.Main.invokeMain(Main.java:183)
   at org.mortbay.start.Main.start(Main.java:497)
   at org.mortbay.start.Main.main(Main.java:115)
Caused by: java.lang.ClassNotFoundException: javax.management.remote.JMXConnectorServer not found in StartLoader[file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/servlet-api-2.5-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jetty-util-6.1.3.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/core-3.1.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/jsp-api-2.1.jar, file:/home/juan/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/lib/jsp-2.1/ant-1.6.5.jar]
   at java.net.URLClassLoader.findClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at java.lang.ClassLoader.loadClass(libgcj.so.11)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:375)
   at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:337)
   at java.lang.Class.initializeClass(libgcj.so.11)
   ...24 more

I solved it running this way

cd ~/.rvm/gems/ruby-1.9.2-p290@tmp/gems/sunspot_solr-1.3.0/solr/
/usr/java/jdk1.7.0_01/jre/bin/java -jar start.jar

But I want to run it directly from the rake task, I have this in ~/.bashrc

export JDK_HOME=/usr/java/jdk1.7.0_01
export JAVA_HOME=/usr/java/jdk1.7.0_01/jre
export PATH=$PATH:$JAVA_HOME/bin

What do I have wrong my configuration?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满栀 2025-01-14 12:09:04

这就是我所做的:

which java

显示我使用的是旧的不同版本的 Java,因此我选择

update-alternatives --config java

1.7 JVM。

由于某种原因,~/.bashrc 中的 JAVA_HOME 无法工作。

This is what I did:

which java

showed me that I was using an old different version of Java, so I made

update-alternatives --config java

to select 1.7 JVM.

For some reason the JAVA_HOME from ~/.bashrc did not work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文