Using BasicDBObject.parse(String) on OpenJDK 11.0.8 yields NPE

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Summary

      When using BasicDBObject.parse(String) on OpenJDK 11.0.8 it yields an NPE directly on the signature without any further stacktrace. 

      We first noticed this on a couple internal Jenkins agents that suddenly were displaying a intermittent failure of a category of tests, troubleshooting narrowed it down to a single worker that was running a separate jdk. Using other agents solved the problem. 

      How to Reproduce

      Use Java OpenJDK 11.0.8 and run a main or a test-method with the mongodb-java-driver 3.8.2 on the classpath. Use  

      @Test
      public void simpleTest() {
         String json = "{ \"_id\" : \"0\" }";
         BasicDBObject.parse(json);
      }

      Results in: 

      This is output when ran from maven. 
      16:01:14 [ERROR] Errors: 16:01:14 [ERROR] MongoDBTest.simpleTest:19 » NullPointer

      Resolved by:

      We resolved this problem by updating to the latest and greatest, but it worked already with the next patch-bump to OpenJDK 11.0.9.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Mikael Östberg
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: