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

Log ClassModel creation errors for automatic PojoCodecs

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 3.8.0
    • None
    • Monitoring
    • None

    Description

      Whenever automatic configuration or namespace whitelisting is used, class models generated through lazy-loading seem to fail silently (and returning null).

      This makes it complex to identify the source of the actual error, if some POJOs are incorrectly defined, as the original model creation error is lost. A simple workaround is to explicitly add the class mentioned in the CodecConfigurationException, but that is painful, especially when multiple POJOs may actually be incorrect.

      In such cases, we should log the error, to ease the debugging process.

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            charles.sarrazin@mongodb.com Charles Sarrazin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: