当前位置: 首页 > 知识库问答 >
问题:

NetBeans:启动Tomcat失败

司马作人
2023-03-14
Starting Tomcat process...
Waiting for Tomcat...
Starting of Tomcat failed.
/Users/username/Programming/murach/servlet_and_jsp/netbeans/book_apps/ch02email/nbproject/build-impl.xml:1045: Deployment error: Starting of Tomcat failed.
See the server log for details.
BUILD FAILED (total time: 5 seconds)
25-Feb-2017 10:52:01.036 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 10:52:01.039 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 10:56:20.738 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 10:56:20.739 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 10:56:21.153 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 10:56:21.154 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 10:56:57.631 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 10:56:57.633 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 10:56:58.028 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 10:56:58.029 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:03:33.511 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:03:33.512 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:03:33.954 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:03:33.954 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:04:55.741 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:04:55.742 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:04:56.266 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:04:56.267 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:07:47.921 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:07:47.921 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:07:48.269 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:07:48.270 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:10:47.597 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:10:47.597 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:10:47.938 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:10:47.938 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:26:32.913 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:26:32.914 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:26:33.299 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:26:33.300 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:33:02.424 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:33:02.425 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 11:33:02.830 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 11:33:02.830 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 11:37:40.206 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 11:37:40.206 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 12:00:38.512 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 12:00:38.512 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 12:00:38.911 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 12:00:38.912 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 12:02:02.486 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 12:02:02.486 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 12:02:02.900 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 12:02:02.901 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 12:15:11.097 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 12:15:11.097 INFO [localhost-startStop-2] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 12:55:27.480 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 12:55:27.480 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 12:55:27.850 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 12:55:27.850 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 12:55:43.461 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 12:55:43.461 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 12:55:43.768 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 12:55:43.768 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 12:59:14.284 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 12:59:14.284 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:06:51.106 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 13:06:51.106 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:06:51.393 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 13:06:51.395 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 13:06:54.234 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 13:06:54.234 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:06:54.480 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 13:06:54.481 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 13:07:27.585 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 13:07:27.586 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:07:27.852 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 13:07:27.853 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 13:07:56.290 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 13:07:56.290 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:07:56.581 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 13:07:56.581 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
25-Feb-2017 13:08:06.413 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
25-Feb-2017 13:08:06.413 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
25-Feb-2017 13:08:06.701 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
25-Feb-2017 13:08:06.701 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()

每当我试图运行程序时,我的浏览器中的localhost:8080就可以工作,所以我相信Tomcat实际上正在启动,只是由于某些原因不能与Netbeans一起工作。

第一个错误当前是相同的,但第二个错误现在看起来如下所示:

25-Feb-2017 13:48:08.178 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.11
25-Feb-2017 13:48:08.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 10 2017 21:02:52 UTC
25-Feb-2017 13:48:08.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.11.0
25-Feb-2017 13:48:08.181 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Mac OS X
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.12.3
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86_64
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_121-b13
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /Users/username/Applications/tomcat-8.0
25-Feb-2017 13:48:08.182 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /Users/username/Applications/tomcat-8.0
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/username/Applications/tomcat-8.0/conf/logging.properties
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|Users-Mac-mini.local
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/username/Applications/tomcat-8.0
25-Feb-2017 13:48:08.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Users/username/Applications/tomcat-8.0
25-Feb-2017 13:48:08.184 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Users/username/Applications/tomcat-8.0/temp
25-Feb-2017 13:48:08.184 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/username/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
25-Feb-2017 13:48:08.883 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
25-Feb-2017 13:48:08.953 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
25-Feb-2017 13:48:08.959 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
25-Feb-2017 13:48:08.968 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
25-Feb-2017 13:48:08.969 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1818 ms
25-Feb-2017 13:48:09.059 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
25-Feb-2017 13:48:09.059 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.11
25-Feb-2017 13:48:09.074 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/username/Applications/tomcat-8.0/webapps/docs
25-Feb-2017 13:48:09.602 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/username/Applications/tomcat-8.0/webapps/docs has finished in 527 ms
25-Feb-2017 13:48:09.603 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/username/Applications/tomcat-8.0/webapps/examples
25-Feb-2017 13:48:10.305 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/username/Applications/tomcat-8.0/webapps/examples has finished in 703 ms
25-Feb-2017 13:48:10.306 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/username/Applications/tomcat-8.0/webapps/host-manager
25-Feb-2017 13:48:10.358 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/username/Applications/tomcat-8.0/webapps/host-manager has finished in 52 ms
25-Feb-2017 13:48:10.359 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/username/Applications/tomcat-8.0/webapps/manager
25-Feb-2017 13:48:10.419 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/username/Applications/tomcat-8.0/webapps/manager has finished in 59 ms
25-Feb-2017 13:48:10.419 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /Users/username/Applications/tomcat-8.0/webapps/ROOT
25-Feb-2017 13:48:10.469 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /Users/username/Applications/tomcat-8.0/webapps/ROOT has finished in 50 ms
25-Feb-2017 13:48:10.473 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [http-nio-8080]
25-Feb-2017 13:48:10.479 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [ajp-nio-8009]
25-Feb-2017 13:48:10.480 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1510 ms

