codedata / JavaTutorial

Learn Java in 06:00:00
http://www.codedata.com.tw
33 stars 28 forks source link

exercies 10 無法 tomcatRunWar #2

Open FreedomKnight opened 9 years ago

FreedomKnight commented 9 years ago

我用 fedora 22 會得到以下訊息

:compileJava
:processResources UP-TO-DATE
:classes
:war
:tomcatRunWar FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tomcatRunWar'.
> An error occurred starting the Tomcat server.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
yewchen commented 8 years ago

我照著電子書上的第47頁做到這邊,出現了跟你一樣的問題

請問有什麼建議可以提供我們去嘗試修復這個問題嗎? 已經在這個步驟卡好久了,電子書剩下的部分幾乎都沒辦法繼續進行...

:compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :war UP-TO-DATE :tomcatRunWar FAILED

FAILURE: Build failed with an exception.

yewchen commented 8 years ago

提供 -info的訊息

:tomcatRunWar (Thread[main,5,main] - start :tomcatRunWar Executing task ':tomcatRunWar' due to: Task has not declared any outputs. Configuring Tomcat for root project 'BasicWeb' HTTP protocol handler classname = org.apache.coyote.http11.Http11Protocol HTTPS protocol handler classname = org.apache.coyote.http11.Http11Protocol Web application WAR = C:\cygwin\home\yewchen\BasicWeb\build\libs\BasicWeb.war Resolved Tomcat 7x server implementation in classpath Initializing ProtocolHandler ["http-bio-8080"] Initializing ProtocolHandler ["ajp-bio-8009"] Starting service Tomcat Starting Servlet Engine: Apache Tomcat/7.0.11 No global web.xml found Tomcat server exiting. :tomcatRunWar FAILED :tomcatRunWar (Thread[main,5,main]) - complete

FAILURE: Build failed with an exception.

BUILD FAILED

git03394538 commented 8 years ago

@FreedomKnight @yewchen 這是一個Tomcat的bug, upgrade build.gradle裡面的Tomcat版本到7.0.30 之後的版本就可以了