Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Spring JIRA by arnolf, 1 year ago
TestController cannot be cast to TestController
via Spring JIRA by arnolf, 2 years ago
TestController cannot be cast to TestController
java.lang.ClassCastException: TestController cannot be cast to TestController	at TestController$$FastClassByCGLIB$$bfb641ee.invoke()	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:698)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)	at TestController$$EnhancerByCGLIB$$a8e94a91.printWelcome()	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)	at java.lang.reflect.Method.invoke(Method.java:597)	at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:439)	at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:427)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:915)	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:811)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:796)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)	at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:296)	at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:161)	at org.apache.jsp.WEB_002dINF.pages.hello_jsp._jspx_meth_c_005fimport_005f0(hello_jsp.java:98)