title: Host replied with server error: java.lang.String cannot be cast to java.util.UUID
body: <p>I am using Datastax solution (DSE).</p>
  
  <p>Here is Cassandra model:</p>
  
  <pre><code>CREATE TABLE mykeyspace.mytable (
  uid uuid,
  date_tsp timestamp,
  solr_query text,
  text_txt text,
  PRIMARY KEY (uid, date_tsp)
  )
  </code></pre>
  
  <p>my solr schema.xml:</p>
  
  <pre><code>&lt;schema name="mytable" version="1.5"&gt;
   &lt;types&gt;
    &lt;fieldType name="uuid" class="solr.UUIDField"/&gt;
    &lt;fieldType name="text" class="solr.TextField"/&gt;
    &lt;fieldType name="date" class="solr.TrieDateField"/&gt;
   &lt;/types&gt;
  
   &lt;fields&gt;
    &lt;field name="uid"  type="uuid" indexed="true"  stored="true" docValues="true"/&gt;
    &lt;field name="date_tsp"  type="date" indexed="true"  stored="true" docValues="true"/&gt;
    &lt;field name="text_txt"  type="text" indexed="true"  stored="true"/&gt;
   &lt;/fields&gt;
  
   &lt;defaultSearchField&gt;text_txt&lt;/defaultSearchField&gt;
   &lt;uniqueKey&gt;(uid, date_tsp)&lt;/uniqueKey&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>Data:</p>
  
  <pre><code>insert into mytable (uid, date_tsp, text_txt)
  values (75803436-289c-4131-a766-6ba4b7151983, dateof(now()), 'text 1');
  
  insert into mytable (uid, date_tsp, text_txt)
  values (75803436-289c-4131-a766-6ba4b7151983, dateof(now()), 'text 2');
  
  insert into mytable (uid, date_tsp, text_txt)
  values (75803436-289c-4131-a766-6ba4b7151983, dateof(now()), 'text 3');
  
  insert into mytable (uid, date_tsp, text_txt)
  values (uuid(), dateof(now()), 'text 11');
  </code></pre>
  
  <p>Working Cassandra queries (run from Datastax DevCenter):</p>
  
  <pre><code>SELECT * FROM text_heard WHERE solr_query='*1*';
  
  SELECT uid, date_tsp, text_txt FROM text_heard 
  WHERE uid = 75803436-289c-4131-a766-6ba4b7151983;
  
  SELECT date_tsp, text_txt FROM text_heard 
  WHERE uid = 75803436-289c-4131-a766-6ba4b7151983 
  AND solr_query = 'text_txt:*1*';
  </code></pre>
  
  <p>but query (with <strong>uid</strong> in SELECT clause):</p>
  
  <pre><code>SELECT uid, date_tsp, text_txt FROM text_heard 
  WHERE uid = 75803436-289c-4131-a766-6ba4b7151983 
  AND solr_query = 'text_txt:*1*';
  </code></pre>
  
  <p>produces an error:</p>
  
  <pre><code>java.lang.ClassCastException: java.lang.String cannot be cast to java.util.UUID
  at org.apache.cassandra.serializers.UUIDSerializer.serialize(UUIDSerializer.java:26) ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
  at org.apache.cassandra.db.marshal.AbstractType.decompose(AbstractType.java:73) ~[cassandra-all-2.1.8.621.jar:2.1.8.621]
  at com.datastax.bdp.search.solr.cql.SinglePassRowResponseHandler.buildCassandraRows(SinglePassRowResponseHandler.java:140) ~[dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.search.solr.cql.SinglePassRowResponseHandler.handle(SinglePassRowResponseHandler.java:49) ~[dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.handleSolrResponse(CqlSolrQueryExecutor.java:370) [dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.search.solr.cql.CqlSolrQueryExecutor.execute(CqlSolrQueryExecutor.java:134) [dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.cassandra.cql3.SolrOperationFactory$SolrStatementExecution.execute(SolrOperationFactory.java:71) [dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithTiming(DseQueryHandler.java:223) [dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.cassandra.cql3.DseQueryHandler$Operation.executeWithAuditLogging(DseQueryHandler.java:259) [dse-4.7.2.jar:4.7.2]
  at com.datastax.bdp.cassandra.cql3.DseQueryHandler.process(DseQueryHandler.java:94) [dse-4.7.2.jar:4.7.2]
  at org.apache.cassandra.transport.messages.QueryMessage.execute(QueryMessage.java:119) [cassandra-all-2.1.8.621.jar:2.1.8.621]
  at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:439) [cassandra-all-2.1.8.621.jar:2.1.8.621]
  at org.apache.cassandra.transport.Message$Dispatcher.channelRead0(Message.java:335) [cassandra-all-2.1.8.621.jar:2.1.8.621]
  at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [netty-all-4.0.23.Final.jar:4.0.23.Final]
  at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333) [netty-all-4.0.23.Final.jar:4.0.23.Final]
  at io.netty.channel.AbstractChannelHandlerContext.access$700(AbstractChannelHandlerContext.java:32) [netty-all-4.0.23.Final.jar:4.0.23.Final]
  at io.netty.channel.AbstractChannelHandlerContext$8.run(AbstractChannelHandlerContext.java:324) [netty-all-4.0.23.Final.jar:4.0.23.Final]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_71]
  at org.apache.cassandra.concurrent.AbstractTracingAwareExecutorService$FutureTask.run(AbstractTracingAwareExecutorService.java:164) [cassandra-all-2.1.8.621.jar:2.1.8.621]
  at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:105) [cassandra-all-2.1.8.621.jar:2.1.8.621]
  at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
  </code></pre>
  
  <p>Is it something in my settings or is it a bug?</p>