加载类“ solr.CurrencyFieldType”

时间:2018-08-23 07:30:11

标签: solr cloudera

我正在Cloudera发行版(Cloudera搜索)中与Solr合作。我正在尝试实现货币字段类型并进行一些交换操作。我使用 solr.CurrencyField 类成功实现了它,但是不幸的是,查询它们时交换操作无法正常工作。

我发现上一个类已经过时了,应该改用 solr.CurrencyFieldType ,但是当我在架构中实现它时,会返回以下错误:

org.apache.solr.common.SolrException: Could not load conf for core prueba1_shard1_replica1: Plugin init failure for [schema.xml] fieldType "currency_type": Error loading class 'solr.CurrencyFieldType'. Schema file is /configs/prueba1/schema.xml
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:68)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:496)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:473)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:576)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:200)
    at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:189)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
    at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:808)
    at org.apache.solr.servlet.SolrDispatchFilter.httpSolrCall(SolrDispatchFilter.java:275)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:221)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.solr.servlet.SolrHadoopAuthenticationFilter$2.doFilter(SolrHadoopAuthenticationFilter.java:394)
    at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:622)
    at org.apache.hadoop.security.token.delegation.web.DelegationTokenAuthenticationFilter.doFilter(DelegationTokenAuthenticationFilter.java:291)
    at org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:574)
    at org.apache.solr.servlet.SolrHadoopAuthenticationFilter.doFilter(SolrHadoopAuthenticationFilter.java:399)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.solr.servlet.HostnameFilter.doFilter(HostnameFilter.java:86)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "currency_type": Error loading class 'solr.CurrencyFieldType'. Schema file is /configs/prueba1/schema.xml
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:595)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:166)
    at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
    at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
    at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:92)
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:63)
    ... 32 more
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "currency_type": Error loading class 'solr.CurrencyFieldType'
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:486)
    ... 37 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.CurrencyFieldType'
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:490)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:521)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:517)
    at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:81)
    at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
    ... 38 more
Caused by: java.lang.ClassNotFoundException: solr.CurrencyFieldType
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:814)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:474)
    ... 43 more

在这里,我保留了schema.xml文件的副本:

<fieldType name="currency" class="solr.CurrencyFieldType"
                                amountLongSuffiex="_l_ns" codeStrSuffix="_s_ns"
                                defaultCurrency="USD" currencyConfig="currency.xml"/>

谢谢大家!

0 个答案:

没有答案