You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Roman (Jira)" <ji...@apache.org> on 2022/05/28 19:36:00 UTC

[jira] [Comment Edited] (SOLR-16219) ICUCollationField tried to access protected field org.apache.solr.schema.IndexSchema.luceneVersion

    [ https://issues.apache.org/jira/browse/SOLR-16219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17543522#comment-17543522 ] 

Roman edited comment on SOLR-16219 at 5/28/22 7:35 PM:
-------------------------------------------------------

The problem was with the very first core I've tried to create, so it's something else.

 

I've learned there is now SOLR_MODULES mechanism to add modules.

However, adding

SOLR_MODULES=extraction,analysis-extras

in bin/sorl.in.sh as advised in the documentation leads to

ERROR: Error CREATEing SolrCore 'test3': Unable to create core [test3] Caused by: solr.ICUCollationField

In the analysis-extras README using solrconfig.xml is still being advised. I have not found any documentation on how to add analysis-extras via SOLR_MODULES.

—

As you recommended I've copied analysis-extras/lib/* to solr/lib/* and added -Dsolr.sharedLib=path to the lib,

and after that I am still having exactly same issue as originally.

 

 

 


was (Author: JIRAUSER290157):
The problem was with the very first core I've tried to create, so it's something else.

 

I've learned there is now SOLR_MODULES mechanism to add modules.

However, adding

SOLR_MODULES=extraction,analysis-extras

in bin/sorl.in.sh as advised in the documentation leads to

ERROR: Error CREATEing SolrCore 'test3': Unable to create core [test3] Caused by: solr.ICUCollationField

In the analysis-extras README using solrconfig.xml is still being advised. I have not found any documentation on how to add analysis-extras via SOLR_MODULES.

---

As you recommended I've copied analysis-extras/lib/* to solr/lib/* and added -Dsolr.sharedLib=path to the lib,

and after that I am still having exactly same issue as originally.

 

 

 

 

> ICUCollationField tried to access protected field org.apache.solr.schema.IndexSchema.luceneVersion
> --------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-16219
>                 URL: https://issues.apache.org/jira/browse/SOLR-16219
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 9.0
>            Reporter: Roman
>            Priority: Major
>
> I've tried to recreate Solr 8 configuration in Solr 9, but the following part in the config causes an error when creating core. (not SolrCould environment, if it matters)
> {code:java}
> <fieldType name="text_gen_sort" class="solr.ICUCollationField" locale="" 
> numeric="true" strength="primary" multiValued="true" />{code}
> The following paths has been added in the {{{}solrconfig.xml{}}}:
> {code:java}
> <lib path="..../solr/modules/analysis-extras/lib/solr-analysis-extras-9.0.0.jar" />
> <lib path="..../solr/modules/analysis-extras/lib/icu4j-68.2.jar" />
> <lib path="..../solr/modules/analysis-extras/lib/lucene-analysis-icu-9.0.0.jar" />{code}
> and I checked, that the paths to jars are correct.
> The stack trace is lengthy, here the relevant part of it:
> {code:java}
> <h3>Caused by:</h3><pre>java.lang.IllegalAccessError: 
> class org.apache.solr.schema.ICUCollationField tried to access
> protected field org.apache.solr.schema.IndexSchema.luceneVersion
> (org.apache.solr.schema.ICUCollationField is in
> unnamed module of loader java.net.FactoryURLClassLoader @61639b88;
> org.apache.solr.schema.IndexSchema is in unnamed module of loader
> org.eclipse.jetty.webapp.WebAppClassLoader @6a988392)
> at org.apache.solr.schema.ICUCollationField.init(ICUCollationField.java:128)
> at org.apache.solr.schema.FieldType.setArgs(FieldType.java:202)
> at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:149)
> at org.apache.solr.schema.FieldTypePluginLoader.init(FieldTypePluginLoader.java:43)
> at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:189)
> at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:531)
> at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:188)
> at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:119)
> at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:279)
> at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:51)
> at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:342)
> at org.apache.solr.core.ConfigSetService.lambda$loadConfigSet$0(ConfigSetService.java:253)
> at org.apache.solr.core.ConfigSet.<init>(ConfigSet.java:49)
> at org.apache.solr.core.ConfigSetService.loadConfigSet(ConfigSetService.java:249)
> at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1550)
> at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1426)
> at org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:92){code}
> Previous configuration with the same 3 libraries and the field type worked. I used {{{}bin/solr create_core -c my_core -d my_configset{}}}. The change is in the {{{}managed-schema.xml{}}}. (It used to be just {{manages-schema}} in Solr 8, but I recreated the configuration from the new default.)
> This looks to me like some kind of a bug. What can be the cause of this and how to overcome the problem?
> (I've also created SO question on this - [https://stackoverflow.com/questions/72416721/how-to-configure-icucollationfield-type-in-solr-9] )
>  
> To recreate, just add the above mentioned parts to solrconfig.xml and managed-schema.xml (from _default ) and try to create a core using the configset.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org