org.bson.codecs.configuration.CodecConfigurationException

Can't find a codec for class [Ljava.lang.String;.

Samebug tips2

Current Spark-Mongodb does not support 3.x mongo drivers. Use long instead of Date until it is upgraded.

Current Spark-Mongodb does not support 3.x mongo drivers. Use long instead of Date until it is upgraded.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web49

  • via JIRA by Stanislav, 1 year ago
    Can't find a codec for class [Ljava.lang.String;.
  • via JIRA by Stanislav, 1 year ago
    Can't find a codec for class [Ljava.lang.String;.
  • Can't find a codec for class [Ljava.lang.String;.
  • Stack trace

    • org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class [Ljava.lang.String;. at org.bson.codecs.configuration.CodecCache.getOrThrow(CodecCache.java:46) at org.bson.codecs.configuration.ProvidersCodecRegistry.get(ProvidersCodecRegistry.java:63) at org.bson.codecs.configuration.ChildCodecRegistry.get(ChildCodecRegistry.java:51) at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:174) at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:189) at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:172) at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:189) at org.bson.codecs.DocumentCodec.writeValue(DocumentCodec.java:172) at org.bson.codecs.DocumentCodec.writeMap(DocumentCodec.java:189) at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:131) at org.bson.codecs.DocumentCodec.encode(DocumentCodec.java:45) at org.bson.BsonDocumentWrapper.getUnwrapped(BsonDocumentWrapper.java:189) at org.bson.BsonDocumentWrapper.get(BsonDocumentWrapper.java:129) at com.mongodb.AggregateIterableImpl.execute(AggregateIterableImpl.java:118) at com.mongodb.AggregateIterableImpl.forEach(AggregateIterableImpl.java:107) at AggregationTest.main(AggregationTest.java:27)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    6 times, 3 months ago
    2 times, 5 months ago
    Once, 5 months ago
    Unknown user
    Once, 7 months ago
    31 more bugmates