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

Background threads continue to run after a web app is undeployed unless Mongo#close is called

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.8.0
    • Component/s: Cluster Management
    • None
    • Environment:
      Glassfish 3.1.1 / Mongo 2.0.4 / Replicat Set 2 servers + one arbiter

      When reloading the same or a new version of an ejb using the mongo driver 2.8.0, NullPointerException occurs continuously in Glassfish logs as the precedent thread was not stopped and tries too use a closed connection.
      We need to restart Glassfish server each time we want to redeploy our code, which is not possible.
      This didn't happen with the 2.7.3 version of the driver.

      [#|2012-06-05T15:18:39.418+0200|WARNING|glassfish3.1.1|com.mongodb.ReplicaSetStatus.wolverine|_ThreadID=24;_ThreadName=Thread-3;|Server seen down: localhost/127.0.0.1:27018
      java.lang.NullPointerException
      at com.mongodb.OutMessage.query(OutMessage.java:38)
      at com.mongodb.OutMessage.query(OutMessage.java:34)
      at com.mongodb.DBPort.findOne(DBPort.java:144)
      at com.mongodb.DBPort.runCommand(DBPort.java:156)
      at com.mongodb.ReplicaSetStatus$UpdatableNode.update(ReplicaSetStatus.java:507)
      at com.mongodb.ReplicaSetStatus$Updater.updateAll(ReplicaSetStatus.java:708)
      at com.mongodb.ReplicaSetStatus$Updater.run(ReplicaSetStatus.java:674)

      #]

      [#|2012-06-05T15:18:39.494+0200|WARNING|glassfish3.1.1|com.mongodb.ReplicaSetStatus.wolverine|_ThreadID=24;_ThreadName=Thread-3;|Server seen down: localhost/127.0.0.1:27017
      java.lang.NullPointerException
      at com.mongodb.OutMessage.query(OutMessage.java:38)
      at com.mongodb.OutMessage.query(OutMessage.java:34)
      at com.mongodb.DBPort.findOne(DBPort.java:144)
      at com.mongodb.DBPort.runCommand(DBPort.java:156)
      at com.mongodb.ReplicaSetStatus$UpdatableNode.update(ReplicaSetStatus.java:507)
      at com.mongodb.ReplicaSetStatus$Updater.updateAll(ReplicaSetStatus.java:708)
      at com.mongodb.ReplicaSetStatus$Updater.run(ReplicaSetStatus.java:674)

      #]

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            vinet.emmanuel@gmail.com Emmanuel VINET
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: