[
https://issues.apache.org/jira/browse/SOLR-9179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397462#comment-15397462
]
Colvin Cowie commented on SOLR-9179:
------------------------------------
So, I've had a look what is happening.
It appears that in the IBM JVM the assignment of {{nameMapping}} in
{{SchemaProps}} happens before the {{Handler}} enum values have been
constructed, while in the Oracle JVM the assignment only happens when
{{nameMapping}} is actually referenced from {{SchemaHandler#handleGET}}. The
assignment of {{nameMapping}} results in a call to {{Handler.values()}} which
blows up since the values aren't constructed yet.
The premature assignment of {{nameMapping}} appears to happen as a result of
the functions being from SchemaProps -> Object, which leads to the IBM JVM
trying to initialize the static fields on {{SchemaProps}} as soon as it hits
{{sp -> sp.schema.getSchemaName()}}.
Moving {{nameMapping}} out of {{SchemaProps}} and into {{IndexSchema}} itself
'fixes' the problem it seems.
I'll raise a PMR on the IBM JVM and see what happens.
> Error Initializing Schema
> --------------------------
>
> Key: SOLR-9179
> URL: https://issues.apache.org/jira/browse/SOLR-9179
> Project: Solr
> Issue Type: Bug
> Components: Schema and Analysis
> Affects Versions: 6.0.1
> Environment: SOLR 6.0.1 running under Tomcat 8.0.35 on IBM System I
> Reporter: Andrew Bennison
> Attachments: solr.log
>
>
> After upgrade from 6.0.0 to 6.0.1 am getting Schema Initialization Errors.
> If I switch from ClassicSchema to Managed the Core will load first time,
> however subsequent loads will fail.
> Error received is :
> org.apache.solr.common.SolrException: java.lang.ExceptionInInitializerError
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:771)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:642)
> at org.apache.solr.core.CoreContainer.create(CoreContainer.java:817)
> at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:88)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:468)
> at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:459)
> at java.util.concurrent.FutureTask.run(FutureTask.java:277)
> at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
> at
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$1.00000000948BC950.run(Unknown
> Source)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.lang.Thread.run(Thread.java:785)
> Caused by: java.lang.BootstrapMethodError:
> java.lang.ExceptionInInitializerError
> at
> org.apache.solr.schema.IndexSchema$SchemaProps$Handler.<clinit>(IndexSchema.java:1392)
> at org.apache.solr.handler.SchemaHandler.<clinit>(SchemaHandler.java:62)
> at java.lang.Class.forNameImpl(Native Method)
> at java.lang.Class.forName(Class.java:343)
> at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:530)
> at
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:467)
> at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:565)
> at org.apache.solr.core.PluginBag.createPlugin(PluginBag.java:121)
> at org.apache.solr.core.PluginBag.init(PluginBag.java:221)
> at
> org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:130)
> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:727)
> ... 11 more
> Caused by: java.lang.ExceptionInInitializerError
> at java.lang.J9VMInternals.ensureError(J9VMInternals.java:137)
> at
> java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:126)
> at java.lang.Class.forNameImpl(Native Method)
> at java.lang.Class.forName(Class.java:343)
> at
> java.lang.invoke.MethodType.nonPrimitiveClassFromString(MethodType.java:311)
> at java.lang.invoke.MethodType.parseIntoClasses(MethodType.java:373)
> at
> java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:286)
> at
> java.lang.invoke.MethodHandle.sendResolveMethodHandle(MethodHandle.java:961)
> at java.lang.invoke.MethodHandle.getCPMethodHandleAt(Native Method)
> at
> java.lang.invoke.MethodHandle.resolveInvokeDynamic(MethodHandle.java:852)
> ... 22 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.solr.schema.IndexSchema$SchemaProps$Handler.values(IndexSchema.java:1391)
> at
> org.apache.solr.schema.IndexSchema$SchemaProps.<clinit>(IndexSchema.java:1503)
> ... 30 more
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]