将mysql数据导入solr

时间:2014-06-30 14:44:24

标签: mysql solr

我是solr的新手,我试图从mysql导入简单数据,但我找到的例子对我不起作用。 在solrconfig.xml我有

<?xml version="1.0" encoding="UTF-8" ?>
 <config>
  <requestHandler name="/dataimport"  class="org.apache.solr.handler.dataimport.DataImportHandler">
   <lst name="defaults">
  <str name="config">data-config.xml</str>
</lst>
</requestHandler> 
more stuffs..

并在data-config.xml

<dataConfig>
  <dataSource 
    type="JdbcDataSource" 
    driver="com.mysql.jdbc.Driver" 
    url="jdbc:mysql://localhost/test" 
    user="root" 
    password=""/>

 <document> 
   <entity name="name"  
     query="SELECT * FROM name">
    </entity>
 </document>
</dataConfig>

如果我尝试创建一个新的集合,例如mysqlCol,我收到此错误

Error CREATEing SolrCore 'mysqlCol': Unable to create core: mysqlCol Caused by: org.apache.solr.handler.dataimport.DataImportHandler

OR

如果我尝试将这些代码行放在现有的collection1中并从带有java -jar start.jar的cmd运行,那么错误就是

2758 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer û U nable to create core: collection1

在\ lib \中我已经为mysql mysql-connector-java-5.1.31-bin.jar添加了驱动程序,但仍然没有。我使用的是Windows 7.任何帮助都将受到高度赞赏。

