2017-03-11 24 views
0

방금 ​​Solr-6.4.2를 설치했고 모든 JTS 라이브러리 파일을 /solr-6.4.2/server/solr-webapp/에 복사하여 JTS 라이브러리 like here explained을 설치하려고했습니다. WEB-INF/lib 디렉토리에 있습니다.Solts 6.4.2에 jts 라이브러리를 설치하지 못했습니다.

그런 다음

<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" 
      spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" 
      distErrPct="0.025" 
      maxDistErr="0.000009" 
      units="degrees" 
     /> 

<field name="geo" type="location_rpt" indexed="true" stored="true" multiValued="true" /> 

을 추가하여 관리되는 스키마를 구성하고 ./solr 시작 (부두)

으로/bin에 그것을 시작하지만 난이 SOLR 인터페이스를 방문 할 때 그것은 말한다 :

> org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: 
> Could not load conf for core polygon: Can't load schema 
> /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: 
> Plugin Initializing failure for [schema.xml] fieldType 

라이브러리가 없거나 자동으로로드되지 않는 것처럼 보입니다 (튜토리얼에 따라야 함).

도와 주시겠습니까? 그것은 밝혀졌다

2017-03-11 15:44:57.061 INFO (main) [ ] o.a.s.c.CorePropertiesLocator Cores are: [polygon] 
2017-03-11 15:44:57.067 INFO (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.c.SolrResourceLoader [null] Added 8 libs to classloader, from paths: [/home/spatial/solr-6.4.2/server/solr/polygon/lib] 
2017-03-11 15:44:57.117 INFO (main) [ ] o.e.j.s.Server Started @777ms 
2017-03-11 15:44:57.174 INFO (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.c.SolrResourceLoader [polygon] Added 59 libs to classloader, from paths: [/home/spatial/solr-6.4.2/contrib/clustering/lib, /home/spatial/solr-6.4.2/contrib/extraction/lib, /home/spatial/solr-6.4.2/contrib/langid/lib, /home/spatial/solr-6.4.2/contrib/velocity/lib, /home/spatial/solr-6.4.2/dist] 
2017-03-11 15:44:57.209 INFO (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.c.SolrConfig Using Lucene MatchVersion: 6.4.2 
2017-03-11 15:44:57.298 INFO (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.s.IndexSchema [polygon] Schema name=example-data-driven-schema 
2017-03-11 15:44:57.385 WARN (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class [solr.SynonymFilterFactory]. Please consult documentation how to replace it accordingly. 
2017-03-11 15:44:57.535 WARN (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.s.AbstractSpatialFieldType Replace 'com.spatial4j.core' with 'org.locationtech.spatial4j' in your schema. 
2017-03-11 15:44:57.556 ERROR (coreLoadExecutor-6-thread-1) [ x:polygon] o.a.s.c.CoreContainer Error creating core [polygon]: Could not load conf for core polygon: Can't load schema /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: Plugin Initializing failure for [schema.xml] fieldType 
org.apache.solr.common.SolrException: Could not load conf for core polygon: Can't load schema /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:84) 
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:888) 
    at org.apache.solr.core.CoreContainer.lambda$load$3(CoreContainer.java:542) 
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: org.apache.solr.common.SolrException: Can't load schema /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:598) 
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:183) 
    at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:104) 
    at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:173) 
    at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:45) 
    at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75) 
    at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:106) 
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:78) 
    ... 8 more 
Caused by: org.apache.solr.common.SolrException: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:194) 
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:491) 
    ... 15 more 
Caused by: java.lang.RuntimeException: schema fieldtype location_rpt(org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType) invalid arguments:{units=degrees} 
    at org.apache.solr.schema.FieldType.setArgs(FieldType.java:202) 
    at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:165) 
    at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:53) 
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:191) 
    ... 16 more 
2017-03-11 15:44:57.558 ERROR (coreContainerWorkExecutor-2-thread-1) [ ] o.a.s.c.CoreContainer Error waiting for SolrCore to be created 
java.util.concurrent.ExecutionException: org.apache.solr.common.SolrException: Unable to create core [polygon] 
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) 
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) 
    at org.apache.solr.core.CoreContainer.lambda$load$4(CoreContainer.java:570) 
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: org.apache.solr.common.SolrException: Unable to create core [polygon] 
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:903) 
    at org.apache.solr.core.CoreContainer.lambda$load$3(CoreContainer.java:542) 
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197) 
    ... 5 more 
Caused by: org.apache.solr.common.SolrException: Could not load conf for core polygon: Can't load schema /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:84) 
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:888) 
    ... 7 more 
Caused by: org.apache.solr.common.SolrException: Can't load schema /home/spatial/solr-6.4.2/server/solr/polygon/conf/managed-schema: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:598) 
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:183) 
    at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:104) 
    at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:173) 
    at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:45) 
    at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75) 
    at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:106) 
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:78) 
    ... 8 more 
Caused by: org.apache.solr.common.SolrException: Plugin Initializing failure for [schema.xml] fieldType 
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:194) 
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:491) 
    ... 15 more 
Caused by: java.lang.RuntimeException: schema fieldtype location_rpt(org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType) invalid arguments:{units=degrees} 
    at org.apache.solr.schema.FieldType.setArgs(FieldType.java:202) 
    at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:165) 
    at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:53) 
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:191) 

답변

0

인터페이스가 최근에 변경되었습니다 및 최신 SOLR 버전 (6.4.2)와 함께 작동하지 않는 here처럼 오래된 예는 유래에서 발견 : 다음은 로그 파일입니다.

<fieldType name="location_rpt" class="solr.SpatialRecursivePrefixTreeFieldType" 
    spatialContextFactory="com.spatial4j.core.context.jts.JtsSpatialContextFactory" 
    autoIndex="true" 
    distErrPct="0.025" 
    maxDistErr="0.001" 
    distanceUnits="kilometers" /> 

I. 전자 : 가장 현재 문서는 작동 here

구성 예이다.등등 대신 distanceUnits이 사용되고 이제 특성이 오류를 발생시키는 것처럼 degrees이 사용됩니다.

초기 코드에서 가장 최근의 solr 버전에서 오류가 발생했습니다.

Caused by: java.lang.RuntimeException: schema fieldtype location_rpt(org.apache.solr.schema.SpatialRecursivePrefixTreeFieldType) invalid arguments:{units=degrees}