adejanovski / cassandra-jdbc-wrapper

A JDBC wrapper for the Datastax Java Driver for Cassandra
Apache License 2.0
53 stars 36 forks source link

CodecNotFoundException: Codec not found for requested operation: [varint <-> java.lang.Integer] #33

Open dv8472 opened 4 years ago

dv8472 commented 4 years ago

Hi, I've been studing the cassandra a little, and have found a possible issue.

I've followed this tutorial. Columns emp_phone and emp_sal are of "varint" data type. Data inserted as mentioned on the tutorial. Following simple select * from emp;, in the GUI i'm seeing following error (while in the cqlsh the select works well):

com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [varint <-> java.lang.Integer] at com.datastax.driver.core.CodecRegistry.notFound(CodecRegistry.java:679) at com.datastax.driver.core.CodecRegistry.createCodec(CodecRegistry.java:526) at com.datastax.driver.core.CodecRegistry.findCodec(CodecRegistry.java:506) at com.datastax.driver.core.CodecRegistry.access$200(CodecRegistry.java:140) at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:211) at com.datastax.driver.core.CodecRegistry$TypeCodecCacheLoader.load(CodecRegistry.java:208) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) at com.google.common.cache.LocalCache.get(LocalCache.java:3934) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) at com.datastax.driver.core.CodecRegistry.lookupCodec(CodecRegistry.java:480) at com.datastax.driver.core.CodecRegistry.codecFor(CodecRegistry.java:448) at com.datastax.driver.core.CodecRegistry.codecFor(CodecRegistry.java:430) at com.datastax.driver.core.AbstractGettableByIndexData.codecFor(AbstractGettableByIndexData.java:69) at com.datastax.driver.core.AbstractGettableByIndexData.getInt(AbstractGettableByIndexData.java:139) at com.datastax.driver.core.AbstractGettableData.getInt(AbstractGettableData.java:26) at com.github.adejanovski.cassandra.jdbc.CassandraResultSet.getObject(CassandraResultSet.java:757) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCResultSetImpl.getObject(JDBCResultSetImpl.java:612) at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCNumberValueHandler.fetchColumnValue(JDBCNumberValueHandler.java:154) at org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCAbstractValueHandler.fetchValueObject(JDBCAbstractValueHandler.java:49) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataReceiver.fetchRow(ResultSetDataReceiver.java:124) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.fetchQueryData(SQLQueryJob.java:679) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:506) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:424) at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:164) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:416) at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:774) at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2914) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:110) at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:164) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:108) at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$17.run(ResultSetViewer.java:3421) at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:103) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)