Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3711

Storing unsigned integer to Mongodb from java

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.12.3
    • None
    • None

    Description

      We are trying to insert an unsigned integer (20 digits) to database using java driver (3.12.13 version).   

      Stored unsigned integer in BigInteger() java class.

      BigInteger value = new BigInteger("18446744073709551614");

      When attempting to insert to db following exception is thrown:

      org.bson.codecs.configuration.CodecConfigurationException: Can't find a codec for class java.math.BigInteger.

       

      Not sure if the issue is with driver or the MongoDB.

      We would like to have the facility to store such data to database.

       

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            harish.alwala@gmail.com harish
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: