SolrException Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'
Asked Answered
I

2

13

I am getting this error

collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core collection1: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'.

when i am trying to import collection 1 (solr 4.5) schema to solr 5.1.

I only copy collection 1 from different machine where solr 4.5 running and paste here /solr/server/solr/collection1 where solr 5.1 running and restart solr. Sorry i am beginner don't know much about solr just follow some tutorials.

log

org.apache.solr.common.SolrException: Could not load conf for core collection1: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'. Schema file is /home/jackson/Downloads/solr/server/solr/collection1/conf/schema.xml
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:78)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:516)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:283)
    at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:277)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'. Schema file is /home/jackson/Downloads/solr/server/solr/collection1/conf/schema.xml
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:596)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:175)
    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:102)
    at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:74)
    ... 7 more
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "pint": Error loading class 'solr.IntField'
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
    at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:489)
    ... 12 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.IntField'
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:492)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:561)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:526)
    at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:519)
    at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:80)
    at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:42)
    at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
    ... 13 more
Caused by: java.lang.ClassNotFoundException: solr.IntField
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:274)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:476)

Thanks

Inca answered 12/5, 2015 at 12:16 Comment(2)
Could you please provide the full log..?Aleasealeatory
@AbhijitBashetti just edited question with log. kindly check nowInca
A
3

I think in your earlier version of schema.xml you had a field type of pint And now in the current version it is not supported as I don't see the fieldType in schema.xml (in the default one when I download the Solr.5.1.0).

Replace/Remove it and the error will get corrected.

This fieldType was there in the earlier version (I used 3.4)

<fieldType name="pint" class="solr.IntField" omitNorms="true"/>

In the current 5.1.0 I don't see this field type.

Or

You should replace solr.IntField with solr.TrieIntField

Aleasealeatory answered 12/5, 2015 at 12:34 Comment(6)
yes by removing that field that error goes but new i have new error :( org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.JsonUpdateRequestHandler'Inca
Looking at the error it that hander is been removed from the solrConfig.xmlAleasealeatory
yes it been removed from the solrCOnfig.xml <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler" startup="lazy"/>Aleasealeatory
The JSON update request handler was added in Solr 3.1.Aleasealeatory
Yes you are right issues.apache.org/jira/browse/SOLR-5404 i guess i need to change whole schema ;)Inca
collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher new error ;)Inca
P
24

You should replace solr.IntField with solr.TrieIntField

The documentation for solr.IntField says:

Deprecated. this class will be removed in 5.0 - use TrieIntField instead

Proa answered 8/7, 2015 at 16:52 Comment(0)
A
3

I think in your earlier version of schema.xml you had a field type of pint And now in the current version it is not supported as I don't see the fieldType in schema.xml (in the default one when I download the Solr.5.1.0).

Replace/Remove it and the error will get corrected.

This fieldType was there in the earlier version (I used 3.4)

<fieldType name="pint" class="solr.IntField" omitNorms="true"/>

In the current 5.1.0 I don't see this field type.

Or

You should replace solr.IntField with solr.TrieIntField

Aleasealeatory answered 12/5, 2015 at 12:34 Comment(6)
yes by removing that field that error goes but new i have new error :( org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.JsonUpdateRequestHandler'Inca
Looking at the error it that hander is been removed from the solrConfig.xmlAleasealeatory
yes it been removed from the solrCOnfig.xml <requestHandler name="/update/json" class="solr.JsonUpdateRequestHandler" startup="lazy"/>Aleasealeatory
The JSON update request handler was added in Solr 3.1.Aleasealeatory
Yes you are right issues.apache.org/jira/browse/SOLR-5404 i guess i need to change whole schema ;)Inca
collection1: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher new error ;)Inca

© 2022 - 2024 — McMap. All rights reserved.