Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].

tomcat啓動出現如上錯誤,但是並不影響程序運行,不過看着也煩。

解決方案:

server.xml裏面剛開始是有相關配置的,本來以爲只是樣例就刪除了,其實是有用的。

<Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
重新把上面的代碼放到<GlobalNamingResources>標籤裏面,

注意不要放到context裏面,否則又報錯說not bound in the context。

重啓服務器,解決問題。

發佈了122 篇原創文章 · 獲贊 15 · 訪問量 19萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章