wood burning stoves 2.0*
The moose likes Servlets and the fly likes tmpFile.renameTo(classFile) failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "tmpFile.renameTo(classFile) failed" Watch "tmpFile.renameTo(classFile) failed" New topic
Author

tmpFile.renameTo(classFile) failed

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 622
I am working on a web-app where i am using Jasper report asreporting tool, with servlet-jsp, and hibernate

It shows the following exception on opening the jsp page, and on refreshing the jsp frequently, the exception disappears and it works

SHOWN IN MYECLIPSE CONSOLE

SEVERE: Servlet.service() for servlet jsp threw exception
java.io.IOException: tmpFile.renameTo(classFile) failed
at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:246)
at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:165)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:458)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

SHOWN IN BROWSER
exception

org.apache.jasper.JasperException: Unable to compile class for JSP
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
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:723)
root cause

java.io.IOException: tmpFile.renameTo(classFile) failed
org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:246)
org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:165)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:458)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
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:723)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.39 logs.


Did a lot of googling, but couldn't find a suitable solution

Also checked the permission, only special permission for the user is unchecked

I have been using tomcat with hibernate jasper report since last 1.5yrs and its the first time i am facing such problem


kunal
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 518
    
    2

This may be mostly due to some errors in JSP. Have you checked the servlet version of of the JSP? Can you post the JSP


Regards
KumarRaja

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: tmpFile.renameTo(classFile) failed
 
Similar Threads
JBWEB000071: root cause java.io.IOException: tmpFile.renameTo(classFile) failed
Error: String literal is not properly closed by a double-quote
Strange behavior of Tomcat! "classFile.delete() failed"
Unable to compile class for JSP
Compile .java file on JSP