我有CodecNotFoundException与下面的stacktrace,而试图 插入数据使用用于与cassandra进行映射的datastax java驱动程序的注释。不一致的错误/异常Codec找不到请求的操作:[float <-> java.lang.Object]和[int <-> java.lang.Object]
异常1 ::
Exception in thread "main" com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [float <-> java.lang.Object]
at com.datastax.driver.core.exceptions.CodecNotFoundException.copy(CodecNotFoundException.java:56)
at com.datastax.driver.core.exceptions.CodecNotFoundException.copy(CodecNotFoundException.java:25)
at com.datastax.driver.mapping.DriverThrowables.propagateCause(DriverThrowables.java:41)
at com.datastax.driver.mapping.Mapper.save(Mapper.java:275)
at com.coreanalytics.componentConfig.ChartConfigInteraction.saveChartConf(ChartConfigInteraction.scala:14)
at com.coreanalytics.componentConfig.testing$.delayedEndpoint$com$coreanalytics$componentConfig$testing$1(ChartConfigInteraction.scala:23)
at com.coreanalytics.componentConfig.testing$delayedInit$body.apply(ChartConfigInteraction.scala:18)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.coreanalytics.componentConfig.testing$.main(ChartConfigInteraction.scala:18)
at com.coreanalytics.componentConfig.testing.main(ChartConfigInteraction.scala)
异常2 ::
Exception in thread "main" com.datastax.driver.core.exceptions.CodecNotFoundException: Codec not found for requested operation: [int <-> java.lang.Object]
at com.datastax.driver.core.exceptions.CodecNotFoundException.copy(CodecNotFoundException.java:56)
at com.datastax.driver.core.exceptions.CodecNotFoundException.copy(CodecNotFoundException.java:25)
at com.datastax.driver.mapping.DriverThrowables.propagateCause(DriverThrowables.java:41)
at com.datastax.driver.mapping.Mapper.save(Mapper.java:275)
at com.coreanalytics.componentConfig.ChartConfigInteraction.saveChartConf(ChartConfigInteraction.scala:14)
at com.coreanalytics.componentConfig.testing$.delayedEndpoint$com$coreanalytics$componentConfig$testing$1(ChartConfigInteraction.scala:23)
at com.coreanalytics.componentConfig.testing$delayedInit$body.apply(ChartConfigInteraction.scala:18)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.coreanalytics.componentConfig.testing$.main(ChartConfigInteraction.scala:18)
at com.coreanalytics.componentConfig.testing.main(ChartConfigInteraction.scala)
的问题是我得到这两个不同的异常,当尝试执行相同的代码。 (相同的表,相同的插入操作,没有变化)(例如对于第一次执行我得到异常与float
和第二次或第三次我得到了与int
之一) 我检查了我的表两次,似乎并没有任何类型的问题,但为什么我得到这个异常?
由于我的表格大约有50列,大约有8个UDT,所以很难在这里显示整个模式。我还使用bean的属性验证了UDT字段类型。遐,我正在使用Scala
做所有这些东西。
说明:我试过更新Guava
依赖关系,但它在FutureCallBack被删除时出现问题。
我知道它应该具有约束力的问题但是我检查两次。即使有约束力的错误,为什么它显示不同的例外?而我的表模式有8个UDT,我不介意,但你认为我应该在这里发布9个表模式和9个bean类? –