整个堆栈:

    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/extraction/lib/xm
  pcore-5.1.2.jar' to classloader
  1723 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/extraction/lib/xz
  -1.4.jar' to classloader
  1725 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/dist/solr-cell-4.9.0.jar'
   to classloader
  1726 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/at
  tributes-binder-1.2.1.jar' to classloader
  1727 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/ca
  rrot2-mini-3.9.0.jar' to classloader
  1729 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/hp
  pc-0.5.2.jar' to classloader
  1730 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/ja
  ckson-core-asl-1.9.13.jar' to classloader
  1731 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/ja
  ckson-mapper-asl-1.9.13.jar' to classloader
  1731 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/ma
  hout-collections-1.0.jar' to classloader
  1733 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/ma
  hout-math-0.6.jar' to classloader
  1733 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/clustering/lib/si
  mple-xml-2.7.jar' to classloader
  1735 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/dist/solr-clustering-4.9.
  0.jar' to classloader
  1736 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/langid/lib/jsonic
  -1.2.7.jar' to classloader
  1736 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/langid/lib/langde
  tect-1.1-20120112.jar' to classloader
  1737 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/dist/solr-langid-4.9.0.ja
  r' to classloader
  1738 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/velocity/lib/comm
  ons-beanutils-1.8.3.jar' to classloader
  1739 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/velocity/lib/comm
  ons-collections-3.2.1.jar' to classloader
  1739 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/velocity/lib/velo
  city-1.7.jar' to classloader
  1740 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/contrib/velocity/lib/velo
  city-tools-2.0.jar' to classloader
  1741 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrResourceLoader
    û Adding 'file:/C:/Users/Bulgaria12/sites/solr-4.9.0/dist/solr-velocity-4.9.0.
  jar' to classloader
  1799 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.update.SolrIndexConfig
   û IndexWriter infoStream solr logging is enabled
  1805 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrConfig  û Usin
  g Lucene MatchVersion: LUCENE_4_9
  1894 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.Config  û Loaded S
  olrConfig: solrconfig.xml
  1900 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.schema.IndexSchema  û R
  eading Solr Schema from schema.xml
  1931 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.schema.IndexSchema  û [
  collection1] Schema name=example
  2392 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.schema.IndexSchema  û u
  nique key field: id
  2404 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.rest.RestManager  û Reg
  istered ManagedResource impl org.apache.solr.rest.schema.analysis.ManagedWordSet
  Resource for path /schema/analysis/stopwords/english
  2405 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.rest.RestManager  û Reg
  istered ManagedResource impl org.apache.solr.rest.schema.analysis.ManagedSynonym
  FilterFactory$SynonymManager for path /schema/analysis/synonyms/english
  2467 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.schema.FileExchangeRate
  Provider  û Reloading exchange rates from file currency.xml
  2472 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.schema.FileExchangeRate
  Provider  û Reloading exchange rates from file currency.xml
  2526 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CoreContainer  û C
  reating SolrCore 'collection1' using configuration from instancedir C:\Users\Bul
  garia12\sites\solr-4.9.0\example\solr\collection1\
  2540 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û solr.N
  RTCachingDirectoryFactory
  2548 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û [colle
  ction1] Opening new SolrCore at C:\Users\Bulgaria12\sites\solr-4.9.0\example\sol
  r\collection1\, dataDir=C:\Users\Bulgaria12\sites\solr-4.9.0\example\solr\collec
  tion1\data\
  2550 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.JmxMonitoredMap  û
   No JMX servers found, not exposing Solr information with JMX.
  2554 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û [colle
  ction1] Added SolrEventListener for newSearcher: org.apache.solr.core.QuerySende
  rListener{queries=[]}
  2554 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û [colle
  ction1] Added SolrEventListener for firstSearcher: org.apache.solr.core.QuerySen
  derListener{queries=[{q=static firstSearcher warming in solrconfig.xml}]}
  2566 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û return new directory for C:\Users\Bulgaria12\sites\solr-4.9.0\example\s
  olr\collection1\data
  2567 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û New in
  dex directory detected: old=null new=C:\Users\Bulgaria12\sites\solr-4.9.0\exampl
  e\solr\collection1\data\index/
  2568 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û return new directory for C:\Users\Bulgaria12\sites\solr-4.9.0\example\s
  olr\collection1\data\index
  2580 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û create
  d json: solr.JSONResponseWriter
  2581 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û adding
   lazy queryResponseWriter: solr.VelocityResponseWriter
  2582 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û create
  d velocity: solr.VelocityResponseWriter
  2586 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û create
  d xslt: solr.XSLTResponseWriter
  2586 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.response.XSLTResponseWr
  iter  û xsltCacheLifetimeSeconds=5
  2662 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û no upd
  ateRequestProcessorChain defined as default, creating implicit default
  2670 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /select: solr.SearchHandler
  2671 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /query: solr.SearchHandler
  2673 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /get: solr.RealTimeGetHandler
  2673 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /browse: solr.SearchHandler
  2677 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /update: solr.UpdateRequestHandler
  2677 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /update/json: solr.UpdateRequestHandler
  2678 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /update/csv: solr.UpdateRequestHandler
  2679 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.extraction.ExtractingRequestHandler
  2680 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /update/extract: solr.extraction.ExtractingRequestHandler
  2681 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.FieldAnalysisRequestHandler
  2681 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /analysis/field: solr.FieldAnalysisRequestHandler
  2682 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.DocumentAnalysisRequestHandler
  2682 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /analysis/document: solr.DocumentAnalysisRequestHandler
  2684 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /admin/: solr.admin.AdminHandlers
  2686 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /admin/ping: solr.PingRequestHandler
  2687 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /debug/dump: solr.DumpRequestHandler
  2696 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /replication: solr.ReplicationHandler
  2696 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.SearchHandler
  2696 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /spell: solr.SearchHandler
  2696 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.SearchHandler
  2697 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /suggest: solr.SearchHandler
  2697 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.SearchHandler
  2697 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /tvrh: solr.SearchHandler
  2697 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.SearchHandler
  2698 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /terms: solr.SearchHandler
  2698 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   adding lazy requestHandler: solr.SearchHandler
  2698 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.RequestHandlers  û
   created /elevate: solr.SearchHandler
  2705 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û [colle
  ction1]  CLOSING SolrCore org.apache.solr.core.SolrCore@1a9281f
  2706 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.update.SolrCoreState  û
   Closing SolrCoreState
  2706 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.update.DefaultSolrCoreS
  tate  û SolrCoreState ref count has reached 0 - closing IndexWriter
  2706 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.SolrCore  û [colle
  ction1] Closing main searcher on request.
  2707 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û Closing NRTCachingDirectoryFactory - 2 directories currently being trac
  ked
  2707 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û looking to close C:\Users\Bulgaria12\sites\solr-4.9.0\example\solr\coll
  ection1\data\index [CachedDir<<refCount=0;path=C:\Users\Bulgaria12\sites\solr-4.
  9.0\example\solr\collection1\data\index;done=false>>]
  2708 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û Closing directory: C:\Users\Bulgaria12\sites\solr-4.9.0\example\solr\co
  llection1\data\index
  2708 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û looking to close C:\Users\Bulgaria12\sites\solr-4.9.0\example\solr\coll
  ection1\data [CachedDir<<refCount=0;path=C:\Users\Bulgaria12\sites\solr-4.9.0\ex
  ample\solr\collection1\data;done=false>>]
  2709 [coreLoadExecutor-5-thread-1] INFO  org.apache.solr.core.CachingDirectoryFa
  ctory  û Closing directory: C:\Users\Bulgaria12\sites\solr-4.9.0\example\solr\co
  llection1\data
  2710 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer  û U
  nable to create core: collection1
  org.apache.solr.common.SolrException: RequestHandler init failure
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
          at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
          at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
          at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
  Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
          at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHa
  ndlers.java:167)
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:787)
          ... 10 more
  Caused by: org.apache.solr.common.SolrException: Error loading class 'org.apache
  .solr.handler.dataimport.DataImportHandler'
          at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
  java:490)
          at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
  java:421)
          at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:540)
          at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:613)      

          at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHa
  ndlers.java:153)
          ... 11 more
  Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.dataimport.
  DataImportHandler
          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:474)
          ... 15 more
  2714 [coreLoadExecutor-5-thread-1] ERROR org.apache.solr.core.CoreContainer  û n
  ull:org.apache.solr.common.SolrException: Unable to create core: collection1
          at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:
  911)
          at org.apache.solr.core.CoreContainer.create(CoreContainer.java:568)
          at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:261)
          at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:253)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
  Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:643)
          at org.apache.solr.core.CoreContainer.create(CoreContainer.java:556)
          ... 8 more
  Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
          at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHa
  ndlers.java:167)
          at org.apache.solr.core.SolrCore.<init>(SolrCore.java:787)
          ... 10 more
  Caused by: org.apache.solr.common.SolrException: Error loading class 'org.apache
  .solr.handler.dataimport.DataImportHandler'
          at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
  java:490)
          at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
  java:421)
          at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:540)
          at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:613)      

          at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHa
  ndlers.java:153)
          ... 11 more
  Caused by: java.lang.ClassNotFoundException: org.apache.solr.handler.dataimport.
  DataImportHandler
          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:474)
          ... 15 more      

  2717 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  û user.dir=C:\User
  s\Bulgaria12\sites\solr-4.9.0\example
  2717 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  û SolrDispatchFilt
  er.init() done
  2735 [main] INFO  org.eclipse.jetty.server.AbstractConnector  û Started SocketCo
  nnector@0.0.0.0:8983

1 个答案:

答案 0 :(得分:4)

您错误地设置了库的路径: 检查solrconfig.xml 应该有:

<lib dir="../../../dist/" regex="solr-dataimporthandler-.*\.jar" /> ..... `

它应该指向这个库所在的目录 - 我必须将其更改为默认安装的一个目录,你的可能会有所不同,你可以在开始时看到它工作的绝对路径。