java.lang.ClassCastException

org.springframework.context.event.ContextRefreshedEvent cannot be cast to com.wrox.site.Event1

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web19024

  • via Spring JIRA by Nick Williams, 11 months ago
    org.springframework.context.event.ContextRefreshedEvent cannot be cast to com.wrox.site.Event1
  • via Spring JIRA by Nick Williams, 1 year ago
    org.springframework.context.event.ContextRefreshedEvent cannot be cast to com.wrox.site.Event1
  • via iteye.com by Unknown author, 1 year ago
    cannot be cast to
  • Stack trace

    • java.lang.ClassCastException: org.springframework.context.event.ContextRefreshedEvent cannot be cast to com.wrox.site.Event1 at com.wrox.site.MyListener$$Lambda$3.onApplicationEvent(Unknown Source)[MyListener.class:?] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:98)[spring-context-4.0.0.M1.jar:4.0.0.M1] at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:344)[spring-context-4.0.0.M1.jar:4.0.0.M1] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)[spring-context-4.0.0.M1.jar:4.0.0.M1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:496)[spring-context-4.0.0.M1.jar:4.0.0.M1] at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)[spring-web-4.0.0.M1.jar:4.0.0.M1] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)[spring-web-4.0.0.M1.jar:4.0.0.M1] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)[spring-web-4.0.0.M1.jar:4.0.0.M1] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)[catalina.jar:8.0.0-dev] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5210)[catalina.jar:8.0.0-dev] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)[catalina.jar:8.0.0-dev] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)[catalina.jar:8.0.0-dev] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)[catalina.jar:8.0.0-dev] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:698)[catalina.jar:8.0.0-dev] at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1491)[catalina.jar:8.0.0-dev] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0-ea] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[?:1.8.0-ea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0-ea] at java.lang.reflect.Method.invoke(Method.java:491)[?:1.8.0-ea] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)[tomcat-coyote.jar:8.0.0-dev] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[?:1.8.0-ea] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)[?:1.8.0-ea] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:468)[catalina.jar:8.0.0-dev] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:415)[catalina.jar:8.0.0-dev] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0-ea] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[?:1.8.0-ea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0-ea] at java.lang.reflect.Method.invoke(Method.java:491)[?:1.8.0-ea] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)[tomcat-coyote.jar:8.0.0-dev] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[?:1.8.0-ea] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)[?:1.8.0-ea] at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1465)[?:1.8.0-ea] at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:75)[?:1.8.0-ea] at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1306)[?:1.8.0-ea] at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1398)[?:1.8.0-ea] at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827)[?:1.8.0-ea] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0-ea] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[?:1.8.0-ea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0-ea] at java.lang.reflect.Method.invoke(Method.java:491)[?:1.8.0-ea] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)[?:1.8.0-ea] at sun.rmi.transport.Transport$1.run(Transport.java:177)[?:1.8.0-ea] at sun.rmi.transport.Transport$1.run(Transport.java:174)[?:1.8.0-ea] at java.security.AccessController.doPrivileged(Native Method)[?:1.8.0-ea] at sun.rmi.transport.Transport.serviceCall(Transport.java:173)[?:1.8.0-ea] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)[?:1.8.0-ea] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)[?:1.8.0-ea] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)[?:1.8.0-ea] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[?:1.8.0-ea] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[?:1.8.0-ea] at java.lang.Thread.run(Thread.java:724)[?:1.8.0-ea]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.