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

Connection failure from Android

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.3, 3.5.0
    • Affects Version/s: 3.4.2
    • Component/s: Connection Management
    • None
    • Environment:
      Android 5.0

      Java driver 3.3.0 works fine and I tried updating to 3.4.2 but the app crashes with the following exception:

      java.lang.ExceptionInInitializerError
      at com.mongodb.connection.InternalStreamConnectionFactory.<init>(InternalStreamConnectionFactory.java:41)
      at com.mongodb.connection.DefaultClusterableServerFactory.create(DefaultClusterableServerFactory.java:68)
      at com.mongodb.connection.BaseCluster.createServer(BaseCluster.java:360)
      at com.mongodb.connection.SingleServerCluster.<init>(SingleServerCluster.java:54)
      at com.mongodb.connection.DefaultClusterFactory.create(DefaultClusterFactory.java:114)
      at com.mongodb.Mongo.createCluster(Mongo.java:744)
      at com.mongodb.Mongo.createCluster(Mongo.java:728)
      at com.mongodb.Mongo.<init>(Mongo.java:293)
      at com.mongodb.Mongo.<init>(Mongo.java:288)
      at com.mongodb.Mongo.<init>(Mongo.java:284)
      at com.mongodb.MongoClient.<init>(MongoClient.java:179)
      at com.mongodb.MongoClient.<init>(MongoClient.java:136)
      … app code ...
      at java.lang.Thread.run(Thread.java:818)

      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.security.CodeSource java.security.ProtectionDomain.getCodeSource()' on a null object reference
      at com.mongodb.connection.ClientMetadataHelper.getDriverVersion(ClientMetadataHelper.java:111)
      at com.mongodb.connection.ClientMetadataHelper.getDriverInformation(ClientMetadataHelper.java:201)
      at com.mongodb.connection.ClientMetadataHelper.addDriverInformation(ClientMetadataHelper.java:182)
      at com.mongodb.connection.ClientMetadataHelper.<clinit>(ClientMetadataHelper.java:64)
      at com.mongodb.connection.InternalStreamConnectionFactory.<init>(InternalStreamConnectionFactory.java:41)
      at com.mongodb.connection.DefaultClusterableServerFactory.create(DefaultClusterableServerFactory.java:68)
      at com.mongodb.connection.BaseCluster.createServer(BaseCluster.java:360)
      at com.mongodb.connection.SingleServerCluster.<init>(SingleServerCluster.java:54)
      at com.mongodb.connection.DefaultClusterFactory.create(DefaultClusterFactory.java:114)
      at com.mongodb.Mongo.createCluster(Mongo.java:744)
      at com.mongodb.Mongo.createCluster(Mongo.java:728)
      at com.mongodb.Mongo.<init>(Mongo.java:293)
      at com.mongodb.Mongo.<init>(Mongo.java:288)
      at com.mongodb.Mongo.<init>(Mongo.java:284)
      at com.mongodb.MongoClient.<init>(MongoClient.java:179)
      at com.mongodb.MongoClient.<init>(MongoClient.java:136)
      … app code ...
      at java.lang.Thread.run(Thread.java:818)

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            leisim Simon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: