-
Jan 4th, 2013, 04:28 PM
#1
No adapter for handler spring3.1.0 when using @controller with url mapping with xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns
="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schem...-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schem...ontext-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
<context:component-scan
base-package="mypack" />
<bean class="org.springframework.web.servlet.mvc.annotat ion.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotat ion.AnnotationMethodHandlerAdapter"/>
<bean class="org.springframework.web.servlet.mvc.SimpleC ontrollerHandlerAdapter"/>
<bean id="SListController" autowire="byName"
class="mypack.SListController">
<property name="Helper" ref="SListHelper" />
<property name="bDelegate" ref="SListBDelegate" />
<property name="ResHelper" ref="SListResHelper" />
</bean>
Getting below exception in spring 3.1.0 version
SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: action. Exception thrown : javax.servlet.ServletException: No adapter for handler [mypack.SListController@5a145a14]: Does your handler implement a supported interface like Controller?
at org.springframework.web.servlet.DispatcherServlet. getHandlerAdapter(DispatcherServlet.java:1077)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:870)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:827)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:882)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules