如何在solr实例上运行完全导入时解决Dataconfig错误?

时间:2012-12-07 12:35:44

标签: solr lucene glassfish

我创建了solr实例,我正在尝试运行完全导入,但我收到数据配置问题。

网址是:http:// localhost:8080 / apache-solr-4.0.0 / collection1 / dataimport?command = full-import& clean = true

5008data-config.xmlfull-importData配置问题:处理指令目标匹配" [xX] [mM] [lL]" is not allowed.org.apache.solr.handler.dataimport.DataImportHandlerException:数据配置问题:处理指令目标匹配" [xX] [mM] [lL]"不被允许。     at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:233)     在org.apache.solr.handler.dataimport.DataImporter.maybeReloadConfiguration(DataImporter.java:131)     at org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:167)     在org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)     在org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)     在org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)     在org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)     在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)     在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)     在org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)     在org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)     在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)     在org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)     在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)     at com.sun.enterprise.v3.services.impl.ContainerMapper $ AdapterCallable.call(ContainerMapper.java:317)     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)     在com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)     在com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)     在com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)     在com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)     在com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)     在com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)     在com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)     在com.sun.grizzly.ContextTask.run(ContextTask.java:71)     at com.sun.grizzly.util.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:532)     在com.sun.grizzly.util.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:513)     在java.lang.Thread.run(Thread.java:722) 引起:org.xml.sax.SAXParseException; systemId:solrres:/data-config.xml; lineNumber:2; columnNumber:6;处理指令目标匹配" [xX] [mM] [lL]"不被允许。     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)     at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1375)     at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:662)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:979)     at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:630)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl $ PrologDriver.next(XMLDocumentScannerImpl.java:913)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)     在com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)     在com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)     在com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:240)     在com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:300)     at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:224)     ......还有31个 500

任何人都可以帮我吗?

先谢谢.....

1 个答案:

答案 0 :(得分:1)

一些资源(herehere)似乎表明此错误可能是由正在读取的XML中'<?xml ...'之前的空格引起的。