java.lang.UnsupportedOperationExceptionat javax.faces.application.Application.getELResolver(Application.java:443)

时间:2013-06-12 08:13:30

标签: jetty jsf-1.2

我正在将网络应用程序从jboss 4迁移到jetty 8.x版本。虽然Jetty服务器启动,但当我尝试访问任何jsp页面时,我看到了这个问题。访问jsp页面时由jetty服务器抛出的日志

java.lang.UnsupportedOperationException
  at javax.faces.application.Application.getELResolver(Application.java:443)
  at com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:172)
  at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:900)
  at com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:370)
  at com.anm.jsf.JsfTilesViewHandlerImpl.createView(JsfTilesViewHandlerImpl.java:271)
  at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:132)
  at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:82)
  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1448)
  at com.homeshop18.scazle.filter.HeaderFilter.doFilter(HeaderFilter.java:66)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1428)
  at org.apache.myfaces.component.html.util.MultipartFilter.doFilter(MultipartFilter.java:105)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
  at com.anm.security.SecurityFilter.doFilter(SecurityFilter.java:186)
  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
  at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
  at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
  at org.eclipse.jetty.server.Server.handle(Server.java:368)
  at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488)
  at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932)
  at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994)
  at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
  at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
  at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
  at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
  at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  at java.lang.Thread.run(Thread.java:662)

仅供参考,我已经jstljsp-apijsf-apijsf-impl作为依赖项,而jetty服务器为mvn-jetty plugin

1 个答案:

答案 0 :(得分:0)

jsf(org.apache和javax)上存在jar冲突,导致此错误。纠正这个jar冲突后,我可以访问jsp页面。

谢谢你和我一起玩!