无论我做什么,我的雄猫7都不会开始

时间:2015-01-16 13:11:15

标签: tomcat7

我已经尝试了所有可以找到的解决方案,但无济于事。 我已经创建了JRE_HOME,CATALINA_HOME,Eclipse中的一些设置,比如更改端口......

这是我从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

这就是我在google chrome上输入localhost: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
	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:395)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.lang.IllegalStateException: No output folder
	org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:749)
	org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:198)
	org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:592)
	org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:462)
	org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:426)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:650)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	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

2 个答案:

答案 0 :(得分:0)

我从队友那里得到的另一个解决方案...... 我发现我不必继续卸载和安装tomcat。 这是答案:

我所要做的就是在Eclipse中单击左侧的Project,然后运行。使用服务器Tomcat。它奏效了。

答案 1 :(得分:0)

尝试创建环境变量CATALINA_BASE并指向与CATALINA_HOME相同的路径。我也得到了同样的错误,这个小小的改变除了我的一天!