Announcement Announcement Module
Collapse
No announcement yet.
Hessian not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hessian not working

    Hi,
    I am facing problem after moving to Spring 3.0.1.RELEASE and hessian - 4.0.3. I am not making separate servlet for hessian service method and included it in the same dispatcher servlet of the project and using simple url mapping to access exposed service.

    <prop key="/RemoteStaticPageServices">exportedStaticPageServic es</prop>

    <!—Exposing like normal with urlmappinghandler -->
    <bean id="exportedStaticPageServices" class="org.springframework.remoting.caucho.Hessian ServiceExporter">
    <property name="service" ref="remoteStaticPageServices"/>
    <property name="serviceInterface" value="uk.co.and.commons.services.IRemoteStaticPag eServices"/>
    </bean>


    Stack stace of error I am getting is

    javax.servlet.ServletException: No adapter for handler [org.springframework.remoting.caucho.HessianService Exporter@c0ee4]: Does your handler implement a supported interface like Controller?
    at org.springframework.web.servlet.DispatcherServlet. getHandlerAdapter(DispatcherServlet.java:982)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:770)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:716)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:647)
    at org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:563)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at uk.co.and.tin.web.filters.DisableUrlSessionFilter. doFilter(DisableUrlSessionFilter.java:59)
    at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at com.opensymphony.module.sitemesh.filter.PageFilter .parsePage(PageFilter.java:118)
    at com.opensymphony.module.sitemesh.filter.PageFilter .doFilter(PageFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.springframework.orm.hibernate3.support.OpenSes sionInViewFilter.doFilterInternal(OpenSessionInVie wFilter.java:198)
    at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:852)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run( JIoEndpoint.java:489)

  • #2
    Problem resolved

    I work with Surjeet, the problem turned out to be down to an unrelated change in the Spring MVC dispatcher servlet configuration file, and not to do with the Spring 3 upgrade.

    That change was to specify a HandlerMapping to also handle annotation driven REST controllers. And in the dispatcher servlet, if you name a HandlerMapping, you need to explicitly name all the others you use, which are there by default, if none are mentioned. So the fix was to declare a HttpRequestHandlerAdapter bean to handle the Hessian call.

    Comment

    Working...
    X