solr error在authority-example.jar中加载manifoldcf搜索组件

时间:2012-07-31 16:25:29

标签: solr jetty

我正在使用solr 4.0 alpha with manifoldcf .5.1并且我下载并构建了authority-example.jar并放置在example / solr / lib中并将相应的行添加到solrconfig.xml。 我注意到使用solr v3.2 jars构建的authority-example.jar是否与solr4.0兼容? 如果换掉所有旧罐子,我可以重建罐子吗? 我该如何解决?请指教... 错误是:

SEVERE: null:org.apache.solr.common.SolrException: Error loading class 'org.apac
he.solr.mcf.ManifoldCFSearchComponent'
        at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
java:415)
        at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:420)
        at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:463)
        at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1824)
        at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1818)
        at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1851)
        at org.apache.solr.core.SolrCore.loadSearchComponents(SolrCore.java:906)

        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:572)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:504)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:816)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:510)
        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:333)
        at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContain
er.java:282)
        at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.ja
va:101)
        at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:114)

        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.ja
va:754)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletC
ontextHandler.java:258)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.jav
a:1221)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandle
r.java:699)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454
)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(Stan
dardStarter.java:36)
        at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:1
83)
        at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentM
anager.java:491)
        at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.j
ava:138)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(Scan
ningAppProvider.java:142)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(Sc
anningAppProvider.java:53)
        at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:604)
        at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:535)
        at org.eclipse.jetty.util.Scanner.scan(Scanner.java:398)
        at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:332)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(Scanni
ngAppProvider.java:118)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(Deploymen
tManager.java:552)
        at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.
java:227)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(Aggregate
LifeCycle.java:63)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHand
ler.java:53)
        at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrappe
r.java:91)
        at org.eclipse.jetty.server.Server.doStart(Server.java:263)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:59)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:12
15)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:113
8)
        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 org.eclipse.jetty.start.Main.invokeMain(Main.java:457)
        at org.eclipse.jetty.start.Main.start(Main.java:602)
        at org.eclipse.jetty.start.Main.main(Main.java:82)
Caused by: java.lang.ClassNotFoundException: org.apache.solr.mcf.ManifoldCFSearc
hComponent
        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 java.net.FactoryURLClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
java:399)
        ... 52 more

1 个答案:

答案 0 :(得分:0)

好吧,我想通了,但是这本书(ManifoldCF in Action)还不清楚。 我构建了authority-example.jar,并将它与apache-solr-mcf-4.0-SNAPSHOT.jar以及它的依赖项一起放在SOLR_HOME / lib目录中。 这解决了很多错误,如上面的错误。 下一个问题是放入solrconfi.xml文件的内容。 这本书说明了这一点:

<requestHandler name="search" class="solr.SearchHandler" default="true">
<arr name="last-components">
<str>manifoldCFSecurity</str>
</arr>
...
</requestHandler>

这不行! 要修复它,你需要获取内容(last-components和manifoldcfsecurity)并将它们放在requesthandlers / browse / select / query等中,然后相应地过滤查询结果! 我自然地认为,出于显而易见的原因,如果不是所有请求处理程序都需要为大多数人启用安全性。 我还假设上面的requesthandler必须是name =“/ search”才能工作,但我还没有尝试过。