Netbeans Tomcat服务器问题

时间:2016-06-10 23:29:34

标签: tomcat netbeans server

我目前正在尝试将Tomcat连接到Netbeans并在其上运行Web项目。我已经设置了一个带有用户名和密码的服务器,但不断收到此错误消息。我还在下面添加了服务器日志以获取更多详细信息。 :

Starting Tomcat process...
Waiting for Tomcat...
Tomcat server started.
In-place deployment at C:\Ryan Drive\Web Development\Java\NetBeans\Projects\WebApplication5\build\web
deploy?config=file%3A%2FC%3A%2FUsers%2Frmhaa%2FAppData%2FLocal%2FTemp%2Fcontext8651336917198990861.xml&path=/WebApplication5
FAIL - Failed to deploy application at context path /WebApplication5
C:\Ryan Drive\Web Development\Java\NetBeans\Projects\WebApplication5\nbproject\build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 4 seconds)

以下是服务器日志。看起来可能会拒绝访问?但我不知道为什么会这样。每次运行服务器时,我都会得到相同的服务器日志错误,与项目无关。

13-Jun-2016 18:14:22.419 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
13-Jun-2016 18:14:22.422 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 124 ms
13-Jun-2016 18:14:22.424 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
13-Jun-2016 18:14:22.431 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
13-Jun-2016 18:14:22.432 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 773 ms
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\ch07_ex2_download.xml (Access is denied)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at org.apache.catalina.manager.ManagerServlet.copyInternal(ManagerServlet.java:1626)
    at org.apache.catalina.manager.ManagerServlet.copy(ManagerServlet.java:1589)
    at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:880)
    at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:335)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

2 个答案:

答案 0 :(得分:1)

我遇到了无法部署和访问被拒绝的消息。

关闭netbeans并将其作为Adminstrator运行。它授予运行tomcat的所有必要权限。

如果它不起作用,可能是某种配置,请查看下面的视频。他们帮助了我很多 https://www.youtube.com/watch?v=pKMgr8uNvGMhttps://www.youtube.com/watch?v=psvuLBVeTzQ

答案 1 :(得分:0)

尝试关闭tomcat服务器,然后尝试再次清理构建项目。

Liron