You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Oliver Schihin <ol...@unibas.ch> on 2012/07/17 08:58:15 UTC

ICUCollation throws exception

Hello

According to release notes from 4.0.0-ALPHA, SOLR-2396, I replaced 
ICUCollationKeyFilterFactory with ICUCollationField in our schema. But this throws an 
exception, see the following excerpt from the log:
------------------------------------
Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] 
fieldType "alphaOnlySort": Pl
ugin init failure for [schema.xml] analyzer/filter: class 
org.apache.solr.schema.ICUCollationField
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
------------------------------------
The deprecated filter of ICUCollationKeyFilterFactory is working without any problem. This 
is how I did the schema (with the deprecated filter):
------------------------------------
    <!-- field type for sort strings -->
    <fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" 
omitNorms="true">
       <analyzer>
         <tokenizer class="solr.KeywordTokenizerFactory"/>
         <filter class="solr.ICUCollationKeyFilterFactory"
                 locale="de@collation=phonebook"
                 strength="primary"
          />
       </analyzer>
     </fieldType>
------------------------------------

Do I have to replace jars in /contrib/analysis-extras/, or any other hints of what might 
be wrong in my install and configuration?

Thanks a lot
Oliver



Re: ICUCollation throws exception

Posted by Robert Muir <rc...@gmail.com>.
It looks to me like a misconfiguration in your schema, as if you have
specified ICUCollation*Field* as an Analyzer?

Can you check the configuration of 'alphaOnlySort' and tell me what it is?

On Sat, Jul 21, 2012 at 4:53 AM, Günter Hipler <vo...@gmail.com> wrote:
> Hi Robert,
>
> instead of my colleague, he is currently away. Subsequently you will see
> the entire log. Oliver told me the problem and I had the impression that
> something necessary for initialisation is missing. I "googled" a little bit
> and found a patch you have done
> https://issues.apache.org/jira/secure/attachment/12505302/SOLR-2919.patch
> related to "(ICU)CollationKeyFilter". But even initializations like this:
>
> ***
>   </fieldtype>
> +
> +    <!-- ignores punctuation and whitespace -->
> +    <fieldtype name="sort_ignore_punctuation_t"
> class="solr.ICUCollationField"
> +               locale="en" strength="primary" alternate="shifted"/>
> +    <!-- ignores only whitespace -->
> +    <fieldtype name="sort_ignore_space_t" class="solr.ICUCollationField"
> +               locale="en" strength="primary" alternate="shifted"
> variableTop=" "/>
> +    <!-- ignores only accents, but not case -->
> +    <fieldtype name="sort_ignore_accents_t" class="solr.ICUCollationField"
> +               locale="en" strength="primary" caseLevel="true"/>
> +    <!-- sorts numerics in numeric order -->
> +    <fieldtype name="sort_numerics_t" class="solr.ICUCollationField"
> +               locale="en" numeric="true"/>
> +    <!-- sorts uppercase before lowercase -->
> +    <fieldtype name="sort_uppercase_first_t"
> class="solr.ICUCollationField"
> +               locale="en" strength="tertiary" caseFirst="upper"/>
> +  </types>
>
> ****
> didn't work. At least this is what I heard from Oliver.
>
> Thanks and best wishes from Basel
>
> Günter
>
> ***Exception**
> INFO: Reading Solr Schema
> Jul 16, 2012 5:27:48 PM org.apache.solr.schema.IndexSchema readSchema
> INFO: Schema name=swissbib-default
> Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
> SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure for
> [schema.xml] fieldType "alphaOnlySort": Plugin init failure for
> [schema.xml] analyzer/filter: class org.apache.solr.schema.ICUCollationField
>     at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
>     at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
>     at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:106)
>     at org.apache.solr.core.CoreContainer.create(CoreContainer.java:812)
>     at org.apache.solr.core.CoreContainer.load(CoreContainer.java:510)
>     at org.apache.solr.core.CoreContainer.load(CoreContainer.java:333)
>     at
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:282)
>     at
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:101)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
>     at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
>     at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
>     at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
>     at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
>     at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
>     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
>     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
>     at
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
>     at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
>     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
>     at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
>     at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
>     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
>     at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
>     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
>     at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
>     at
> org.apache.catalina.core.StandardService.start(StandardService.java:525)
>     at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
>     at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:597)
>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: org.apache.solr.common.SolrException: Plugin init failure for
> [schema.xml] analyzer/filter: class org.apache.solr.schema.ICUCollationField
>     at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
>     at
> org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:356)
>     at
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
>     at
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
>     at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:142)
>     ... 34 more
> Caused by: java.lang.ClassCastException: class
> org.apache.solr.schema.ICUCollationField
>     at java.lang.Class.asSubclass(Class.java:3018)
>     at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:409)
>     at
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:430)
>     at
> org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:86)
>     at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:142)
>     ... 38 more
>
> Jul 16, 2012 5:27:48 PM org.apache.solr.core.CoreContainer create
> INFO: Creating SolrCore 'viaf' using instanceDir:
> /usr/local/swissbib/solr.versions/configs/current.home/viaf
> Jul 16, 2012 5:27:48 PM org.apache.solr.core.SolrResourceLoader <init>
>
> **end of Exception***
>
>
> 2012/7/21 Robert Muir <rc...@gmail.com>
>
>> Can you include the entire exception? This is really necessary!
>>
>> On Tue, Jul 17, 2012 at 2:58 AM, Oliver Schihin
>> <ol...@unibas.ch> wrote:
>> > Hello
>> >
>> > According to release notes from 4.0.0-ALPHA, SOLR-2396, I replaced
>> > ICUCollationKeyFilterFactory with ICUCollationField in our schema. But
>> this
>> > throws an exception, see the following excerpt from the log:
>> > ------------------------------------
>> > Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
>> > SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure
>> for
>> > [schema.xml] fieldType "alphaOnlySort": Pl
>> > ugin init failure for [schema.xml] analyzer/filter: class
>> > org.apache.solr.schema.ICUCollationField
>> > at
>> >
>> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
>> > at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
>> > ------------------------------------
>> > The deprecated filter of ICUCollationKeyFilterFactory is working without
>> any
>> > problem. This is how I did the schema (with the deprecated filter):
>> > ------------------------------------
>> >    <!-- field type for sort strings -->
>> >    <fieldType name="alphaOnlySort" class="solr.TextField"
>> > sortMissingLast="true" omitNorms="true">
>> >       <analyzer>
>> >         <tokenizer class="solr.KeywordTokenizerFactory"/>
>> >         <filter class="solr.ICUCollationKeyFilterFactory"
>> >                 locale="de@collation=phonebook"
>> >                 strength="primary"
>> >          />
>> >       </analyzer>
>> >     </fieldType>
>> > ------------------------------------
>> >
>> > Do I have to replace jars in /contrib/analysis-extras/, or any other
>> hints
>> > of what might be wrong in my install and configuration?
>> >
>> > Thanks a lot
>> > Oliver
>> >
>> >
>>
>>
>>
>> --
>> lucidimagination.com
>>



