eclipse创建maven项目启动报错

eclipse 创建maven 项目 动态web工程完整示例
(参考https://www.cnblogs.com/noteless/p/5213075.html

eclipse的版本为:Eclipse Java Oxygen
默认只有J2SE,没有J2EE
升级J2EE(参考https://blog.csdn.net/YIII_TIAN/article/details/78991782

根据创建maven项目步骤,项目取名:spring-ioc-demo
启动报错如下:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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

An error occurred at line: 1 in the generated java file
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.

查找问题结论:tomcat 6.0.29,jdk是1.8版本,由于tomcat比jdk版本低而错误,tomcat 8.0及以上版本才能支持jdk1.8。

[INFO] Using existing Tomcat server configuration at C:\Users\Administrator\eclipse-workspace\spring-ioc-demo\target\tomcat
四月 10, 2018 11:57:54 下午 org.apache.catalina.startup.Embedded start
信息: Starting tomcat server
四月 10, 2018 11:57:54 下午 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.29
四月 10, 2018 11:57:54 下午 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
四月 10, 2018 11:57:54 下午 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
四月 10, 2018 11:58:12 下午 org.apache.jasper.compiler.JDTCompiler$1 findType
严重: Compilation error

开始下载tomcat 8.0
这里写图片描述

这个自带的下载及安装有点坑爹,启动一直报错,我怀疑是版本的问题,可能系统32位或64位对应不上(我的电脑是Windows 64位)

重新去官网下载tomcat 8.5.30(64-bit Windows zip )
(下载地址:https://tomcat.apache.org/download-80.cgi

重新启动tomcat 8.5.30
这里写图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值