2017-04-11 101 views
5

我無法理解發生了什麼。 2天前沒有問題,現在我無法部署我的應用程序。任何一個。我唯一做過的關於網絡的事情是使用以太網線將我的筆記本電腦插入房子中的其他插座,沒有別的。我嘗試了幾乎所有我在這裏找到的解決方案,但沒有任何幫助IntelliJ IDEA:Tomcat 8.5.13和9.0.0.M19 - 工件部署期間出錯。有關詳細信息,請參閱服務器日誌

日誌:

C:\servers\apache-tomcat-8.5.13\bin\catalina.bat run 
[2017-04-11 06:19:51,636] Artifact TestJEE:war exploded: Server is not connected. Deploy is not available. 
Using CATALINA_BASE: "C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE" 
Using CATALINA_HOME: "C:\servers\apache-tomcat-8.5.13" 
Using CATALINA_TMPDIR: "C:\servers\apache-tomcat-8.5.13\temp" 
Using JRE_HOME:  "C:\Program Files\Java\jdk1.8.0_112" 
Using CLASSPATH:  "C:\servers\apache-tomcat-8.5.13\bin\bootstrap.jar;C:\servers\apache-tomcat-8.5.13\bin\tomcat-juli.jar" 
11-Apr-2017 18:19:54.084 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:  Apache Tomcat/8.5.13 
11-Apr-2017 18:19:54.087 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:   Mar 27 2017 14:25:04 UTC 
11-Apr-2017 18:19:54.087 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:   8.5.13.0 
11-Apr-2017 18:19:54.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:    Windows 10 
11-Apr-2017 18:19:54.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:   10.0 
11-Apr-2017 18:19:54.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:   amd64 
11-Apr-2017 18:19:54.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:    C:\Program Files\Java\jdk1.8.0_112\jre 
11-Apr-2017 18:19:54.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:   1.8.0_112-b15 
11-Apr-2017 18:19:54.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:   Oracle Corporation 
11-Apr-2017 18:19:54.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:   C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE 
11-Apr-2017 18:19:54.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:   C:\servers\apache-tomcat-8.5.13 
11-Apr-2017 18:19:54.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE\conf\logging.properties 
11-Apr-2017 18:19:54.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
11-Apr-2017 18:19:54.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 
11-Apr-2017 18:19:54.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 
11-Apr-2017 18:19:54.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 
11-Apr-2017 18:19:54.091 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\servers\apache-tomcat-8.5.13 
11-Apr-2017 18:19:54.092 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\servers\apache-tomcat-8.5.13\temp 
11-Apr-2017 18:19:54.093 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2. 
11-Apr-2017 18:19:54.093 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 
11-Apr-2017 18:19:54.093 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 
11-Apr-2017 18:19:55.187 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2k 26 Jan 2017) 
11-Apr-2017 18:19:55.560 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"] 
11-Apr-2017 18:19:55.691 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 
11-Apr-2017 18:19:55.745 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"] 
11-Apr-2017 18:19:55.763 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read 
11-Apr-2017 18:19:55.802 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2418 ms 
11-Apr-2017 18:19:55.982 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina 
11-Apr-2017 18:19:55.983 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.13 
11-Apr-2017 18:19:56.185 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"] 
11-Apr-2017 18:19:56.250 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"] 
11-Apr-2017 18:19:56.382 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 578 ms 
[2017-04-11 06:19:56,404] Artifact TestJEE:war exploded: Artifact is being deployed, please wait... 
Connected to server 
[2017-04-11 06:19:56,493] Artifact TestJEE:war exploded: Error during artifact deployment. See server log for details. 
11-Apr-2017 18:20:06.205 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE\conf\Catalina\localhost\ROOT.xml 
11-Apr-2017 18:20:06.968 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor C:\Users\wojci\.IntelliJIdea2016.3\system\tomcat\Tomcat_8_5_13_TestJEE\conf\Catalina\localhost\ROOT.xml has finished in 762 ms 
11-Apr-2017 18:20:06.973 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\servers\apache-tomcat-8.5.13\webapps\manager 
11-Apr-2017 18:20:07.084 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\servers\apache-tomcat-8.5.13\webapps\manager has finished in 112 ms 
Disconnected from server 

當我嘗試連接到「本地主機:8080」我得到一個有關連接被拒絕,並在日誌消息「從服務器斷開」消息。 日誌中沒有任何用處(沒有警告/錯誤)。 這個問題出現在我的每個JEE應用程序中。

正如我所說的從這裏嘗試了很多解決方案除了更改%JAVA_OPTS%env var的值之外,因爲我在Tomcat目錄和Catalina.bat中的任何位置沒有'setenv.bat'文件,這個變量似乎正確設置。
我對這種技術很陌生,我有點害怕開始調整我不知道的東西。

什麼可能導致此問題?什麼是可能的解決方案?

+1

請參閱https://youtrack.jetbrains.com/issue/IDEA-171174。 – CrazyCoder

+0

上帝感謝你!它馬上工作。我一直在爲它奮鬥了大約10個小時,2個晚上,試圖弄清楚我在哪弄亂了。幾個小時,我向上帝發誓我會放棄編程好(是的,只是開玩笑)。再次感謝@CrazyCoder! –

回答

7

IntelliJ IDEA的最新Tomcat版本似乎存在部署問題。我們有與連接,你可以用它來解決該問題的補丁文件開放的錯誤:

  • IDEA-171174 Tomcat的9.0.0.M19:未能部署簡單的WAR神器

你可以找到IntelliJ IDEA Tomcat插件的patched jar,用它代替<IDEA_HOME>/plugins/Tomcat/lib/tomcatIntegration.jar

原來的問題是由這個Tomcat錯誤造成的:

這個bug在下面的Tomcat版本解決了部署/取消部署war文件:

  • 8.5.14及更高版本
  • 9.0.0.20及更高版本

建議您等待/安裝固定的Tomcat版本或恢復到不受bug(5.8.12和9.0.0.M18)影響的版本,因爲IntelliJ IDEA的解決方法使用一些骯髒的黑客來使它與Tomcat 5.8.13和9.0.0.M19一起工作,這受到Bug 60949(破壞的JMX)的影響。

+0

在相關說明中,返回到8.5.12/9.0.0.M18後,出現「找不到catalina.jar」錯誤。我已經加倍檢查了我的tomcat下載並且沒有包含.jars的版本。這是怎麼回事? – herrmartell

+2

@herrmartell [apache-tomcat-8.5.12。(http://archive.apache.org/dist/tomcat/tomcat-8/v8.5.12/bin/apache-tomcat-8.5.12.zip)[有所有的罐子](http:// i。 imgur.com/NWPoDiB.png)。 – CrazyCoder

+0

非常感謝! – herrmartell

相關問題