java.lang.ClassCastException: com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener

Atlassian JIRA | Anna Lyons [Atlassian] | 6 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    So we can use the new annotations like com.atlassian.event.api.EventListener. This doesn't work at the moment and results in a class cast exception like this: {code} [java] java.lang.ClassCastException: com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener 15-Nov-2010 18:00:19 [java] at com.atlassian.fisheye.plugin.descriptor.ListenerModuleDescriptor.enabled(ListenerModuleDescriptor.java:19) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1416) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1227) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1194) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:690) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:170) 15-Nov-2010 18:00:19 [java] at com.atlassian.fisheye.plugin.DelegatingFisheyePluginManager.onApplicationEvent(DelegatingFisheyePluginManager.java:113) 15-Nov-2010 18:00:19 [java] at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) 15-Nov-2010 18:00:19 [java] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) 15-Nov-2010 18:00:19 [java] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.Server.doStart(Server.java:224) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.web.WebServer.start(WebServer.java:274) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:235) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.ctl.Run.main(Run.java:70) 15-Nov-2010 18:00:19 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 15-Nov-2010 18:00:19 [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 15-Nov-2010 18:00:19 [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 15-Nov-2010 18:00:19 [java] at java.lang.reflect.Method.invoke(Method.java:597) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:113) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41) {code}

    Atlassian JIRA | 6 years ago | Anna Lyons [Atlassian]
    java.lang.ClassCastException: com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener
  2. 0

    So we can use the new annotations like com.atlassian.event.api.EventListener. This doesn't work at the moment and results in a class cast exception like this: {code} [java] java.lang.ClassCastException: com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener 15-Nov-2010 18:00:19 [java] at com.atlassian.fisheye.plugin.descriptor.ListenerModuleDescriptor.enabled(ListenerModuleDescriptor.java:19) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1416) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1227) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1194) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:690) 15-Nov-2010 18:00:19 [java] at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:170) 15-Nov-2010 18:00:19 [java] at com.atlassian.fisheye.plugin.DelegatingFisheyePluginManager.onApplicationEvent(DelegatingFisheyePluginManager.java:113) 15-Nov-2010 18:00:19 [java] at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) 15-Nov-2010 18:00:19 [java] at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) 15-Nov-2010 18:00:19 [java] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736) 15-Nov-2010 18:00:19 [java] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 15-Nov-2010 18:00:19 [java] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) 15-Nov-2010 18:00:19 [java] at org.mortbay.jetty.Server.doStart(Server.java:224) 15-Nov-2010 18:00:19 [java] at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.web.WebServer.start(WebServer.java:274) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:235) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.ctl.Run.main(Run.java:70) 15-Nov-2010 18:00:19 [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 15-Nov-2010 18:00:19 [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 15-Nov-2010 18:00:19 [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 15-Nov-2010 18:00:19 [java] at java.lang.reflect.Method.invoke(Method.java:597) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:113) 15-Nov-2010 18:00:19 [java] at com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41) {code}

    Atlassian JIRA | 6 years ago | Anna Lyons [Atlassian]
    java.lang.ClassCastException: com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.atlassian.fisheye.functest.events.EventListenerFuncTest cannot be cast to com.atlassian.event.EventListener

      at com.atlassian.fisheye.plugin.descriptor.ListenerModuleDescriptor.enabled()
    2. com.atlassian.fisheye
      ListenerModuleDescriptor.enabled
      1. com.atlassian.fisheye.plugin.descriptor.ListenerModuleDescriptor.enabled(ListenerModuleDescriptor.java:19)
      1 frame
    3. com.atlassian.plugin
      DefaultPluginManager.init
      1. com.atlassian.plugin.manager.DefaultPluginManager.notifyModuleEnabled(DefaultPluginManager.java:1416)
      2. com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModule(DefaultPluginManager.java:1227)
      3. com.atlassian.plugin.manager.DefaultPluginManager.enableConfiguredPluginModules(DefaultPluginManager.java:1194)
      4. com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:690)
      5. com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:170)
      5 frames
    4. com.atlassian.fisheye
      DelegatingFisheyePluginManager.onApplicationEvent
      1. com.atlassian.fisheye.plugin.DelegatingFisheyePluginManager.onApplicationEvent(DelegatingFisheyePluginManager.java:113)
      1 frame
    5. Spring Context
      SimpleApplicationEventMulticaster$1.run
      1. org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)
      1 frame
    6. Spring Core
      SyncTaskExecutor.execute
      1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
      1 frame
    7. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)
      2. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)
      3. org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)
      4. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:383)
      4 frames
    8. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
      3 frames
    9. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
      5 frames
    10. com.cenqua.fisheye
      FishEyeWebApplicationContext.doStart
      1. com.cenqua.fisheye.web.jetty.FishEyeWebApplicationContext.doStart(FishEyeWebApplicationContext.java:27)
      1 frame
    11. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    12. Jetty Server
      ContextHandlerCollection.doStart
      1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      2. org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
      2 frames
    13. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    14. Jetty Server
      HandlerCollection.doStart
      1. org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
      1 frame
    15. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    16. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      2. org.mortbay.jetty.Server.doStart(Server.java:224)
      2 frames
    17. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      1 frame
    18. com.cenqua.fisheye
      Run.main
      1. com.cenqua.fisheye.web.WebServer.start(WebServer.java:274)
      2. com.cenqua.fisheye.ctl.Run.mainImpl(Run.java:235)
      3. com.cenqua.fisheye.ctl.Run.main(Run.java:70)
      3 frames
    19. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    20. com.cenqua.fisheye
      FishEyeCtl.main
      1. com.cenqua.fisheye.FishEyeCtl.mainImpl(FishEyeCtl.java:113)
      2. com.cenqua.fisheye.FishEyeCtl.main(FishEyeCtl.java:41)
      2 frames