Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

concurrent.DelayQueue.remove

 
kiranrs iyengar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks in advance. Can any one help me
in this class when i call the removeFromQueue() method i am getting exeception :

java.lang.ClassCastException: in.co.netsol.niab.portal.processbean.databaseconsole.CodeskPurgeTask
in.co.netsol.niab.portal.processbean.databaseconsole.ScheduleDBPurgeDelay.compareTo(ScheduleDBPurgeDelay.java:1)
java.util.PriorityQueue.remove(PriorityQueue.java:340)
java.util.concurrent.DelayQueue.remove(DelayQueue.java:354)
in.co.netsol.niab.portal.processbean.databaseconsole.PurgeDelayThread.removeFromQueue(PurgeDelayThread.java:106)
in.co.netsol.niab.portal.actions.settings.DatabasePurgeSettingsAction.doPost(DatabasePurgeSettingsAction.java:93)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802

[Updated to include code tags - Paul Sturrock]
[ July 19, 2006: Message edited by: Paul Sturrock ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are adding instances of ScheduleDBPurgeDelay, but trying to remove instances of CodeskPurgeTask, which doesn't work.
 
kiranrs iyengar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, but i have changed the code and made it as ScheduleDBPurgeDelay intance
now i am getting exception
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic