访问/ solr / admin /时出错。原因:solr配置中存在严重错误

时间:2013-05-23 19:53:48

标签: solr

我遇到一个问题,我真的无法找出它为什么会发生。我在DEV环境中使用SOLR网站上的“示例”软件包。我已经更改了schemal.xml以满足我的需求,此时一切正常。

要让它在我的临时服务器上运行,我只需用我的更改“tar”整个“示例”包并将其发送到服务器上。所以它完全相同的配置文件,端口等。

取消焦油并将其放入我的网站文件夹中。我使用以下命令启动solr实例:nohup java -jar start.jar&

此时我没有看到shell中的任何错误,但是当我通过localhost:8983 / solr访问它时,我有以下错误(在底部)

该服务器上的JAVA版本几乎相同:Staging上的“1.7.0_21”,DEV上的“1.7.0_03”。

有人有任何想法吗?

HTTP ERROR 500

Problem accessing /solr/. Reason:

Severe errors in solr configuration.

Check your log files for more detailed information on what may be wrong.

If you want solr to continue after configuration errors, change: 

 <abortOnConfigurationError>false</abortOnConfigurationError>

in solr.xml

-------------------------------------------------------------
org.apache.solr.common.SolrException: Error loading class 'solr.VelocityResponseWriter'
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:389)
    at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425)
    at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:447)
    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1556)
    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1550)
    at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1583)
    at org.apache.solr.core.SolrCore.initWriters(SolrCore.java:1466)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:556)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:463)
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:207)
    at     org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:130)
    at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at     org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:15    6)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:534)
    at org.mortbay.start.Main.start(Main.java:441)
    at org.mortbay.start.Main.main(Main.java:119)
Caused by: java.lang.ClassNotFoundException: solr.VelocityResponseWriter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:266)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373)
    ... 37 more

1 个答案:

答案 0 :(得分:0)

确保您的Core lib中有apache-solr-velocity-XX.jar及其所有依赖项,以便该类能够加载。

VelocityResponseWriter - 相应地检查版本。

velocity-1.6.1.jar 
velocity-tools-2.0-beta3.jar 
commons-beanutils-1.7.0.jar 
commons-collections-3.2.1.jar