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 Salvo Bonanno <sa...@gmail.com> on 2018/08/29 07:27:06 UTC
SolrCore Initialization Failure Error loading class 'solr.IntField'
Hello Everyone!
I have a strange problem, I'm trying to move an existing and working
configuration of Apache Solr from a server to another one.
The configuration is really simple since it's still incomplete, i've
just create the core and create a managed-schema.
The core is running flawlessy on the former server, but on the new
one, with the exactly same configutation, gives an Initialitation
Error.
[error]
corename: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
Could not load conf for core corename: Can't load schema
/opt/solr/server/solr/corename/conf/managed-schema: Plugin init
failure for [schema.xml] fieldType "long": Error loading class
'solr.IntPointField '
Please check your logs for more information
[/error]
Here's the snippet from the schema
[schema]
<fieldType name="int" class="solr.IntPointField"
positionIncrementGap="0" docValues="true" precisionStep="0"/>
<field name="_version_" type="long" indexed="true" stored="false"/>
<fieldType name="long" class="solr.IntPointField "
positionIncrementGap="0" docValues="true" precisionStep="0"/>
<fieldType name="plongs" class="solr.LongPointField"
positionIncrementGap="0" docValues="true" precisionStep="0"/>
<fieldType name="pdates" class="solr.DatePointField "
docValues="true" multiValued="true"/>
<fieldType name="pdoubles" class="solr.DoublePointField "
positionIncrementGap="0" docValues="true" precisionStep="0"/>
[/schema]
The schema contains the same fields on both server with the same
version of Solr but one works, the other one doesn't!
Other noticable differences is the java version... but I believe that
this shouldn't matter:
# NEW SERVER
solr-ypa solr]$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
# FORMER SERVER
[solr@localhost ~]$ java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
Can someone gives me a hint? Thanks in advance
Re: SolrCore Initialization Failure Error loading class
'solr.IntField'
Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/30/2018 3:14 AM, Salvo Bonanno wrote:
> The solr version in both enviroment is 7.4.0
>
> Looks that there was a problem using the intPointField type for a key
> field in my schema, I've changed the type to string and now everything
> works.
Seeing that problem in 7.4.0 definitely sounds like you've got a problem
with extra copies of jars on your classpath. The problems get even
worse if the extra copies are a different version. If extra jars are
present, you might run into additional problems.
If using a string type (which is usually solr.StrField) works for you,
then great, you might be done configuring that field.
Thanks,
Shawn
Re: SolrCore Initialization Failure Error loading class 'solr.IntField'
Posted by Salvo Bonanno <sa...@gmail.com>.
The solr version in both enviroment is 7.4.0
Looks that there was a problem using the intPointField type for a key
field in my schema, I've changed the type to string and now everything
works.
Thanks everyone for the replies.
On Wed, Aug 29, 2018 at 9:39 PM Shawn Heisey <ap...@elyograg.org> wrote:
>
> On 8/29/2018 1:27 AM, Salvo Bonanno wrote:
> > [error]
> > corename: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> > Could not load conf for core corename: Can't load schema
> > /opt/solr/server/solr/corename/conf/managed-schema: Plugin init
> > failure for [schema.xml] fieldType "long": Error loading class
> > 'solr.IntPointField'
>
> As Erick mentioned, this could be caused by running a version of Solr
> that doesn't have Point field classes. I probably wouldn't try to use
> Points unless I were on the latest 6.x release (6.6.5 right now) or a
> 7.x release. If the version isn't the problem, read on.
>
> What might be happening here is that the Solr jars (the ones that are
> part of Solr itself, like solr-core-7.4.0.jar) are on your classpath
> more than once. They could even be the exact same version as the Solr
> version you're running, but if they are on the classpath more than once,
> it's very confusing to Java, and interferes with attempts to load classes.
>
> Thanks,
> Shawn
>
Re: SolrCore Initialization Failure Error loading class
'solr.IntField'
Posted by Shawn Heisey <ap...@elyograg.org>.
On 8/29/2018 1:27 AM, Salvo Bonanno wrote:
> [error]
> corename: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> Could not load conf for core corename: Can't load schema
> /opt/solr/server/solr/corename/conf/managed-schema: Plugin init
> failure for [schema.xml] fieldType "long": Error loading class
> 'solr.IntPointField'
As Erick mentioned, this could be caused by running a version of Solr
that doesn't have Point field classes. I probably wouldn't try to use
Points unless I were on the latest 6.x release (6.6.5 right now) or a
7.x release. If the version isn't the problem, read on.
What might be happening here is that the Solr jars (the ones that are
part of Solr itself, like solr-core-7.4.0.jar) are on your classpath
more than once. They could even be the exact same version as the Solr
version you're running, but if they are on the classpath more than once,
it's very confusing to Java, and interferes with attempts to load classes.
Thanks,
Shawn
Re: SolrCore Initialization Failure Error loading class 'solr.IntField'
Posted by Erick Erickson <er...@gmail.com>.
What versions of Solr? Point fields were introduced in around Solr
6.2. It looks like your new server is running some earlier version of
Solr perhaps?
Best,
Erick
On Wed, Aug 29, 2018 at 12:27 AM Salvo Bonanno <sa...@gmail.com> wrote:
>
> Hello Everyone!
>
> I have a strange problem, I'm trying to move an existing and working
> configuration of Apache Solr from a server to another one.
>
> The configuration is really simple since it's still incomplete, i've
> just create the core and create a managed-schema.
>
> The core is running flawlessy on the former server, but on the new
> one, with the exactly same configutation, gives an Initialitation
> Error.
>
> [error]
> corename: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> Could not load conf for core corename: Can't load schema
> /opt/solr/server/solr/corename/conf/managed-schema: Plugin init
> failure for [schema.xml] fieldType "long": Error loading class
> 'solr.IntPointField '
>
> Please check your logs for more information
> [/error]
>
> Here's the snippet from the schema
> [schema]
> <fieldType name="int" class="solr.IntPointField"
> positionIncrementGap="0" docValues="true" precisionStep="0"/>
> <field name="_version_" type="long" indexed="true" stored="false"/>
> <fieldType name="long" class="solr.IntPointField "
> positionIncrementGap="0" docValues="true" precisionStep="0"/>
> <fieldType name="plongs" class="solr.LongPointField"
> positionIncrementGap="0" docValues="true" precisionStep="0"/>
> <fieldType name="pdates" class="solr.DatePointField "
> docValues="true" multiValued="true"/>
> <fieldType name="pdoubles" class="solr.DoublePointField "
> positionIncrementGap="0" docValues="true" precisionStep="0"/>
> [/schema]
>
> The schema contains the same fields on both server with the same
> version of Solr but one works, the other one doesn't!
>
> Other noticable differences is the java version... but I believe that
> this shouldn't matter:
>
> # NEW SERVER
> solr-ypa solr]$ java -version
> openjdk version "1.8.0_181"
> OpenJDK Runtime Environment (build 1.8.0_181-b13)
> OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
>
> # FORMER SERVER
> [solr@localhost ~]$ java -version
> openjdk version "1.8.0_161"
> OpenJDK Runtime Environment (build 1.8.0_161-b14)
> OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
>
> Can someone gives me a hint? Thanks in advance