共有1个答案

长孙弘壮
2023-03-14

这个问题几个星期来一直让我感到沮丧,但今天我终于解决了。据我所知,教科书上的说明不再完全适用于MacOS Sierra。如果其他人也有类似的麻烦,下面是我使用的步骤:

  1. 安装了NetBeans for Java EE(安装程序说“安装时间剩余:不到一分钟”很久了。我只是不去管它,它最终完成了安装。)
  2. 下载并解压缩了Apache Tomcat 9(我最终将其放在存储其他服务器文件夹的同一个文件夹中,并没有按照书中的指示对其进行重命名。)
  3. 主要遵循Book的说明来配置Tomcat服务器,但使用服务器端口8081,因为另一台服务器使用8080。再次使用默认名称。
  4. 按照书中的说明下载了Murach示例文件,但在三次注册后,网站仍然无法识别我以前注册过。
  5. 按照书中的指示打开了第2章的示例文件。

这是解决我的问题的主要部分:系统代理设置在塞拉。多亏了https://discussions.apple.com/message/30715103#30715103,我终于解决了这个问题。以下是我使用的步骤:

    null

导入其他项目文件后,仍有一些遗留问题。到目前为止,有一个。jar文件需要手动链接,可能是因为我使用的是Tomcat9而不是Tomcat8?不管怎样,容易做到。此外,我还得到了一些警告,其中包括:

warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning

右键单击项目,然后选择Properties,并将源/二进制格式从JDK6更改为JDK8,解决了此警告。

希望能帮助别人!

 类似资料:
  • 我的问题很简单(但我不知道如何解决它),我安装了netbeans的最后一个版本(8.1),我激活了Java EE Java Se模块,并在我的系统上安装了glassfish&tomcat 8.0.27.0。 问题是:Glassfish开始的很好,但tomcat不管serveur的版本或位置都不会启动,我唯一的输出是: Le fichier SP,CIFI,est INTROUVABLE。 使用ca

  • 我从Netbeans IDE 7.4启动Apache Tomcat 6时遇到了问题(在7.3版本时我遇到了同样的问题。其他人提到在其他版本中也存在这个问题,比如8.0等)。 我做了什么: > 删除已安装的Tomcat 7(不删除它,我也遇到了同样的困难) 添加新服务器,从Apache Tomcat网站下载(版本Apache-Tomcat-6.0.39,其他版本我也有同样的问题) 我的服务器位置:d

  • 我在Netbeans中的Tomcat实现有一个问题,我根本无法从那里启动它。我使用的是Netbeans 8.0.2和Tomcat8,当我试图启动时,它说错误启动Tomcat失败,'127.0.0.1'不被识别为内部或外部命令、可操作程序或批处理文件。现在,我已经尝试从文件中删除引号,因为我听说这会有所帮助,但仍然没有什么...有人有什么想法吗?我将不胜感激。谢了。 我可以手动启动它,一切运行良好,

  • 我试图启动Tomcat为我的家庭作业使用网豆。所以我通过单击工具将Tomcat添加到Netbean- 等待了一段时间后,我从Netbean的控制台收到一条消息,说Tomcat无法启动。当我通过输入localhost:8080在浏览器上进行检查时,我得到以下输入图像描述 请参阅下面的完整输出: 从日志: 在“运行”控制台上:

  • 当前的java版本是

  • 启动Tomcat失败,请检查C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.27\bin\catalina。bat和相关脚本是可执行的。 一直有这个问题在netbean。如何解决问题?请帮忙。