From: Guy <guy...@gm...> - 2006-11-22 13:49:21
|
Hi, in the past we used TomCat as the application server but now we want to use Jetty because we they all run in the same Java VM... anyway, when we use the following line to add the webapplication: WebAppContext.addWebApplications(server,"/opt/ourApplication", "org/mortbay/jetty/webapp/webdefault.xml", true, false); We get the following stacktrace during startup: java.lang.ClassCastException: org.mortbay.jetty.handler.ContextHandler$Context at org.mortbay.jetty.servlet.DefaultServlet.init(DefaultServlet.java:125) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:400) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:254) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:569) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1133) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:420) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:457) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:156) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:119) at org.mortbay.jetty.Server.doStart(Server.java:210) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:38) at org.mortbay.jetty.example.OneServletContext.main(OneServletContext.java:81) When we remove the WEB-INF folder it works fine. The ClassCastException is caused by the presence of jetty-6.0.1.jar in the WEB-INF/lib directory. Is this a bug? Thanx Guy |