You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2009/12/10 23:28:18 UTC

[jira] Resolved: (MYFACES-1881) UIViewRoot setId called on UIComponentClassicTagBase throws UnsupportedOperationException

     [ https://issues.apache.org/jira/browse/MYFACES-1881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-1881.
-------------------------------------

    Resolution: Invalid
      Assignee: Leonardo Uribe

Testing some stuff, it was notice that f:view jsp tag set an generated id for UIViewRoot, so throw an UnsupportedOperationException does not have sense. Also, on jsf 2.0 this is called to make partial state saving works correctly.

> UIViewRoot setId called on UIComponentClassicTagBase throws UnsupportedOperationException
> -----------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1881
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1881
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.4-SNAPSHOT
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>            Priority: Critical
>
> The latest myfaces core 1.2.4-SNAPSHOT throws this exception, because setId was disabled.
> This is because javax.faces.webapp.UIComponentClassicTagBase try to set its id:
> We have two options here:
> 1. do not set its id on UIComponentClassicTagBase
> 2. call super.setId and super.getId properly on UIViewRoot.
> I don't know if there is side effects (a component without id? what happens when its state is saved and restored?).
> Suggestions?
> This is the exception
> SEVERE: An exception occurred
> javax.faces.FacesException: java.lang.UnsupportedOperationException
>         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
> h(ServletExternalContextImpl.java:344)
>         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspVi
> ewHandlerImpl.java:481)
>         at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspV
> iewHandlerImpl.java:334)
>         at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderRes
> ponseExecutor.java:41)
>         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
> 140)
>         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
> )
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
> Handler.java:1093)
>         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(Extensions
> Filter.java:235)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(Servlet
> Handler.java:1084)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
> 60)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
> a:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
> 81)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
> 26)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHand
> lerCollection.java:206)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.
> java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:1
> 52)
>         at org.mortbay.jetty.Server.handle(Server.java:324)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:50
> 5)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpCo
> nnection.java:828)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
>         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.ja
> va:395)
>         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool
> .java:450)
> Caused by: org.apache.jasper.JasperException: java.lang.UnsupportedOperationExce
> ption
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:402)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:4
> 70)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487
> )
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:3
> 62)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.jav
> a:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:1
> 81)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:7
> 26)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:285)
>         at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>         at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
> h(ServletExternalContextImpl.java:338)
>         ... 25 more
> Caused by: java.lang.UnsupportedOperationException
>         at javax.faces.component.UIViewRoot.setId(UIViewRoot.java:458)
>         at javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponen
> tClassicTagBase.java:1029)
>         at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentCl
> assicTagBase.java:431)
>         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:103)
>         at org.apache.jsp.testValidatorHidden_jsp._jspx_meth_f_view_0(org.apache
> .jsp.testValidatorHidden_jsp:103)
>         at org.apache.jsp.testValidatorHidden_jsp._jspService(org.apache.jsp.tes
> tValidatorHidden_jsp:75)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:373)
>         ... 37 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.