-- 
lucidimagination.com

Re: ICUCollation throws exception

Posted by Günter Hipler <vo...@gmail.com>.
Hi Robert,

instead of my colleague, he is currently away. Subsequently you will see
the entire log. Oliver told me the problem and I had the impression that
something necessary for initialisation is missing. I "googled" a little bit
and found a patch you have done
https://issues.apache.org/jira/secure/attachment/12505302/SOLR-2919.patch
related to "(ICU)CollationKeyFilter". But even initializations like this:

***
  </fieldtype>
+
+    <!-- ignores punctuation and whitespace -->
+    <fieldtype name="sort_ignore_punctuation_t"
class="solr.ICUCollationField"
+               locale="en" strength="primary" alternate="shifted"/>
+    <!-- ignores only whitespace -->
+    <fieldtype name="sort_ignore_space_t" class="solr.ICUCollationField"
+               locale="en" strength="primary" alternate="shifted"
variableTop=" "/>
+    <!-- ignores only accents, but not case -->
+    <fieldtype name="sort_ignore_accents_t" class="solr.ICUCollationField"
+               locale="en" strength="primary" caseLevel="true"/>
+    <!-- sorts numerics in numeric order -->
+    <fieldtype name="sort_numerics_t" class="solr.ICUCollationField"
+               locale="en" numeric="true"/>
+    <!-- sorts uppercase before lowercase -->
+    <fieldtype name="sort_uppercase_first_t"
class="solr.ICUCollationField"
+               locale="en" strength="tertiary" caseFirst="upper"/>
+  </types>

****
didn't work. At least this is what I heard from Oliver.

Thanks and best wishes from Basel

Günter

***Exception**
INFO: Reading Solr Schema
Jul 16, 2012 5:27:48 PM org.apache.solr.schema.IndexSchema readSchema
INFO: Schema name=swissbib-default
Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure for
[schema.xml] fieldType "alphaOnlySort": Plugin init failure for
[schema.xml] analyzer/filter: class org.apache.solr.schema.ICUCollationField
    at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:106)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:812)
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:510)
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:333)
    at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:282)
    at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:101)
    at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
    at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
    at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
    at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for
