aspose file tools*
The moose likes Java in General and the fly likes concurrent.DelayQueue.remove Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "concurrent.DelayQueue.remove" Watch "concurrent.DelayQueue.remove" New topic
Author

concurrent.DelayQueue.remove

kiranrs iyengar
Greenhorn

Joined: Nov 21, 2005
Posts: 4

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

Joined: Jul 11, 2001
Posts: 14112
Looks like you are adding instances of ScheduleDBPurgeDelay, but trying to remove instances of CodeskPurgeTask, which doesn't work.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
kiranrs iyengar
Greenhorn

Joined: Nov 21, 2005
Posts: 4
yes, but i have changed the code and made it as ScheduleDBPurgeDelay intance
now i am getting exception
 
 
subject: concurrent.DelayQueue.remove