JSP编译期间"tmpFile.renameTo(classFile)失败"的原因 [英] Cause of 'tmpFile.renameTo(classFile) failed' during JSP compilation

查看:214
本文介绍了JSP编译期间"tmpFile.renameTo(classFile)失败"的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我开始在JBOss 4.0.5 JSP应用程序中遇到奇怪的行为.第一次尝试(第二次,第三次..)时,JSP编译失败,但出现以下异常:

Recently, I started to experience strange behaviour in JBOss 4.0.5 JSP application. The JSP compilation fails on first (second, third,..) attempt with exception:

17:24:29,909 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
java.io.IOException: tmpFile.renameTo(classFile) failed
        at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:245)
        at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:164)
        at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:429)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

几次重试(0到〜7很少)后,页面最终将被编译并呈现OK.

After few retries (where few is 0 to ~ 7), the page gets eventually compiled and renders OK.

平台是Windows 7-Pro 64位,Java版本是

Platform is Windows 7-Pro 64 bit, Java version is

c:\ATG\ATG2007.1>java -version
java version "1.5.0_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)
Java HotSpot(TM) Client VM (build 1.5.0_21-b01, mixed mode)

JBoss版本:

16:49:51,384 INFO  [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)

Tomcat版本是5.5(JBoss附带的版本).

Tomcat version is 5.5 (the one included with JBoss).

谢谢.

推荐答案

这与

This is related to Tomcat 5.5 bug 38713. It seems to be fixed in Tomcat 5.5.25 onwards.

这篇关于JSP编译期间"tmpFile.renameTo(classFile)失败"的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