1 Reply Latest reply on Dec 13, 2016 8:29 AM by Steven Hawkins

    WrappedConnection cannot be cast to CassandraConnection

    Vijay K Newbie

      I have configured Cassandra 2.1.16 + Teiid WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) + JDK 8 + cassandra-driver-core-2.1.3.jar and its dependencies

       

      The VDB gets deployed fine, but when I query the table from Cassandra using Teiid JDBC driver, I am getting bellow error at the server side

       

      17:14:57,601 ERROR [org.teiid.PROCESSOR] (Worker6_QueryProcessorQueue41) CPE/DaOAQ28b TEIID30019 Unexpected exception for request CPE/DaOAQ28b.5: java.lang.ClassCastException: org.teiid.resource.spi.WrappedConnection cannot be cast to org.teiid.translator.cassandra.CassandraConnection

        at org.teiid.translator.cassandra.CassandraExecutionFactory.initCapabilities(CassandraExecutionFactory.java:50)

        at org.teiid.dqp.internal.datamgr.ConnectorManager.buildCapabilities(ConnectorManager.java:186)

        at org.teiid.dqp.internal.datamgr.ConnectorManager.getCapabilities(ConnectorManager.java:163)

        at org.teiid.dqp.internal.process.CachedFinder.findCapabilities(CachedFinder.java:108)

        at org.teiid.query.metadata.TempCapabilitiesFinder.findCapabilities(TempCapabilitiesFinder.java:80)

        at org.teiid.query.optimizer.relational.rules.CapabilitiesUtil.getCapabilities(CapabilitiesUtil.java:439)

        at org.teiid.query.optimizer.relational.rules.CapabilitiesUtil.supports(CapabilitiesUtil.java:459)

        at org.teiid.query.optimizer.relational.rules.CapabilitiesUtil.requiresCriteria(CapabilitiesUtil.java:444)

        at org.teiid.query.optimizer.relational.rules.RulePlaceAccess.addAccessNode(RulePlaceAccess.java:196)

        at org.teiid.query.optimizer.relational.rules.RulePlaceAccess.execute(RulePlaceAccess.java:86)

        at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:859)

        at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:225)

        at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159)

        at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:445)

        at org.teiid.dqp.internal.process.Request.processRequest(Request.java:473)

        at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642)

        at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337)

        at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)

        at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)

        at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)

        at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:745)