Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6659215

javax.management.timer.Timer frequently fails to start

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 6u10
    • Component/s: core-svc
    • Subcomponent:
    • Introduced In Build:
      5.0
    • Introduced In Version:
      5.0
    • Resolved In Build:
      b13
    • CPU:
      x86
    • OS:
      windows_2000

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.6.0_03"
        Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
        Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows 2000 Professional
        Version 5.0.2195 Service Pack 4 Build 2195

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        Dual AMD 64 bit cpu

        A DESCRIPTION OF THE PROBLEM :
        If at least one past Notification falls due when the Timer is started, there is about a 50% chance that it will fail . If 3 Notifacations fall due, then it may fail three times consecutively in a (programatic) loop. Once it has failed it doesn't function properly thereafter, until the program is restarted.
        It can take several restarts to get it to run first time, after which it functions just fine.
        Note that the error data below was obtained while running the program under Netbeans. The printStackTrace() is normally replaced by a simple message display indirectly using JOptionPane.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        I expected the Timer to start without error.
        ACTUAL -
        The error below was generated.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        java.util.ConcurrentModificationException
                at java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
                at javax.management.timer.Timer.sendPastNotifications(Timer.java:1028)
                at javax.management.timer.Timer.start(Timer.java:318)
                at alarm.Alarm.<init>(Alarm.java:112)
                at alarm.Alarm$5.run(Alarm.java:448)
                at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
                at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


        REPRODUCIBILITY :
        This bug can be reproduced often.

        ---------- BEGIN SOURCE ----------
        If you can't pinpoint the problem with the data provided, then I can be reached at
        ###@###.###, and I'm prepared to send you the whole program.
        I don't intend to spend days creating a test case.
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        None found.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sjiang Shanliang Jiang (Inactive)
                  Reporter:
                  emcmanus Eamonn McManus
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: