NutzCN Logo
问答 nutzwk-bootstrap jetty插件启动不报错,访问jsp报错
发布于 3048天前 作者 qq_d6c9c504 2130 次浏览 复制 上一个帖子 下一个帖子
标签:

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [39] in the generated java file: [F:\space\NutzWk\target\tmp\jsp\org\apache\jsp\index_jsp.java]
The return type is incompatible with JspSourceDependent.getDependants()

Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:198)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:361)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at org.eclipse.jetty.jsp.JettyJspServlet.service(JettyJspServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.nutz.mvc.NutFilter.nextChain(NutFilter.java:226)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:201)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:595)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72)
at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:588)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.nutz.mvc.NutFilter.nextChain(NutFilter.java:226)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:201)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at cn.wizzer.common.filter.RouteFilter.doFilter(RouteFilter.java:34)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)

这个位置贴代码或日志,不要移除前后标识符
10 回复

看上去是jsp相关的jar冲突了

楼主,我的是最新的代码,是不是jetty的jsp的包,和glassfish的jsp冲突了?

这是在tomcat里面跑的吧? 把pom.xml中jetty和nutz-web的依赖去掉试试

我用的是jetty插件跑的。好的,我试试

我去掉nutz-web依赖,在用jetty插件起,也不行

<!--<dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.el</artifactId>
        <version>3.0.1-b08</version>
    </dependency>
    <dependency>
        <groupId>org.glassfish.web</groupId>
        <artifactId>javax.servlet.jsp</artifactId>
        <version>2.3.2</version>
        <exclusions>
            <exclusion>
                <groupId>org.glassfish</groupId>
                <artifactId>javax.el</artifactId>
            </exclusion>
        </exclusions>
    </dependency>-->
    我把这三个依赖去掉就ok,大师可以去掉吗?会不会影响其他的功能?

不是我加的,也不知道做啥用的,是jetty必须的么?@wendal

谢谢两位解答,如果非必须的,可以在下一个版本除去吗?

@qq_d6c9c504 如果验证过的确没用,我去干掉它

我项目起来了,也点了其他的功能,没有报错,可能真不太需要。
一个文章http://blog.csdn.net/tomato__/article/details/37756419,是说默认采用的是 Apache Jasper编译。@wendal ,你参考下。

添加回复
请先登陆
回到顶部