posted 10 years ago
Hello am using spring 3.1.2
i got this error
java.lang.ClassCastException: org.springframework.web.servlet.mvc.ParameterizableViewController cannot be cast to org.springframework.web.method.HandlerMethod
===========================================================================================================================
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
HttpSession currentSession = request.getSession();
HandlerMethod handlerMethod = (HandlerMethod) handler;
Class<? extends Object> entryClass = handlerMethod.getBean().getClass();
if (entryClass.isAnnotationPresent(Navigation.class)) {
@SuppressWarnings("unchecked")
List<NavigationEntry> prevPath = (List<NavigationEntry>) currentSession.getAttribute(NAVIGATION_PATH);
if (prevPath == null) {
prevPath = new ArrayList<NavigationEntry>();
}
List<NavigationEntry> basePath = buildBasePath(prevPath, entryClass);
NavigationEntry entry = generateNavigationEntry(entryClass, currentSession);
basePath.add(entry);
currentSession.setAttribute(NAVIGATION_PATH, basePath);
} else {
clearNavigationPath(currentSession);
}
}
====================================================================================================
i got this error in underlined line.
Please help me to sort out of this issue