當我嘗試將我的Spring應用程序部署到Tomcat時,它給我提供了錯誤(localhost- {date} .log),說我缺少commons-pool- {version} .jar 。Tomcat錯誤,原因JAR未包含在構建中
但是,源代碼是STABLE版本的一部分。我正在使用maven構建,並且我成功地構建和部署了此項目(事實上,今天早些時候)。所以一定要在本地改變。我將commons-pool- {version} .jar添加到了我的CLASSPATH中,但這不起作用。我已經通過重新結賬確保代碼沒有改變。
我的本地日誌文件說
Sep 15, 2010 11:15:39 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
...
java.lang.NoClassDefFoundError: org/apache/commons/pool/impl/GenericObjectPool
我的卡塔利娜日誌文件說
SEVERE: Error listenerStart
Sep 15, 2010 11:15:39 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/app] startup failed due to previous errors
是否有我俯瞰任何額外的設置嗎?它還能是什麼?我很難過。
另請檢查所請求的類文件是否在您正在使用的jar文件中。 – Koekiebox 2010-09-30 12:50:38