任何幫助將不勝感激。我正在運行一個Web應用程序,這取決於我的工作空間中的另外兩個項目。這兩個項目進一步依賴於我工作區中的其他3個項目。工作空間內的任何項目都沒有錯誤。運行在Tomcat Web應用程序產生以下錯誤:Eclipse - Web應用程序Tomcat部署borked
java.lang.NoClassDefFoundError:COM /遠程/其它/ DefaultApplicationModule
這取決於項目的第一級中的一類。直到最近,所有的工作都很好。這顯然是某種類路徑問題?有關如何在Eclipse元數據中找到這些內容並解決此問題的任何建議?
更多細節:
控制檯:
*******************************************************************
*** WARNING: Apache MyFaces-2 is running in DEVELOPMENT mode. ***
*** ^^^^^^^^^^^ ***
*** Do NOT deploy to your live server(s) without changing this. ***
*** See Application#getProjectStage() for more information. ***
*******************************************************************
Feb 13, 2014 1:41:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Feb 13, 2014 1:41:18 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/CRGen] startup failed due to previous errors
Feb 13, 2014 1:41:18 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class za.co.huge.processor.CRToolContextListener
java.lang.NoClassDefFoundError: com/tele/misc/DefaultApplicationModule
at za.co.huge.processor.ReportProcessor.<init>(ReportProcessor.java:30)
at za.co.huge.processor.ReportProcessor.getInstance(ReportProcessor.java:41)
at za.co.huge.processor.CRToolContextListener.contextDestroyed(CRToolContextListener.java:22)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4927)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5573)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Feb 13, 2014 1:41:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Feb 13, 2014 1:41:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Feb 13, 2014 1:41:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2547 ms
這一切都源於我的servlet上下文監聽器:
<!-- CRTool Context listener starts report processing Engine -->
<listener>
<listener-class>za.co.huge.processor.CRToolContextListener</listener-class>
</listener>
哪些失敗時初始化從依賴項目吉斯模塊:
/* singleton design pattern - so only one service thread can be running */
private ReportProcessor(final long sleepTime){
serviceThread = new ServiceThread(sleepTime);
thread = new Thread(serviceThread);
thread.setPriority(Thread.MIN_PRIORITY);
final Injector injector = Guice.createInjector(new DefaultApplicationModule());
// final Injector injector = Guice.createInjector(new CommissionsModule(), new DefaultApplicationModule());
// ci = injector.getInstance(CommissionsImpl.class);
}
您是否在Eclipse中嘗試了Tomcat的'Clean'選項?你有沒有嘗試重新啓動Tomcat? – mthmulders
是的!清理並重新運行很多次。 – Atheba
你可以把完整的堆棧跟蹤到你的問題嗎?有幾個根本原因出現在我的腦海中,但很難猜測哪一個可能導致您的問題。 – mthmulders