Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create solr core

Tags:

java

solr

I have a solr 5.2.1 instance and I want to create a new core named production. I had several issues with access rights which got solved, but the following exception is totally unclear to me. Help is appreciated.

org.apache.solr.common.SolrException: Error CREATEing SolrCore 'production': Unable to create core [production] Caused by: solr.JsonUpdateRequestHandler
    at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:661)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:213)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:193)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
    at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:660)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:431)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:227)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:196)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:497)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to create core [production]
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:651)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:611)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:628)
    ... 27 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.JsonUpdateRequestHandler'
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:815)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:637)
    ... 29 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.JsonUpdateRequestHandler'
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:491)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:422)
    at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:566)
    at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:122)
    at org.apache.solr.core.PluginBag.init(PluginBag.java:217)
    at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:130)
    at org.apache.solr.core.SolrCore.<init>(SolrCore.java:768)
    ... 31 more
Caused by: java.lang.ClassNotFoundException: solr.JsonUpdateRequestHandler
    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:425)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:793)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:278)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:475)
like image 335
dc10 Avatar asked Dec 18 '15 02:12

dc10


People also ask

What is core in Solr?

In Solr, the term core is used to refer to a single index and associated transaction log and configuration files (including the solrconfig. xml and Schema files, among others).

How do I delete a core in Solr?

For the solr delete command the -c <name> option is required while the other options (parameters) are optional. Delete the named Solr core or collection with default options. Solr will delete the specified core and its associated configuration files at the first port number found.


1 Answers

It seems that you are using an old version of solrconfig.xml. Class JsonUpdateRequestHandler was deprecated in latest Solr 4.x versions and was removed from Solr 5.x. You should use UpdateRequestHandler instead of it and update your solrconfig.xml according to your Solr version.

like image 66
Alexander Kuznetsov Avatar answered Sep 20 '22 07:09

Alexander Kuznetsov