4 Replies Latest reply on Feb 24, 2014 8:00 AM by Alex K.

    Select from With fails on Teiid 8.7-beta1

    Alex K. Newbie

      Hi,

       

      following query fails for me on Teiid 8.7-beta1

      selectq.str_a, q.a from(WITH qry_0 as
          (SELECT
                     t.f AS a1, t.e as str 
               FROM
                      ds.test_e AS t 
                      )
      SELECTa1 asa, str asstr_a fromqry_0) asq groupbyq.str_a, q.a;
      
      


      Exception:

       

      ERROR [org.teiid.TRANSPORT] (New I/O worker #2) null TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype string for column 0 doesn't match the runtime type "java.lang.Long". Please ensure that the column's modeled datatype matches the expected data.
              at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:136) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.2.Final.jar:]
              at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.2.Final.jar:]
              at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.2.Final.jar:]
              at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:87) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:87) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:903) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:633) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:218) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:189) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:435) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:320) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:273) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.7.0.Beta1.jar:8.7.0.Beta1]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
              at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
      Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype string for column 0 doesn't match the runtime type "java.lang.Long". Please ensure that the column's modeled datatype matches the expected data.
              at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:851) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:317) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1456) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_25]
              at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1456) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175) [rt.jar:1.7.0_25]
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_25]
              at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.7.0.Beta1.jar:8.7.0.Beta1]
              ... 25 more
      Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
              at org.teiid.client.BatchSerializer$StringColumnSerializer3.writeObject(BatchSerializer.java:338) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:506) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:840) [teiid-client-8.7.0.Beta1.jar:8.7.0.Beta1]
              ... 36 more
      
      

       

      Should I log it?