java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem

Atlassian JIRA | Tim Wong [Atlassian] | 8 years ago
  1. 0

    {code} 2009-03-13 03:00:00,011 ERROR [DefaultQuartzScheduler_Worker-0] [org.quartz.core.JobRunShell] run Job DEFAULT.clearOldMailErrorsJob threw an unhandled Exception: java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem at com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute(ClearOldMailErrors.java:33) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 2009-03-13 03:00:00,041 ERROR [DefaultQuartzScheduler_Worker-0] [org.quartz.core.ErrorLogger] schedulerError Job (DEFAULT.clearOldMailErrorsJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem] at org.quartz.core.JobRunShell.run(JobRunShell.java:214) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --------------- java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem at com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute(ClearOldMailErrors.java:33) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {code}

    Atlassian JIRA | 8 years ago | Tim Wong [Atlassian]
    java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem
  2. 0

    {code} 2009-03-13 03:00:00,011 ERROR [DefaultQuartzScheduler_Worker-0] [org.quartz.core.JobRunShell] run Job DEFAULT.clearOldMailErrorsJob threw an unhandled Exception: java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem at com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute(ClearOldMailErrors.java:33) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) 2009-03-13 03:00:00,041 ERROR [DefaultQuartzScheduler_Worker-0] [org.quartz.core.ErrorLogger] schedulerError Job (DEFAULT.clearOldMailErrorsJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem] at org.quartz.core.JobRunShell.run(JobRunShell.java:214) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) * Nested Exception (Underlying Cause) --------------- java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem at com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute(ClearOldMailErrors.java:33) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) {code}

    Atlassian JIRA | 8 years ago | Tim Wong [Atlassian]
    java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem
  3. 0

    I set up a mail server using a JNDI configured session using the instructions [here|http://confluence.atlassian.com/display/DOC/Setup+a+mail+session+in+standalone+version] and [here|http://confluence.atlassian.com/display/DOC/Configuring+a+Server+for+Outgoing+Mail]. If I *submitted a test email*, or *flush the queue*, everything works as expected. If I restart confluence and don't perform either of these functions then the normal queue processing fails with this exception: {noformat} com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:187) at com.atlassian.confluence.jmx.JmxSMTPMailServer.send(JmxSMTPMailServer.java:61) at com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem.send(AbstractMailNotificationQueueItem.java:120) at com.atlassian.confluence.mail.template.PreRenderedMailNotificationQueueItem.send(PreRenderedMailNotificationQueueItem.java:88) at com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem.execute(AbstractMailNotificationQueueItem.java:97) at com.atlassian.core.task.AbstractErrorQueuedTaskQueue$TaskDecorator.execute(AbstractErrorQueuedTaskQueue.java:107) at com.atlassian.core.task.AbstractTaskQueue.flush(AbstractTaskQueue.java:45) at com.atlassian.core.task.AbstractErrorQueuedTaskQueue.flush(AbstractErrorQueuedTaskQueue.java:37) at com.atlassian.quartz.jobs.TaskQueueFlushJob.doExecute(TaskQueueFlushJob.java:27) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64) at com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:203) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: javax.naming.NameNotFoundException: Name java:comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getJndiSession(SMTPMailServerImpl.java:161) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getSession(SMTPMailServerImpl.java:110) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169) ... 16 more {noformat}

    Atlassian JIRA | 8 years ago | Matthew Jensen [Atlassian]
    java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [CONF-14145] Confluence can't send mail through JNDI configured Mail server until a flush - Atlassian JIRA

    atlassian.com | 1 year ago
    java.lang.ClassCastException: com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem
  6. 0

    Memcached Java客户端2.6.1发布 - 编程语言 - ITeye资讯

    iteye.com | 1 year ago
    java.lang.ClassCastException: cannot be cast to

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.atlassian.confluence.mail.template.ConfluenceMailQueueItem cannot be cast to com.atlassian.confluence.mail.template.MailNotificationQueueItem

      at com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute()
    2. com.atlassian.confluence
      ClearOldMailErrors.doExecute
      1. com.atlassian.confluence.mail.jobs.ClearOldMailErrors.doExecute(ClearOldMailErrors.java:33)
      1 frame
    3. com.atlassian.quartz
      AbstractJob.executeInternal
      1. com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:87)
      1 frame
    4. Spring Context Support
      QuartzJobBean.execute
      1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
      1 frame
    5. com.atlassian.confluence
      AbstractClusterAwareQuartzJobBean.executeInternal
      1. com.atlassian.confluence.setup.quartz.DelegatingClusterAwareQuartzJobBean.executeJob(DelegatingClusterAwareQuartzJobBean.java:16)
      2. com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.surroundJobExecutionWithLogging(AbstractClusterAwareQuartzJobBean.java:64)
      3. com.atlassian.confluence.setup.quartz.AbstractClusterAwareQuartzJobBean.executeInternal(AbstractClusterAwareQuartzJobBean.java:47)
      3 frames
    6. Spring Context Support
      QuartzJobBean.execute
      1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
      1 frame
    7. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:203)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
      2 frames