JIRA
  1. JIRA
  2. JRA-5354

Scheduler doesnt work with subscriptions to filters on JDK 1.5

    Details

    • Type: Bug Bug
    • Status: Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.3
    • Fix Version/s: 3.2 Beta
    • Component/s: Services
    • Labels:
      None
    • Environment:

      Linux kernel 2.6.6
      java 1.5.0
      resin 3.0.9
      database MSSQL server 7

      Description

      if we have subscriptions to filters the Scheduler dies with exception:

      Exception in thread "QuartzSchedulerThread" java.lang.ClassCastException: java.util.Date
      at java.sql.Timestamp.compareTo(Timestamp.java:474)
      at org.quartz.Trigger.compareTo(Trigger.java:611)
      at org.quartz.simpl.TriggerComparator.compare(RAMJobStore.java:904)
      at java.util.TreeMap.compare(TreeMap.java:1093)
      at java.util.TreeMap.getEntry(TreeMap.java:347)
      at java.util.TreeMap.remove(TreeMap.java:506)
      at java.util.TreeSet.remove(TreeSet.java:223)
      at org.quartz.simpl.RAMJobStore.acquireNextTrigger(RAMJobStore.java:735)
      at com.atlassian.scheduler.OfBizJobStore.acquireNextTrigger(OfBizJobStore.java:479)
      at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:197)

      and all the scheduled tasks dont execute not even services so no mails are sent and so on.
      if i remove all the subscriptions to filters everything works fine

        Issue Links

          Activity

          Hide
          Scott Farquhar [Atlassian] added a comment -

          Tomaz,

          We have not yet tested JIRA with JDK 1.5 - can you please use JIRA on JDK 1.4.

          Cheers,
          Scott

          Show
          Scott Farquhar [Atlassian] added a comment - Tomaz, We have not yet tested JIRA with JDK 1.5 - can you please use JIRA on JDK 1.4. Cheers, Scott
          Hide
          Tomaz Cerar added a comment -

          Hi,

          tnx for your response.

          we have now install jdk 1.4.2 back and i will test it everything is working as excpected.

          lp
          tomaz

          Show
          Tomaz Cerar added a comment - Hi, tnx for your response. we have now install jdk 1.4.2 back and i will test it everything is working as excpected. lp tomaz
          Hide
          Tomaz Cerar added a comment -

          I have tested it. On java 1.4.2 is working with no problems.
          You can close this issue or leave it open for support for java 1.5

          cheers
          Tomaz

          Show
          Tomaz Cerar added a comment - I have tested it. On java 1.4.2 is working with no problems. You can close this issue or leave it open for support for java 1.5 cheers Tomaz
          Hide
          Jeff Turner added a comment -

          Thanks for reporting back. I've updated the subject to remind us of this when we test 1.5 compatibility.

          Show
          Jeff Turner added a comment - Thanks for reporting back. I've updated the subject to remind us of this when we test 1.5 compatibility.
          Hide
          Tomaz Cerar added a comment -

          This is quite same issue

          Show
          Tomaz Cerar added a comment - This is quite same issue
          Hide
          Kostas Papadakis added a comment -

          It is the java.sql.Timestamp that has overriden the compareTo(Date) from java.util.Date and then casts the Date object to Timestamp. I hope this is a bug in the sdk and not a "feature"

          Show
          Kostas Papadakis added a comment - It is the java.sql.Timestamp that has overriden the compareTo(Date) from java.util.Date and then casts the Date object to Timestamp. I hope this is a bug in the sdk and not a "feature"
          Hide
          Jeff Turner added a comment -

          Yes, this is listed in the JDK 1.5 list of incompatibilities:

          http://java.sun.com/j2se/1.5.0/compatibility.html#incompatibilities

          There is a JDK bug open for this:

          http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041

          Show
          Jeff Turner added a comment - Yes, this is listed in the JDK 1.5 list of incompatibilities: http://java.sun.com/j2se/1.5.0/compatibility.html#incompatibilities There is a JDK bug open for this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041
          Hide
          Jon Pither added a comment -

          Any known work-around for this to get JIRA working on 1.5 while we wait for the next JIRA release?

          Show
          Jon Pither added a comment - Any known work-around for this to get JIRA working on 1.5 while we wait for the next JIRA release?
          Hide
          Nick Minutello added a comment -

          Jon,

          The only thing you could feasibly do is put your own (fixed) versions of the affected classes (java.sql.Timestamp, etc) in the bootclasspath (-Xbootclasspath)

          Show
          Nick Minutello added a comment - Jon, The only thing you could feasibly do is put your own (fixed) versions of the affected classes (java.sql.Timestamp, etc) in the bootclasspath (-Xbootclasspath)
          Hide
          Jeff Turner added a comment -

          Just to be clear: this bug only affects search filter subscriptions, not regular email notifications.

          Show
          Jeff Turner added a comment - Just to be clear: this bug only affects search filter subscriptions, not regular email notifications.
          Hide
          Jon Pither added a comment -

          I disagree, the email notifications on my JIRA professional installation 3.0.1-#73 are not going out. Some do, but the vast majority of email notifications stay in the queue, demanding a manual flush.

          Show
          Jon Pither added a comment - I disagree, the email notifications on my JIRA professional installation 3.0.1-#73 are not going out. Some do, but the vast majority of email notifications stay in the queue, demanding a manual flush.
          Hide
          Mark Chaimungkalanont [Atlassian] added a comment -

          Implemented consistency checker to warn of the problem JRA-5804.

          We can't do much until http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041 is resolved.

          Show
          Mark Chaimungkalanont [Atlassian] added a comment - Implemented consistency checker to warn of the problem JRA-5804 . We can't do much until http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5103041 is resolved.
          Hide
          Tomaž Cerar added a comment -

          i tried using diferent jvm for this and for now it looks like it works.
          i am now using Weblogic 5.0 that can be found here http://commerce.bea.com/products/weblogicjrockit/5.0/jr_50.jsp
          and it looks like things work even a bit faster than on sun's 5.0 jvm...

          Show
          Tomaž Cerar added a comment - i tried using diferent jvm for this and for now it looks like it works. i am now using Weblogic 5.0 that can be found here http://commerce.bea.com/products/weblogicjrockit/5.0/jr_50.jsp and it looks like things work even a bit faster than on sun's 5.0 jvm...
          Hide
          Yuri Gadow added a comment -

          If this isn't addressed until Sun resolves their bug, and if they are correct with their estimation of a fix in JDK 1.6 - then JIRA would not run on JDK 1.5. Not exactly the ideal situation. Surely a workaround would possible, it seems (in the example provided in the Sun bug anyway) that comparing the results of getTime() would be one possible hack.

          Show
          Yuri Gadow added a comment - If this isn't addressed until Sun resolves their bug, and if they are correct with their estimation of a fix in JDK 1.6 - then JIRA would not run on JDK 1.5. Not exactly the ideal situation. Surely a workaround would possible, it seems (in the example provided in the Sun bug anyway) that comparing the results of getTime() would be one possible hack.
          Hide
          Jeff Turner added a comment -

          Yes, a workaround in Quartz is probably possible, and its on our list of things to investigate (though not with the same urgency as bugs that have no workaround).

          Show
          Jeff Turner added a comment - Yes, a workaround in Quartz is probably possible, and its on our list of things to investigate (though not with the same urgency as bugs that have no workaround).
          Hide
          Tomaž Cerar added a comment -

          i entered a bug report in quartz issue tracker
          http://jira.opensymphony.com/browse/QUARTZ-128 vote for it, if you whant it to be fixed.

          Show
          Tomaž Cerar added a comment - i entered a bug report in quartz issue tracker http://jira.opensymphony.com/browse/QUARTZ-128 vote for it, if you whant it to be fixed.
          Hide
          Chris Wood added a comment -

          This shouldn't be too onerous to fix, just reverse the compareTo so that the date compares with the timestamp, rather than vis-a-vis. I've done that in my application already.

          Show
          Chris Wood added a comment - This shouldn't be too onerous to fix, just reverse the compareTo so that the date compares with the timestamp, rather than vis-a-vis. I've done that in my application already.
          Hide
          Tomaž Cerar added a comment -

          the bug in quartz was fixed. will it be posible for you to use the latest version of quartz in jira?

          Show
          Tomaž Cerar added a comment - the bug in quartz was fixed. will it be posible for you to use the latest version of quartz in jira?
          Hide
          Mark Chaimungkalanont [Atlassian] added a comment -

          Thanks for the report. We'll update Quartz when 1.4.5 comes out

          Show
          Mark Chaimungkalanont [Atlassian] added a comment - Thanks for the report. We'll update Quartz when 1.4.5 comes out
          Hide
          Tomaž Cerar added a comment -
          Show
          Tomaž Cerar added a comment - Quartz 1.4.5 just came out http://wiki.opensymphony.com//display/OS/2005/03/13/Quartz+1.4.5+Released
          Hide
          Mark Chaimungkalanont [Atlassian] added a comment -

          Thanks for that. We'll try our very best to squeeze this into 3.2

          Show
          Mark Chaimungkalanont [Atlassian] added a comment - Thanks for that. We'll try our very best to squeeze this into 3.2
          Hide
          Kevin Wilson added a comment -

          To quote Tomaz: "On java 1.4.2 is working with no problems."

          Now do you mean 1.4.2_07 or _08?

          (or whichever one implemented the fix for the memory leak that chews up all the available memory over time or with heavy usage.)

          Show
          Kevin Wilson added a comment - To quote Tomaz: "On java 1.4.2 is working with no problems." Now do you mean 1.4.2_07 or _08? (or whichever one implemented the fix for the memory leak that chews up all the available memory over time or with heavy usage.)
          Hide
          Tomaz Cerar added a comment -

          I have just checked and we are using 1.4.2_06 on production server
          and on testing one 1.4.2_08 and I dont see any problems.

          Show
          Tomaz Cerar added a comment - I have just checked and we are using 1.4.2_06 on production server and on testing one 1.4.2_08 and I dont see any problems.
          Hide
          Mark Chaimungkalanont [Atlassian] added a comment -

          Quartz has now been upgraded & successfully tested in JDK 1.5

          Show
          Mark Chaimungkalanont [Atlassian] added a comment - Quartz has now been upgraded & successfully tested in JDK 1.5
          Hide
          Tomaz Cerar added a comment -

          Sun has fixed their bug in jdk... and they say it is fixed in jdk 5.0 update 7
          can you just check that it wont break any compatibily...

          Show
          Tomaz Cerar added a comment - Sun has fixed their bug in jdk... and they say it is fixed in jdk 5.0 update 7 can you just check that it wont break any compatibily...

            People

            • Assignee:
              Mark Chaimungkalanont [Atlassian]
              Reporter:
              Tomaz Cerar
            • Votes:
              10 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: