gpt4 book ai didi

tomcat - Netbeans Tomcat 服务器问题

转载 作者:行者123 更新时间:2023-11-28 22:40:54 24 4
gpt4 key购买 nike

我目前正在尝试将 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)

最佳答案

我有同样的部署失败和访问被拒绝的消息。

关闭 netbeans 并以管理员身份运行它。它授予运行 tomcat 所需的所有权限。

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

关于tomcat - Netbeans Tomcat 服务器问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37758452/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com