ltsopensource / light-task-scheduler

Distributed Scheduled Job Framework
Apache License 2.0
3.01k stars 1.15k forks source link

Can't find a codec for class com.github.ltsopensource.biz.logger.domain.JobLogPo. #391

Open kervin521 opened 6 years ago

kervin521 commented 6 years ago

消息队列使用mongo报错

org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class com.github.ltsopensource.biz.logger.domain.JobLogPo. at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46) ~[mongo-java-driver-3.0.2.jar:na] at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63) ~[mongo-java-driver-3.0.2.jar:na] at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:37) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:210) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBObjectCodec.encodeIterable(DBObjectCodec.java:269) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBObjectCodec.writeValue(DBObjectCodec.java:198) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:128) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBObjectCodec.encode(DBObjectCodec.java:61) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.CompoundDBObjectCodec.encode(CompoundDBObjectCodec.java:48) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.CompoundDBObjectCodec.encode(CompoundDBObjectCodec.java:27) ~[mongo-java-driver-3.0.2.jar:na] at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:63) ~[mongo-java-driver-3.0.2.jar:na] at org.bson.codecs.BsonDocumentWrapperCodec.encode(BsonDocumentWrapperCodec.java:29) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.InsertCommandMessage.writeTheWrites(InsertCommandMessage.java:99) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.InsertCommandMessage.writeTheWrites(InsertCommandMessage.java:43) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.BaseWriteCommandMessage.encodeMessageBody(BaseWriteCommandMessage.java:112) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.BaseWriteCommandMessage.encodeMessageBody(BaseWriteCommandMessage.java:35) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.RequestMessage.encode(RequestMessage.java:132) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.BaseWriteCommandMessage.encode(BaseWriteCommandMessage.java:89) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.WriteCommandProtocol.sendMessage(WriteCommandProtocol.java:170) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.WriteCommandProtocol.execute(WriteCommandProtocol.java:73) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.InsertCommandProtocol.execute(InsertCommandProtocol.java:66) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.InsertCommandProtocol.execute(InsertCommandProtocol.java:37) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:155) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:219) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.connection.DefaultServerConnection.insertCommand(DefaultServerConnection.java:108) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.InsertOperation.executeCommandProtocol(InsertOperation.java:76) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:111) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.BaseWriteOperation$1.call(BaseWriteOperation.java:106) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.OperationHelper.withConnectionSource(OperationHelper.java:186) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.OperationHelper.withConnection(OperationHelper.java:177) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:106) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.operation.BaseWriteOperation.execute(BaseWriteOperation.java:58) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.Mongo.execute(Mongo.java:747) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.Mongo$2.execute(Mongo.java:730) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.executeWriteOperation(DBCollection.java:327) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.insert(DBCollection.java:323) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.insert(DBCollection.java:314) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.insert(DBCollection.java:284) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.insert(DBCollection.java:250) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.insert(DBCollection.java:172) ~[mongo-java-driver-3.0.2.jar:na] at com.mongodb.DBCollection.save(DBCollection.java:392) ~[mongo-java-driver-3.0.2.jar:na] at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1028) ~[morphia-1.0.0-rc1.jar:na] at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1091) ~[morphia-1.0.0-rc1.jar:na] at org.mongodb.morphia.DatastoreImpl.save(DatastoreImpl.java:1086) ~[morphia-1.0.0-rc1.jar:na] at com.github.ltsopensource.store.mongo.MongoTemplate.save(MongoTemplate.java:52) ~[classes/:na] at com.github.ltsopensource.store.mongo.MongoTemplate.save(MongoTemplate.java:56) ~[classes/:na] at com.github.ltsopensource.biz.logger.mongo.MongoJobLogger.log(MongoJobLogger.java:46) ~[classes/:na] at com.github.ltsopensource.biz.logger.SmartJobLogger.log(SmartJobLogger.java:40) ~[classes/:na] at com.github.ltsopensource.jobtracker.sender.JobSender.send(JobSender.java:51) ~[classes/:na] at com.github.ltsopensource.jobtracker.support.JobPusher.send(JobPusher.java:166) ~[classes/:na] at com.github.ltsopensource.jobtracker.support.JobPusher.access$3(JobPusher.java:161) ~[classes/:na] at com.github.ltsopensource.jobtracker.support.JobPusher$2.run(JobPusher.java:136) ~[classes/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_144] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_144] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

kervin521 commented 6 years ago

已找到解决方案啦