posts - 37,  comments - 53,  trackbacks - 0

本想使用打包后的war来控制发布的版本,但是在发布后,编译jsp文件时却出现编译错误:
Exception compiling Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

ERROR 09-14  14:07:56,726 [TP-Processor3] (ApplicationContext.java:675) - Exception:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
 at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:105)
 at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:924)
 at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
 at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
 at com.mdcchina.util.Validates.FromFilter.doFilter(Unknown Source)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
 at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
 at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
 at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
 at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)
ERROR 09-14  14:07:56,734 [TP-Processor3] (ApplicationDispatcher.java:704) - Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file


需要将jdk下面的tools.jar包加入到应用的classpath下面,或是将其copy到tomcat的/common/lib下
才能解决该问题:)

posted on 2006-09-14 16:59 雪地孤鸿 阅读(4414) 评论(2)  编辑  收藏 所属分类: 工作日志

FeedBack:
# re: 在tomcat下发布使用eclipse中的ant打包后的war文件
2007-01-31 10:54 | 谢谢
谢谢了!正好解决了我的问题!  回复  更多评论
  
# re: 在tomcat下发布使用eclipse中的ant打包后的war文件[未登录]
2008-05-22 15:52 | Sam
谢谢了。  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航:
 
<2006年9月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

常用链接

留言簿(17)

随笔分类

随笔档案

文章档案

blog

搜索

  •  

最新评论

阅读排行榜

评论排行榜