今天在jetty下配置一个jsp模版的报表页面,报如下异常信息:

  1.  
    org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required
  2.  
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:92)
  3.  
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:378)
  4.  
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:119)
  5.  
    at org.apache.jasper.compiler.Jsr199JavaCompiler.compile(Jsr199JavaCompiler.java:208)
  6.  
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:384)
  7.  
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
  8.  
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
  9.  
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
  10.  
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
  11.  
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
  12.  
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  13.  
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:558)
  14.  
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:489)
  15.  
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
  16.  
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:520)
  17.  
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
  18.  
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:972)
  19.  
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:417)
  20.  
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
  21.  
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:906)
  22.  
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
  23.  
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
  24.  
    at org.eclipse.jetty.server.Server.handle(Server.java:350)
  25.  
    at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442)
  26.  
    at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:910)
  27.  
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565)
  28.  
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217)
  29.  
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:46)
  30.  
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:545)
  31.  
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43)
  32.  
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
  33.  
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
  34.  
    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(选择这个成功)!!

最新文章

  1. tc674div1b
  2. OpenCV从入门到放弃系列之——core模块.核心功能(一)
  3. Qt环境搭建(Qt Creator)+Visual Studio
  4. Linux 日志服务器 rsyslog
  5. Shared pool
  6. Difference between Linearizability and Serializability
  7. 使用ASP.NET web API创建REST服务(三)
  8. delphi 中 image 控件加载bmp、JPG、GIF、PNG等图片的办法
  9. #ifndef#define#endif的用法
  10. SignalR实现B/S系统对windows服务运行状态的监测
  11. 设置Ubuntu Mysql可以远程链接
  12. [原]node.js使用感想
  13. Wireshark的专家模式
  14. PHP运行出现Notice : Use of undefined constant
  15. CentOS 查看和修改 Mysql 字符集
  16. OPPO A3在哪里打开usb调试模式的详细教程
  17. [leetcode-108,109] 将有序数组转换为二叉搜索树
  18. jdk动态代理和cglib动态代理
  19. C/s程序过时了吗?
  20. Hive常用配置

热门文章

  1. Spring-data-jpa 之Specification in的用法
  2. Fatal error: Maximum execution time of 30 seconds exceeded in
  3. mysql性能检查脚本-部分
  4. FL2440 rt3070模块station模式动态获取IP地址
  5. Druid对比Cassandra
  6. Docker解析及轻量级PaaS平台演练(二)--Docker的一些简单命令
  7. mahout运行测试与数据挖掘算法之聚类分析(一)kmeans算法解析
  8. 外网无法连接Kafka集群(报错:NoBrokersAvailable)
  9. EffectiveJava(22)JAVA四种嵌套类的特点及用法
  10. openerp wizard to tree view