thanx for the detailed explanation that was really helpful........keep up the good work

On 12/10/05, Bruno Aranda < [EMAIL PROTECTED]> wrote:
The method clear() is *optional* in the java.util.Map contract, so the
current behaviour is spec compliant. The TCK tests (those that MyFaces
has to pass to be certified by sun) require this exception to be
thrown. So this is why the method is throwing such an exception. The
JSF 1.2 expert group has been encoraged to make the implementation of
the clear() method and others (e.g. putAll()) required, so maybe this
behaviour will be backported to the JSF 1.1 implementation of MyFaces
in the future.
FYI, the RI implementation has the same behaviour, so you should not
use this method now...

Regards,

Bruno

2005/12/10, Khurram Ahmed <[EMAIL PROTECTED] >:
> MyFaces version 1.1.1
>  Nightly build = 6-Dec-2005
>  Application Server = Oracle Application Server 10.1.2.0.2
>  Servlet Container = OC4J
>  J2EE version = 1.3
>
>
>
>  I am getting the following error while running my application.
>
>
> javax.faces.FacesException: Error calling action method of
> component with id _id0:navLogout
>     at
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
>     at
> javax.faces.component.UICommand.broadcast(UICommand.java:106)
>
>     at
> org.apache.myfaces.custom.navigation.HtmlCommandNavigation.broadcast (HtmlCommandNavigation.java:225)
>
>     at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
>     at
> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java :132)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues
> (LifecycleImpl.java:219)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
> :71)
>     at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g
> (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(
> ResourceFilterChain.java:65)
>     at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter
> (ExtensionsFilter.java:123)
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g (
> 10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
>     at  com.evermind[Oracle Application Server Containers
> for J2EE 10g
> (10.1.2.0.2 )].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
>
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g
> (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest( HttpRequestHandler.java:830)
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g
> (10.1.2.0.2)].server.http.AJPRequestHandler.run(
> AJPRequestHandler.java:224)
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g (
> 10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
>     at com.evermind[Oracle Application Server Containers
> for J2EE 10g (
> 10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
>
>     at java.lang.Thread.run(Thread.java:534)
> Caused by: javax.faces.el.EvaluationException : Exception
> while invoking _expression_ #{user.logOut}
>     at org.apache.myfaces.el.MethodBindingImpl.invoke
> (MethodBindingImpl.java:153)
>     at
> org.apache.myfaces.application.ActionListenerImpl.processAction
> (ActionListenerImpl.java:63)
>     ... 16 more
> Caused by: java.lang.UnsupportedOperationException
>
>     at
> org.apache.myfaces.context.servlet.SessionMap.clear(SessionMap.java:84)
>     at  org.myorg.jsf.UserBean.logOut(UserBean.java:68)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native
> Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:324)
>
>     at
> org.apache.myfaces.el.MethodBindingImpl.invoke (MethodBindingImpl.java:129)
>
>
>  The same piece of code causes the following error on tomcat 5.0.27 though
> it isnt logged on the console.
>
>  2005-12-10 13:06:56 StandardWrapperValve[Faces Servlet]: Servlet.service()
> for servlet Faces Servlet threw exception
>  javax.faces.FacesException: Error calling action method of component with
> id _id0:navLogout
>      at
> org.apache.myfaces.application.ActionListenerImpl.processAction (ActionListenerImpl.java:74)
>      at
> javax.faces.component.UICommand.broadcast(UICommand.java:106)
>      at
> org.apache.myfaces.custom.navigation.HtmlCommandNavigation.broadcast(HtmlCommandNavigation.java :225)
>      at
> javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
>      at
> javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:132)
>      at
> org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues (LifecycleImpl.java:219)
>      at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71)
>      at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
>      at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
>      at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>      at
> org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:123)
>      at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java :186)
>      at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>      at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java :214)
>      at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>      at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>      at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>      at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>      at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>      at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>      at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>      at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>      at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>      at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>      at
> org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
>      at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>      at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java :104)
>      at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>      at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>      at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>      at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>      at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection (Http11Protocol.java:705)
>      at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>      at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java :683)
>      at java.lang.Thread.run(Thread.java:534)
>  Caused by: javax.faces.el.EvaluationException: Exception
> while invoking _expression_ #{user.logOut}
>      at
> org.apache.myfaces.el.MethodBindingImpl.invoke (MethodBindingImpl.java:153)
>      at
> org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
>      ... 34 more
>  Caused by: java.lang.UnsupportedOperationException
>      at
> org.apache.myfaces.context.servlet.SessionMap.clear(SessionMap.java:84)
>      at org.imf.jsf.UserBean.logOut(UserBean.java:68)
>      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>      at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>      at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java :25)
>      at java.lang.reflect.Method.invoke(Method.java:324)
>      at
> org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
>      ... 35 more
>
>
>
>  The offending piece of code is
> FacesContext.getCurrentInstance().getExternalContext().getSessionMap().clear();
>
>  Can anyone help me work out what is going wrong?
>
>

Reply via email to