请问一下solr界面数据导入出现的问题 5C

1、solr配置是对的,可以正常进入localhost:8080/solr
2、然后配置了solrconfig.xml文件,添加了如下的配置:
class="org.apache.solr.handler.dataimport.DataImportHandler">

data-config.xml


3、创建data-config.xml文件,添加内容:
<?xml version="1.0" encoding="UTF-8" ?>

driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/lucene"
user="root"
password="root"/>











4、在schema.xml文件中加入内容:





multiValued="true"/>

5、打开localhost:8080/solr,进入solr界面(已经创建了lucene数据库,并且导入了一张表格products。)打开collection1和Dataimport,选择好Entity后,执行execute,然后出现错误:

Data Config problem: Field must have a column attribute
请问大神这是啥原因?谢谢了。

1个回答

org.apache.solr.handler.dataimport.DataImportHandlerException: Data Config problem: Field must have a column attribute
at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:220)
at org.apache.solr.handler.dataimport.DataImporter.maybeReloadConfiguration(DataImporter.java:130)
at org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:179)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1976)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1374)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Field must have a column attribute
at org.apache.solr.handler.dataimport.config.EntityField$Builder.(EntityField.java:98)
at org.apache.solr.handler.dataimport.config.Entity.(Entity.java:90)
at org.apache.solr.handler.dataimport.config.DIHConfiguration.(DIHConfiguration.java:80)
at org.apache.solr.handler.dataimport.DataImporter.readFromXml(DataImporter.java:319)
at org.apache.solr.handler.dataimport.DataImporter.loadDataConfig(DataImporter.java:217)
... 25 more
2018/3/5 下午9:22:57
ERROR
SolrDispatchFilter
null:org.apache.solr.handler.dataimport.DataImportHandlerException: Data Config problem: Field must have a column attribute

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问