jetty访问jsp页面出现异常:org.apache.jasper.JasperException: PWC6345: A full JDK (not just JRE) is required解决
2024-08-26 01:02:05
今天在jetty下配置一个jsp模版的报表页面,报如下异常信息:
- org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
- at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
- at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
- at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
- at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:208)
- at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:384)
- at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
- at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
- at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
- at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
- at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
- at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558)
- at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:489)
- at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
- at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
- at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
- at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:972)
- at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
- at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
- at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:906)
- at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
- at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
- at org.eclipse.jetty.server.Server.handle(Server.java:350)
- at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442)
- at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:910)
- at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565)
- at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217)
- at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:46)
- at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:545)
- at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43)
- at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
- at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
- at java.lang.Thread.run(Unknown Source)
在网上找了很多资料,主要问题还是jetty运行的jre环境配置问题,最终解决方案如下:
在eclipse—>Window—>prefence—>java—>Installed JREs,选择jre点击Edit找到jdk的安装目录,我的安装在C:Program Files/java/jdk1.7在jdk安装目录下找到jre目录,点击finish。,启动项目,访问jsp页面,一切正常。
提醒:网上的解决方案我试了不成功,主要原因就是因为jre配置环境的错误,在选择jre环境的时候,有两个选择,一个是java根目录下的jre(选择这个会不成功),一个是在jdk根目录下的jre(选择这个成功)!!
最新文章
- tc674div1b
- OpenCV从入门到放弃系列之——core模块.核心功能(一)
- Qt环境搭建(Qt Creator)+Visual Studio
- Linux 日志服务器 rsyslog
- Shared pool
- Difference between Linearizability and Serializability
- 使用ASP.NET web API创建REST服务(三)
- delphi 中 image 控件加载bmp、JPG、GIF、PNG等图片的办法
- #ifndef#define#endif的用法
- SignalR实现B/S系统对windows服务运行状态的监测
- 设置Ubuntu Mysql可以远程链接
- [原]node.js使用感想
- Wireshark的专家模式
- PHP运行出现Notice : Use of undefined constant
- CentOS 查看和修改 Mysql 字符集
- OPPO A3在哪里打开usb调试模式的详细教程
- [leetcode-108,109] 将有序数组转换为二叉搜索树
- jdk动态代理和cglib动态代理
- C/s程序过时了吗?
- Hive常用配置
热门文章
- Spring-data-jpa 之Specification in的用法
- Fatal error: Maximum execution time of 30 seconds exceeded in
- mysql性能检查脚本-部分
- FL2440 rt3070模块station模式动态获取IP地址
- Druid对比Cassandra
- Docker解析及轻量级PaaS平台演练(二)--Docker的一些简单命令
- mahout运行测试与数据挖掘算法之聚类分析(一)kmeans算法解析
- 外网无法连接Kafka集群(报错:NoBrokersAvailable)
- EffectiveJava(22)JAVA四种嵌套类的特点及用法
- openerp wizard to tree view