com.datastax.driver.core.exceptions.InvalidTypeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • BigInteger columns map to varint in Cassandra. ColumnReader attempts to read varint columns back as Integers, which throws an exception. I have submitted a pull request with a test for this condition and a fix. Stack trace on failure follows: testQueryWithReference(org.springframework.data.cassandra.test.integration.querymethods.bigintparam.BigIntParamIntegrationTests) Time elapsed: 0.212 sec <<< ERROR! com.datastax.driver.core.exceptions.InvalidTypeException: Value number is of type varint at com.datastax.driver.core.AbstractGettableByIndexData.checkType(AbstractGettableByIndexData.java:73) at com.datastax.driver.core.AbstractGettableByIndexData.getInt(AbstractGettableByIndexData.java:119) at com.datastax.driver.core.AbstractGettableData.getInt(AbstractGettableData.java:24) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:71) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:38) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:30) at org.springframework.data.cassandra.convert.BasicCassandraRowValueProvider.getPropertyValue(BasicCassandraRowValueProvider.java:64) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertyFromRow(MappingCassandraConverter.java:186) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:150) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:145) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:309) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertiesFromRow(MappingCassandraConverter.java:145) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readEntityFromRow(MappingCassandraConverter.java:137) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readRow(MappingCassandraConverter.java:114) at org.springframework.data.cassandra.convert.MappingCassandraConverter.read(MappingCassandraConverter.java:202) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.getSingleEntity(AbstractCassandraQuery.java:176) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:133) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:395) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:373) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy52.findThingByBigInteger(Unknown Source) at org.springframework.data.cassandra.test.integration.querymethods.bigintparam.BigIntParamIntegrationTests.testQueryWithReference(BigIntParamIntegrationTests.java:45)
    via by Peter Cable,
  • BigInteger columns map to varint in Cassandra. ColumnReader attempts to read varint columns back as Integers, which throws an exception. I have submitted a pull request with a test for this condition and a fix. Stack trace on failure follows: testQueryWithReference(org.springframework.data.cassandra.test.integration.querymethods.bigintparam.BigIntParamIntegrationTests) Time elapsed: 0.212 sec <<< ERROR! com.datastax.driver.core.exceptions.InvalidTypeException: Value number is of type varint at com.datastax.driver.core.AbstractGettableByIndexData.checkType(AbstractGettableByIndexData.java:73) at com.datastax.driver.core.AbstractGettableByIndexData.getInt(AbstractGettableByIndexData.java:119) at com.datastax.driver.core.AbstractGettableData.getInt(AbstractGettableData.java:24) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:71) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:38) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:30) at org.springframework.data.cassandra.convert.BasicCassandraRowValueProvider.getPropertyValue(BasicCassandraRowValueProvider.java:64) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertyFromRow(MappingCassandraConverter.java:186) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:150) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:145) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:309) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertiesFromRow(MappingCassandraConverter.java:145) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readEntityFromRow(MappingCassandraConverter.java:137) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readRow(MappingCassandraConverter.java:114) at org.springframework.data.cassandra.convert.MappingCassandraConverter.read(MappingCassandraConverter.java:202) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.getSingleEntity(AbstractCassandraQuery.java:176) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:133) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:395) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:373) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy52.findThingByBigInteger(Unknown Source) at org.springframework.data.cassandra.test.integration.querymethods.bigintparam.BigIntParamIntegrationTests.testQueryWithReference(BigIntParamIntegrationTests.java:45)
    via by Peter Cable,
    • com.datastax.driver.core.exceptions.InvalidTypeException: Value number is of type varint at com.datastax.driver.core.AbstractGettableByIndexData.checkType(AbstractGettableByIndexData.java:73) at com.datastax.driver.core.AbstractGettableByIndexData.getInt(AbstractGettableByIndexData.java:119) at com.datastax.driver.core.AbstractGettableData.getInt(AbstractGettableData.java:24) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:71) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:38) at org.springframework.data.cassandra.convert.ColumnReader.get(ColumnReader.java:30) at org.springframework.data.cassandra.convert.BasicCassandraRowValueProvider.getPropertyValue(BasicCassandraRowValueProvider.java:64) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertyFromRow(MappingCassandraConverter.java:186) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:150) at org.springframework.data.cassandra.convert.MappingCassandraConverter$1.doWithPersistentProperty(MappingCassandraConverter.java:145) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:309) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readPropertiesFromRow(MappingCassandraConverter.java:145) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readEntityFromRow(MappingCassandraConverter.java:137) at org.springframework.data.cassandra.convert.MappingCassandraConverter.readRow(MappingCassandraConverter.java:114) at org.springframework.data.cassandra.convert.MappingCassandraConverter.read(MappingCassandraConverter.java:202) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.getSingleEntity(AbstractCassandraQuery.java:176) at org.springframework.data.cassandra.repository.query.AbstractCassandraQuery.execute(AbstractCassandraQuery.java:133) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:395) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:373) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy52.findThingByBigInteger(Unknown Source) at org.springframework.data.cassandra.test.integration.querymethods.bigintparam.BigIntParamIntegrationTests.testQueryWithReference(BigIntParamIntegrationTests.java:45)
    No Bugmate found.