Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tomcat installation exception

I'm trying to install tomcat-7.0.27 on windows 7. I then clicked bin/startup.bat, a window shows up and I see "INFO: Server startup in 761 ms" at the last line. I then try to check "http"//localhost:8080" but the infomation belowe shows:

HTTP Status 500 -

type Exception report

message

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:585)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.IllegalStateException: No output folder
    org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:738)
    org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:196)
    org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:581)
    org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:461)
    org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:425)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:639)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.27 logs.

Apache Tomcat/7.0.27

I then found this information at the every beginning of the window:

java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.27\logs\catalina.2012-05-14.log (Access is denied)

Can anyone please tell me what is going wrong here?

like image 693
safarisoul Avatar asked May 14 '12 04:05

safarisoul


4 Answers

Windows 7 makes it easy to run into such trouble when you are not careful enough installing things. You will have to make sure that the SYSTEM user has full access to the Tomcat folder, so that when Tomcat runs, it can freely create folders and files within its own directory.

like image 154
Renato Avatar answered Nov 11 '22 18:11

Renato


The problem is that the user that is running Tomcat lacks file permissions (read/write) in the install folder.

Solution

Right-click on the Tomcat folder (apache-tomcat-7.0.29), select "Properties", go to the "Security tab", try to give it full control to any users profile in you pc, just for be sure.

Then, click again to C:\Program Files (x86)\Apache Software Foundation\apache-tomcat-7.0.29\bin\startup.bat and wait for self creation of the folders by the application "startup.bat".


Other option is manually (I created the following directories by hand):

  • apache-tomcat-7.0.14/work/Catalina/localhost:
  • apache-tomcat-7.0.14/work/Catalina/localhost/_
  • apache-tomcat-7.0.14/work/Catalina/localhost/docs
  • apache-tomcat-7.0.14/work/Catalina/localhost/examples
  • apache-tomcat-7.0.14/work/Catalina/localhost/host-manager
  • apache-tomcat-7.0.14/work/Catalina/localhost/manager
  • apache-tomcat-7.0.14/config/Catalina/localhost/
  • apache-tomcat-7.0.14/logs
like image 22
pedro Avatar answered Nov 11 '22 19:11

pedro


What worked for me: Go to your tomcat installation bin directory, for me: C:\Program Files\Apache Software Foundation\apache-tomcat-7.0.37\bin. Right-click "startup.bat" and select "Run as Administrator"

like image 7
Crazy Cat Avatar answered Nov 11 '22 19:11

Crazy Cat


You do not have required access rights for creating folders inside your system drive.

You can solve this by

  1. right click "startup.bat" located in the "bin" folder of your apache installation.

  2. Click "Run as Administrator"

like image 3
Amey Avatar answered Nov 11 '22 19:11

Amey