树脂模板不起作用

时间:2012-03-20 15:33:13

标签: spring spring-mvc scalate

几天前我用scalate模板endine创建了spring webapp。一切都很好,但从昨天起我无法运行。这就是我得到的

org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.VerifyError: (class: org/fusesource/scalate/spring/view/ScalateUrlView, method: renderMergedTemplateModel signature: (Ljava/util/Map;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Incompatible argument to function
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:839)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.VerifyError: (class: org/fusesource/scalate/spring/view/ScalateUrlView, method: renderMergedTemplateModel signature: (Ljava/util/Map;Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Incompatible argument to function
org.fusesource.scalate.spring.view.ScalateViewResolver.buildView(ScalateViewResolver.scala:41)
org.springframework.web.servlet.view.UrlBasedViewResolver.loadView(UrlBasedViewResolver.java:419)
org.springframework.web.servlet.view.AbstractCachingViewResolver.createView(AbstractCachingViewResolver.java:158)
org.springframework.web.servlet.view.UrlBasedViewResolver.createView(UrlBasedViewResolver.java:384)
org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:77)
org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1078)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1027)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:574)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

当我将我的servlet-context.xml切换回jsp时,它会运行但是在scalate上我不能

这是我的servlet-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">

<!-- Enables the Spring MVC @Controller programming model -->
<annotation-driven />

<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />

<beans:bean class="org.fusesource.scalate.spring.view.ScalateViewResolver">
    <beans:property name="prefix" value="/WEB-INF/scalate/" />
    <beans:property name="suffix" value=".ssp" />
</beans:bean>

<context:component-scan base-package="org.fixus.springer" />

请帮助

1 个答案:

答案 0 :(得分:1)

我已经解决了这个问题。我从我的pom.xml escalate-core中删除了它并解决了问题