Доброе утро, я пытаюсь использовать Apache Tomcat 9 с NetBeans 11.1 и JDK 11 в macOS, но он не работает.
Я установил Apache Tomcat 9.0.31 и настроил сервер Tomcat в NetBeans, но когда я пытаюсь запустить сервер, журналы выглядят нормально:
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
26-Feb-2020 10:00:53.276 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.31
26-Feb-2020 10:00:53.279 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Feb 5 2020 19:32:12 UTC
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.31.0
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Mac OS X
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.13.6
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: x86_64
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /Library/Java/JavaVirtualMachines/jdk-11.0.6.jdk/Contents/Home
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.6+8-LTS
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /usr/local/apache-tomcat-9.0.31
26-Feb-2020 10:00:53.280 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/local/apache-tomcat-9.0.31
26-Feb-2020 10:00:53.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
26-Feb-2020 10:00:53.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
26-Feb-2020 10:00:53.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
26-Feb-2020 10:00:53.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Library/Tomcat/conf/logging.properties
26-Feb-2020 10:00:53.297 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Library/Tomcat
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Library/Tomcat
26-Feb-2020 10:00:53.298 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Library/Tomcat/temp
26-Feb-2020 10:00:53.298 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/user/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
26-Feb-2020 10:00:53.587 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
26-Feb-2020 10:00:53.620 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [527] milliseconds
26-Feb-2020 10:00:53.674 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
26-Feb-2020 10:00:53.674 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.31]
26-Feb-2020 10:00:53.681 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/apache-tomcat-9.0.31/webapps/docs]
26-Feb-2020 10:00:53.908 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/apache-tomcat-9.0.31/webapps/docs] has finished in [226] ms
26-Feb-2020 10:00:53.908 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/apache-tomcat-9.0.31/webapps/manager]
26-Feb-2020 10:00:53.940 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/apache-tomcat-9.0.31/webapps/manager] has finished in [31] ms
26-Feb-2020 10:00:53.940 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/apache-tomcat-9.0.31/webapps/examples]
26-Feb-2020 10:00:54.169 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/apache-tomcat-9.0.31/webapps/examples] has finished in [229] ms
26-Feb-2020 10:00:54.169 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/apache-tomcat-9.0.31/webapps/ROOT]
26-Feb-2020 10:00:54.187 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/apache-tomcat-9.0.31/webapps/ROOT] has finished in [17] ms
26-Feb-2020 10:00:54.187 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/apache-tomcat-9.0.31/webapps/host-manager]
26-Feb-2020 10:00:54.204 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/apache-tomcat-9.0.31/webapps/host-manager] has finished in [17] ms
26-Feb-2020 10:00:54.210 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
26-Feb-2020 10:00:54.219 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [598] milliseconds
Если я go до http://localhost: 8080 в веб-браузере Я вижу, что сервер Tomcat работает. Проблема в том, что Netbeans говорит: «Запуск apache Tomcat ...», а через несколько минут появляется сообщение об ошибке NetBeans, говорящее: «Запуск Tomcat не выполнен», я не могу развернуть любое веб-приложение из NetBeans, но в Интернете браузер, который я вижу, работает.
Я пытался настроить переменные среды, такие как JRE_HOME, JAVA_HOME, CATALINA_HOME, CATALINA_BASE. Также отметьте «Нет прокси» в общих настройках прокси NetBeans и настройте соединитель на сервере. xml, например:
<Connector
connectionTimeout="20000"
port="8080"
protocol="HTTP/1.1"
redirectPort="8443"
server="Apache-Coyote/1.1"
/>
Но это не работает.
Я не знаю что я могу сделать, чтобы решить эту проблему.
Заранее спасибо.
(обновление)
Я решил это с помощью: https://issues.apache.org/jira/browse/NETBEANS-3903