Netbeans не запустит Tomcat - PullRequest
       54

Netbeans не запустит Tomcat

0 голосов
/ 21 апреля 2020

Я пытаюсь запустить Tomcat для домашней работы, используя Netbeans. Поэтому я добавил Tomcat в NetBeans, щелкнув Сервис -> Сервер -> Добавить сервер -> Apache Tomcat или TomEE -> / location / of / tomcat / directory /, но не добавил имя пользователя и пароль при добавлении сервера в NetBeans, потому что я не хочу запрашивать пароль каждый раз, когда я использую этот сервер. Затем я создал веб-приложение и добавил очень простой индексный файл html вместе с файлом css и простым файлом jsp в папке «Веб-страницы». Когда я попытался запустить Tomcat, нажав кнопку воспроизведения, я застрял в этой строке:

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)
...