草庐IT

CodecConfigurationException

全部标签

scala错误:org.bson.codecs.configuration.codecconfigurationException:找不到class scala的编解码器。

我正在尝试获得Mongo查询结果的数量,但是我会遇到错误org.bson.codecs.configuration.codecconfigurationexception:找不到classscala.mose的编解码器。有人可以帮忙吗?这是我的代码:deffetchData()={valmongoClient=MongoClient("mongodb://127.0.0.1")valdatabase=mongoClient.getDatabase("assignment")valmovieCollection=database.getCollection("movies")valratingC

mongodb - org.bson.codecs.configuration.CodecConfigurationException : Can't find a codec for class org. springframework.data.mongodb.core.query.GeoCommand

我正在使用如下聚合:finalListaggregations=newArrayList();Polygonpolygon=newPolygon(newPoint(-26.28125,42.19231862526141),newPoint(100.28125,64.7157757187955),newPoint(100.28125,42.19231862526141),newPoint(-26.28125,64.7157757187955));AggregationOperationmatch=newMatchOperation(Criteria.where("location").w

mongodb - org.bson.codecs.configuration.CodecConfigurationException : Can't find a codec for class [Ljava. lang.String;

我想运行以下命令来使用MongoDBJava驱动程序创建用户,client=newMongoClient(mongoClientURI);MongoDatabasedatabase=client.getDatabase("db_1");DocumentcreateUserCommand=newDocument();createUserCommand.put("createUser","abc");createUserCommand.put("pwd","abc");createUserCommand.put("roles",newString[]{"userAdmin","read",

mongodb - Mongo-Scala-Driver:CodecConfigurationException:找不到类 immutable.Document 的编解码器

错误信息:org.bson.codecs.configuration.CodecConfigurationException:Can'tfindacodecforclassorg.mongodb.scala.bson.collection.immutable.Document代码:defqueueWrite(collection:String,filter:Map[String,()=>String],data:Map[String,()=>String]){valcol=collections.get(collection).getvalfilterBson=Document()fi

java - mongo-operations spring mongo批量操作执行异常(CodecConfigurationException : Can't find a codec for class)

我尝试使用springmongo操作类在mongodb中执行批量操作。这些是我的POJO类:@Document(collection="location_settings_mst")publicclassLocationSettingsEntity{@IdprivateStringid;@Field("userId")privateStringuserId;@Field("location")privateListlocationSettings=newLinkedList();//GettersandSetters}publicclassLocationSettingEntity{@

java - MongoDB Java 插入抛出 org.bson.codecs.configuration.CodecConfigurationException : Can't find a codec for class io. github.ilkgunel.mongodb.Pojo

我正在使用Java学习MongoDB。我正在尝试使用Java驱动程序将数据插入MongoDB。我正在像MongoDB教程中一样进行插入,而且一切都很好。但是如果我想插入一个变量,当我运行代码时,驱动程序会抛出这样的错误:org.bson.codecs.configuration.CodecConfigurationException:Can'tfindacodecforclassio.github.ilkgunel.mongodb.Pojo.我在StackOverflow中搜索过这样的问题,但我什么都不懂,也找不到任何东西可以解决这个错误。我的代码如下。如何解决这个问题?我正在使用此代

java - MongoDB Java 插入抛出 org.bson.codecs.configuration.CodecConfigurationException : Can't find a codec for class io. github.ilkgunel.mongodb.Pojo

我正在使用Java学习MongoDB。我正在尝试使用Java驱动程序将数据插入MongoDB。我正在像MongoDB教程中一样进行插入,而且一切都很好。但是如果我想插入一个变量,当我运行代码时,驱动程序会抛出这样的错误:org.bson.codecs.configuration.CodecConfigurationException:Can'tfindacodecforclassio.github.ilkgunel.mongodb.Pojo.我在StackOverflow中搜索过这样的问题,但我什么都不懂,也找不到任何东西可以解决这个错误。我的代码如下。如何解决这个问题?我正在使用此代

spring - 使用 Spring Boot >= 2.0.1.RELEASE 将 ZonedDateTime 保存到 MongoDB 时出现 CodecConfigurationException

我能够通过对AccessingDatawithMongoDB的官方SpringBoot指南进行最小修改来重现我的问题,见https://github.com/thokrae/spring-data-mongo-zoneddatetime.将java.time.ZonedDateTime字段添加到Customer类后,运行指南中的示例代码失败并出现CodecConfigurationException:客户.java:publicStringlastName;publicZonedDateTimecreated;publicCustomer(){输出:...Causedby:org.bs