简体   繁体   中英

message java.lang.IllegalStateException: No output folder

I am new to Tomcat on Windows. I am trying to deploy my Java project which I have made in RHEL 5 using Tomcat. Now I want to run that project on window. So I copied and pasted my project folder inside the Tomcat web apps Directory

i.e C:\Program Files\apache-tomcat-6.0.37\webapps

but I am unable to run the project as I am facing below error while opening my first login page. Do I need to make any further changes in code or web.xml file as I am now deploying it on Windows?

type Exception report

message java.lang.IllegalStateException: No output folder

**Description** The server encountered an internal error that prevented
it from fulfilling this request.

Exception

org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:538)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
    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.lang.IllegalStateException: No output folder
    org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:678)
    org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:197)
    org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:514)
    org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:453)
    org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:399)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
    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.37 logs.

I have given complete access to my Tomcat Directory. Now i am not getting this error. Thanks !!

I was facing the similar problem on ubuntu 14.04. I was doing some analysis and dropped the work folder manually. Then while running the tomcat server I was getting same exception. The issue was, when we access the manager application of tomcat, it requires jsp page to display the content, and JSP page is rendered from the generated class file which resides in work/Catalina/localhost/.... folder.

I created the work directory manually, however the problem was still not solved.

Then I realized that, because I manually created the work directory tomcat7 user didn't have the permission to write on that directory. Changed the owner for work directory from root to tomcat7

sudo chown tomcat7 work

restart tomcat service tomcat restart .

Problem solved.

Hope this helps

If you are on Linux/Unix and facing the issue:

STEPS:

Note the User and the service ,in my case it was tomcat yours could be anything else...

1. mkdir work
2. sudo chown tomcat work  
3. service tomcat6 restart

I have changed the permissions for the work directory and it's working...

Steps:
1. Go to the directory where tomcat is present
2. Execute the command:
sudo chmod 777 work

Check your Disk space ?

I also got this error when my / partition had filled up. Freeing up some disk space removed this error for me.

As your start tomcat as the root account firstly, the work folder was already created. You run tomcat as the account tomcat, as tomcat account has no permission to the folder ./work, so throw the exception. To solve it, ps remove ./work, and then restart tomcat by the tomcat user.

Grant all permissions to the tomcat directory .

sudo chmod -R 777 /path/to/tomcat/directory

mine was " /opt/tomcat/ "

It worked for me. Hope it helps.

Note : Don't forget sudo

授予 tomcat 目录的完全权限,然后重新启动服务。它对我有用,我希望这对你也有用。

It can be because of lack of write permissions to cache directory (/var/lib/tomcat6 on Linux). If this is your case, use the following commands to grant full access and restart Tomcat:

sudo /etc/init.d/tomcat6 stop
sudo chown -R tomcat6 /var/lib/tomcat6
sudo chmod -R 777 /var/lib/tomcat6
sudo /etc/init.d/tomcat6 start

If this was working for you previously, sometimes the work directory is simply in a bad state and you can fix it by simply deleting it and allowing Tomcat to create a new one from scratch.

尝试完全重新启动服务器(如果适用)

I had the same problem. Turned out it was because I placed it in Program Files and Windows didn't let Tomcat do any changes. I've just moved apache-tomcat folder to a different location.

De permissão total ao diretório apache. No windows botão direito do mouse propriedades->seguranca->avançadas->permissões->adicionar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM