我正在使用Birt插件運行Eclipse應用程序。除預覽外,每件事情都很好。點擊預覽導致以下異常(帶任何報告):爲什麼我在Eclipse-Indigo-Birt-Viewer上得到這個異常?
我認爲原因可能在於使用不同類型的「Servlet」。我該怎麼做才能調試/解決這個問題?
java.lang.ClassCastException: org.eclipse.birt.report.servlet.ViewerServlet cannot be cast to javax.servlet.Servlet
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.initializeDelegate(ServletManager.java:194)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:179)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:924)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
你可以添加拋出'ClassCastException'的代碼嗎?會有幫助。 – araknoid
這就是問題所在,我的任何代碼都不會拋出異常 – justSaid
您是否檢查過您是否將'ViewServlet'上傳到'Servlet'?在這篇文章中給一個檢查的答案:[Classloader問題](http://stackoverflow.com/questions/3132186/eclipse-galileo-birt?answertab=active#tab-top) – araknoid