I am using Solr 4.6.0 and trying to import my data using CachedSqlEntityProcessor, but somehow I end up getting a ClassCastException.
This is a regression coming out of the introduction of pluggable cache support in https://issues.apache.org/jira/browse/SOLR-2382 and the workaround (working for me) is to cast to strings in all columns that you will use as either keys or values. In PostgreSQL cast syntax:
(and in other DBs I guess you need CAST(id AS VARCHAR(10) or such instead of id::text).