我嘗試了所有我能找到的解決方案,但無濟於事。 我創建JRE_HOME,CATALINA_HOME,像改變端口在Eclipse中的一些設置...無論我做了什麼,我的tomcat 7都不會啓動
這是我從的startup.bat得到:
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:19
6)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:169)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:241)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:292)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:59)
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.57\logs\localh
ost.2015-01-16.log (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.juli.FileHandler.openWriter(FileHandler.java:386)
at org.apache.juli.FileHandler.<init>(FileHandler.java:97)
at org.apache.juli.FileHandler.<init>(FileHandler.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:558)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:501)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:311)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(Unknown Sour
ce)
at java.util.logging.LogManager.getLogManager(Unknown Source)
at java.util.logging.Logger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(Unknown Source)
at java.util.logging.Logger.demandLogger(Unknown Source)
at java.util.logging.Logger.getLogger(Unknown Source)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:71)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:19
6)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:169)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:241)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:292)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:59)
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.57\logs\manage
r.2015-01-16.log (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.juli.FileHandler.openWriter(FileHandler.java:386)
at org.apache.juli.FileHandler.<init>(FileHandler.java:97)
at org.apache.juli.FileHandler.<init>(FileHandler.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:558)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:501)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:311)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(Unknown Sour
ce)
at java.util.logging.LogManager.getLogManager(Unknown Source)
at java.util.logging.Logger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(Unknown Source)
at java.util.logging.Logger.demandLogger(Unknown Source)
at java.util.logging.Logger.getLogger(Unknown Source)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:71)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:19
6)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:169)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:241)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:292)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:59)
java.util.logging.ErrorManager: 4
java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.57\logs\host-m
anager.2015-01-16.log (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.juli.FileHandler.openWriter(FileHandler.java:386)
at org.apache.juli.FileHandler.<init>(FileHandler.java:97)
at org.apache.juli.FileHandler.<init>(FileHandler.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:558)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:501)
at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLo
gManager.java:311)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.util.logging.LogManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.readPrimordialConfiguration(Unknown Sour
ce)
at java.util.logging.LogManager.getLogManager(Unknown Source)
at java.util.logging.Logger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$RootLogger.<init>(Unknown Source)
at java.util.logging.LogManager$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(Unknown Source)
at java.util.logging.Logger.demandLogger(Unknown Source)
at java.util.logging.Logger.getLogger(Unknown Source)
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:71)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:19
6)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:169)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:241)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:292)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:59)
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/7.0.57
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Nov 3 2014 08:39:16 UTC
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 7.0.57.0
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 8.1
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.3
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME: C:\Program Files\Java\jre7
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.7.0_67-b01
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Program Files\apache-tomcat-7.0.57
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Program Files\apache-tomcat-7.0.57
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=C:\Program Files\ap
ache-tomcat-7.0.57\conf\logging.properties
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLo
aderLogManager
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\apache-tomcat
-7.0.57\endorsed
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Program Files\apache-tomcat-7.0.
57
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\apache-tomcat-7.0.
57
Jan 16, 2015 8:59:04 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=C:\Program Files\apache-tomcat-7.0
.57\temp
Jan 16, 2015 8:59:04 PM org.apache.catalina.core.AprLifecycleListener lifecycleE
vent
INFO: Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.5
.1.
Jan 16, 2015 8:59:04 PM org.apache.catalina.core.AprLifecycleListener lifecycleE
vent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
Jan 16, 2015 8:59:04 PM org.apache.catalina.core.AprLifecycleListener initialize
SSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1j 15 Oct 2014)
Jan 16, 2015 8:59:05 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Jan 16, 2015 8:59:05 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Jan 16, 2015 8:59:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1262 ms
Jan 16, 2015 8:59:05 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 16, 2015 8:59:05 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Jan 16, 2015 8:59:05 PM org.apache.catalina.valves.AccessLogValve open
SEVERE: Failed to open access log file [C:\Program Files\apache-tomcat-7.0.57\lo
gs\localhost_access_log.2015-01-16.txt]
java.io.FileNotFoundException: C:\Program Files\apache-tomcat-7.0.57\logs\localh
ost_access_log.2015-01-16.txt (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.catalina.valves.AccessLogValve.open(AccessLogValve.java:12
00)
at org.apache.catalina.valves.AccessLogValve.startInternal(AccessLogValv
e.java:1261)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipel
ine.java:185)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.ja
va:1137)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java
:816)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1575)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.
java:1565)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Jan 16, 2015 8:59:05 PM org.apache.catalina.startup.HostConfig start
SEVERE: Unable to create directory for deployment: C:\Program Files\apache-tomca
t-7.0.57\conf\Catalina\localhost
Jan 16, 2015 8:59:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.57\
webapps\docs
Jan 16, 2015 8:59:05 PM org.apache.catalina.core.StandardContext postWorkDirecto
ry
WARNING: Failed to create work directory [C:\Program Files\apache-tomcat-7.0.57\
work\Catalina\localhost\docs] for context [/docs]
Jan 16, 2015 8:59:05 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\apache-tomcat-7.0.57\work
\Catalina\localhost\docs is unusable.
Jan 16, 2015 8:59:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\apache-tomcat-7.0
.57\webapps\docs has finished in 508 ms
Jan 16, 2015 8:59:05 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.57\
webapps\examples
Jan 16, 2015 8:59:05 PM org.apache.catalina.core.StandardContext postWorkDirecto
ry
WARNING: Failed to create work directory [C:\Program Files\apache-tomcat-7.0.57\
work\Catalina\localhost\examples] for context [/examples]
Jan 16, 2015 8:59:06 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\apache-tomcat-7.0.57\work
\Catalina\localhost\examples is unusable.
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\apache-tomcat-7.0
.57\webapps\examples has finished in 417 ms
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.57\
webapps\host-manager
Jan 16, 2015 8:59:06 PM org.apache.catalina.core.StandardContext postWorkDirecto
ry
WARNING: Failed to create work directory [C:\Program Files\apache-tomcat-7.0.57\
work\Catalina\localhost\host-manager] for context [/host-manager]
Jan 16, 2015 8:59:06 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\apache-tomcat-7.0.57\work
\Catalina\localhost\host-manager is unusable.
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\apache-tomcat-7.0
.57\webapps\host-manager has finished in 56 ms
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.57\
webapps\manager
Jan 16, 2015 8:59:06 PM org.apache.catalina.core.StandardContext postWorkDirecto
ry
WARNING: Failed to create work directory [C:\Program Files\apache-tomcat-7.0.57\
work\Catalina\localhost\manager] for context [/manager]
Jan 16, 2015 8:59:06 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\apache-tomcat-7.0.57\work
\Catalina\localhost\manager is unusable.
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\apache-tomcat-7.0
.57\webapps\manager has finished in 54 ms
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\apache-tomcat-7.0.57\
webapps\ROOT
Jan 16, 2015 8:59:06 PM org.apache.catalina.core.StandardContext postWorkDirecto
ry
WARNING: Failed to create work directory [C:\Program Files\apache-tomcat-7.0.57\
work\Catalina\localhost\_] for context []
Jan 16, 2015 8:59:06 PM org.apache.jasper.EmbeddedServletOptions <init>
SEVERE: The scratchDir you specified: C:\Program Files\apache-tomcat-7.0.57\work
\Catalina\localhost\_ is unusable.
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\apache-tomcat-7.0
.57\webapps\ROOT has finished in 57 ms
Jan 16, 2015 8:59:06 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Jan 16, 2015 8:59:06 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Jan 16, 2015 8:59:06 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1154 ms
這裏就是我谷歌瀏覽器8080:輸入本地主機時,你得到
HTTP Status 500 - java.lang.IllegalStateException: No output folder
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
\t org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
\t org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:391)
\t org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
\t org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
\t javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
\t org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.IllegalStateException: No output folder
\t org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:749)
\t org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:198)
\t org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:592)
\t org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:462)
\t org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:426)
\t org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:650)
\t org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
\t org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
\t org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
\t javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
\t org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.57 logs.
Apache Tomcat/7.0.57
這可能會解決您的問題,http://stackoverflow.com/questions/10577494/tomcat-installation-exception – Vicky
似乎啓動服務器的用戶沒有對C:\ Program Files \ apache的寫入訪問權限 - Tomcat的7.0.57 \日誌。除此之外:由於目錄名稱中的空格,我在過去遇到過一些麻煩。 –
以管理員身份運行服務器。 –