Solr
  1. Solr
  2. SOLR-2196

ClassCastException when parsing schema.xml on startup

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: Schema and Analysis
    • Labels:
      None
    • Environment:

      Linux x64, Tomcat, EmbeddedSolr

      Description

      Getting this when deploying to tomcat:

      [INFO][http-4443-exec-3][solr.schema.IndexSchema] readSchema():394
      Reading Solr Schema
      [INFO][http-4443-exec-3][solr.schema.IndexSchema] readSchema():408
      Schema name=tsadmin
      [ERROR][http-4443-exec-3][util.plugin.AbstractPluginLoader] log():139
      java.lang.ClassCastException: org.apache.solr.schema.StrField cannot
      be cast to org.apache.solr.schema.FieldType
      at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:419)
      at org.apache.solr.schema.IndexSchema$1.create(IndexSchema.java:447)
      at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:141)
      at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:456)
      at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:95)
      at org.apache.solr.core.SolrCore.<init>(SolrCore.java:520)
      at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)

      solr schema:

      <?xml version="1.0" encoding="UTF-8" ?>
      <schema name="tsadmin" version="1.2">
      <types>
      <fieldType name="string" class="solr.StrField"
      sortMissingLast="true" omitNorms="true"/>
      ...
      </types>
      <fields>
      <field name="type" type="string" required="true"/>
      ...
      </fields>
      </schema>

        Activity

        Hide
        Jan Høydahl added a comment -

        Closing ancient bug which probably is no bug. Alex, please re-open if you still face issues and have more info.

        Show
        Jan Høydahl added a comment - Closing ancient bug which probably is no bug. Alex, please re-open if you still face issues and have more info.

          People

          • Assignee:
            Unassigned
            Reporter:
            Alex Matviychuk
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development