我试图启动Tomcat为我的家庭作业使用网豆。所以我通过单击工具将Tomcat添加到Netbean-
21-Apr-2020 00:13:00.705 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1,833] milliseconds
等待了一段时间后,我从Netbean的控制台收到一条消息,说Tomcat无法启动。当我通过输入localhost:8080在浏览器上进行检查时,我得到以下输入图像描述
请参阅下面的完整输出:
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
21-Apr-2020 00:17:51.345 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.34
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Apr 3 2020 12:02:52 UTC
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.34.0
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.15.4
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
21-Apr-2020 00:17:51.358 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home
21-Apr-2020 00:17:51.359 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 14+36-1461
21-Apr-2020 00:17:51.359 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
21-Apr-2020 00:17:51.359 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /Users/kevinchen/Documents/apache-tomcat-9.0.34
21-Apr-2020 00:17:51.359 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /Users/kevinchen/Documents/apache-tomcat-9.0.34
21-Apr-2020 00:17:51.388 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/kevinchen/Documents/apache-tomcat-9.0.34/conf/logging.properties
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|Kevins-MacBook-Pro-2.local
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
21-Apr-2020 00:17:51.389 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
21-Apr-2020 00:17:51.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
21-Apr-2020 00:17:51.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
21-Apr-2020 00:17:51.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/kevinchen/Documents/apache-tomcat-9.0.34
21-Apr-2020 00:17:51.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Users/kevinchen/Documents/apache-tomcat-9.0.34
21-Apr-2020 00:17:51.390 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Users/kevinchen/Documents/apache-tomcat-9.0.34/temp
21-Apr-2020 00:17:51.390 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/kevinchen/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
21-Apr-2020 00:17:51.722 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
21-Apr-2020 00:17:51.793 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [762] milliseconds
21-Apr-2020 00:17:51.864 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
21-Apr-2020 00:17:51.865 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.34]
21-Apr-2020 00:17:51.889 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/docs]
21-Apr-2020 00:17:52.230 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/docs] has finished in [342] ms
21-Apr-2020 00:17:52.230 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/manager]
21-Apr-2020 00:17:52.299 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/manager] has finished in [69] ms
21-Apr-2020 00:17:52.301 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/examples]
21-Apr-2020 00:17:52.902 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/examples] has finished in [602] ms
21-Apr-2020 00:17:52.903 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/ROOT]
21-Apr-2020 00:17:52.938 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/ROOT] has finished in [35] ms
21-Apr-2020 00:17:52.939 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/host-manager]
21-Apr-2020 00:17:52.992 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Users/kevinchen/Documents/apache-tomcat-9.0.34/webapps/host-manager] has finished in [54] ms
21-Apr-2020 00:17:53.003 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
21-Apr-2020 00:17:53.024 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1,230] milliseconds
从日志:
21-Apr-2020 00:01:00.525 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
21-Apr-2020 00:01:00.526 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
21-Apr-2020 00:01:00.528 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@2b95e48b')
21-Apr-2020 00:06:17.423 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
21-Apr-2020 00:06:17.423 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
21-Apr-2020 00:06:33.489 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
21-Apr-2020 00:06:33.490 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
21-Apr-2020 00:06:33.493 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@2b95e48b')
21-Apr-2020 00:12:54.964 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
21-Apr-2020 00:12:54.964 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
21-Apr-2020 00:13:00.616 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
21-Apr-2020 00:13:00.616 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
21-Apr-2020 00:13:00.617 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@efde75f')
21-Apr-2020 00:16:40.591 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextDestroyed()
21-Apr-2020 00:16:40.591 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextDestroyed()
21-Apr-2020 00:17:52.885 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
21-Apr-2020 00:17:52.885 INFO [main] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
21-Apr-2020 00:17:52.891 INFO [main] org.apache.catalina.core.ApplicationContext.log ContextListener: attributeAdded('StockTicker', 'async.Stockticker@62ea3440')
在“运行”控制台上:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
Starting Tomcat process...
Waiting for Tomcat...
Starting of Tomcat failed.
BUILD FAILED (total time: 3 minutes 2 seconds)
尝试检查启动/停止端口。我在同一个问题上解决了选择不同港口的问题。
我在最新版本的Tomcat上得到了同样的东西(似乎是从9.0.30左右开始的)。我切换到旧版本(9.0.24),它开始工作。不知道是什么坏了,但在新的时代有东西坏了
如果您已经安装了Apache Tomcat,可能您的Apache服务已经在运行,并且它与Netbean冲突。您可以停止自动运行的apache服务,然后在Netbean中运行您的应用程序。
退房到
开始-
如果Apache Tomcat正在运行,请停止,然后转到Netbeans右键单击project并选择run。Netbean将启动tomcat并将您的web应用部署到tomcat服务器上,现在它将成功运行。
当我尝试启动嵌入式tomcat时,我的应用程序将一直运行,直到tomcat达到以下行: "Dez11, 2012 3:28:06PMorg.apache.coyote.AbstractProtocol启动信息:启动协议处理程序["超文本传输协议-bio-8080"]" 有人能帮我嵌入Tomcat吗? 顺致敬意,
我有一个大学项目,我必须编写一个Java应用程序。因为我们学习了使用Netbeans作为IDE的java,所以我决定使用这个IDE编写应用程序。 我在以前的电脑上从未遇到过这个错误。现在,当我在编写函数或任何其他块后打开“{}”时,按“return”后的行没有缩进,按“tab”也没有任何作用。 也许有人知道问题出在哪里? 谢谢:D
我将JProfiler 7配置为与本地运行的Weblogic 8.1集成。 似乎weblogic在使用JProfiler生成的脚本(名为startweblog\u JProfiler.cmd)时启动得很好 然而,janalyiler部分错误并带有以下消息(分析从未发生): 我为PATH添加了以下内容: 路径=C:\Program Files\jprofiler7\bin\windows; 修改了我
我在开始时遇到了问题!事实上,它并没有启动,我也没有得到更多的信息: 有人能帮我吗?
每当我试图运行程序时,我的浏览器中的localhost:8080就可以工作,所以我相信Tomcat实际上正在启动,只是由于某些原因不能与Netbeans一起工作。 第一个错误当前是相同的,但第二个错误现在看起来如下所示:
我的问题很简单(但我不知道如何解决它),我安装了netbeans的最后一个版本(8.1),我激活了Java EE Java Se模块,并在我的系统上安装了glassfish&tomcat 8.0.27.0。 问题是:Glassfish开始的很好,但tomcat不管serveur的版本或位置都不会启动,我唯一的输出是: Le fichier SP,CIFI,est INTROUVABLE。 使用ca