[schema.xml] analyzer/filter: class org.apache.solr.schema.ICUCollationField
    at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
    at
org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:356)
    at
org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
    at
org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
    at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:142)
    ... 34 more
Caused by: java.lang.ClassCastException: class
org.apache.solr.schema.ICUCollationField
    at java.lang.Class.asSubclass(Class.java:3018)
    at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:409)
    at
org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:430)
    at
org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:86)
    at
org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:142)
    ... 38 more

Jul 16, 2012 5:27:48 PM org.apache.solr.core.CoreContainer create
INFO: Creating SolrCore 'viaf' using instanceDir:
/usr/local/swissbib/solr.versions/configs/current.home/viaf
Jul 16, 2012 5:27:48 PM org.apache.solr.core.SolrResourceLoader <init>

**end of Exception***


2012/7/21 Robert Muir <rc...@gmail.com>

> Can you include the entire exception? This is really necessary!
>
> On Tue, Jul 17, 2012 at 2:58 AM, Oliver Schihin
> <ol...@unibas.ch> wrote:
> > Hello
> >
> > According to release notes from 4.0.0-ALPHA, SOLR-2396, I replaced
> > ICUCollationKeyFilterFactory with ICUCollationField in our schema. But
> this
> > throws an exception, see the following excerpt from the log:
> > ------------------------------------
> > Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
> > SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure
> for
> > [schema.xml] fieldType "alphaOnlySort": Pl
> > ugin init failure for [schema.xml] analyzer/filter: class
> > org.apache.solr.schema.ICUCollationField
> > at
> >
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
> > at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
> > ------------------------------------
> > The deprecated filter of ICUCollationKeyFilterFactory is working without
> any
> > problem. This is how I did the schema (with the deprecated filter):
> > ------------------------------------
> >    <!-- field type for sort strings -->
> >    <fieldType name="alphaOnlySort" class="solr.TextField"
> > sortMissingLast="true" omitNorms="true">
> >       <analyzer>
> >         <tokenizer class="solr.KeywordTokenizerFactory"/>
> >         <filter class="solr.ICUCollationKeyFilterFactory"
> >                 locale="de@collation=phonebook"
> >                 strength="primary"
> >          />
> >       </analyzer>
> >     </fieldType>
> > ------------------------------------
> >
> > Do I have to replace jars in /contrib/analysis-extras/, or any other
> hints
> > of what might be wrong in my install and configuration?
> >
> > Thanks a lot
> > Oliver
> >
> >
>
>
>
> --
> lucidimagination.com
>

Re: ICUCollation throws exception

Posted by Robert Muir <rc...@gmail.com>.
Can you include the entire exception? This is really necessary!

On Tue, Jul 17, 2012 at 2:58 AM, Oliver Schihin
<ol...@unibas.ch> wrote:
> Hello
>
> According to release notes from 4.0.0-ALPHA, SOLR-2396, I replaced
> ICUCollationKeyFilterFactory with ICUCollationField in our schema. But this
> throws an exception, see the following excerpt from the log:
> ------------------------------------
> Jul 16, 2012 5:27:48 PM org.apache.solr.common.SolrException log
> SEVERE: null:org.apache.solr.common.SolrException: Plugin init failure for
> [schema.xml] fieldType "alphaOnlySort": Pl
> ugin init failure for [schema.xml] analyzer/filter: class
> org.apache.solr.schema.ICUCollationField
> at
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:168)
> at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:359)
> ------------------------------------
> The deprecated filter of ICUCollationKeyFilterFactory is working without any
> problem. This is how I did the schema (with the deprecated filter):
> ------------------------------------
>    <!-- field type for sort strings -->
>    <fieldType name="alphaOnlySort" class="solr.TextField"
> sortMissingLast="true" omitNorms="true">
>       <analyzer>
>         <tokenizer class="solr.KeywordTokenizerFactory"/>
>         <filter class="solr.ICUCollationKeyFilterFactory"
>                 locale="de@collation=phonebook"
>                 strength="primary"
>          />
>       </analyzer>
>     </fieldType>
> ------------------------------------
>
> Do I have to replace jars in /contrib/analysis-extras/, or any other hints
> of what might be wrong in my install and configuration?
>
> Thanks a lot
> Oliver
>
>



-- 
lucidimagination.com