On Mon, Oct 25, 2010 at 2:45 AM, Alex Matviychuk <alex...@gmail.com> wrote:

> 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>
>
>
> Any ideas?
>
> Thanks,
> Alex Matviychuk
>


Alex,

I've run into this issue myself, and it was because I tried to create a
fieldType called string (like you). Rename "string" to something else and
the exception should go away.

- Ken

Reply via email to