myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: [Trinidad+Orchestra] My apps using trinidad broken in 1.2.7 and latest orchestra
Date Mon, 17 Mar 2008 12:46:57 GMT schrieb:
> Hi Bruno,
> Bruno Aranda schrieb:
>> Hi,
>> I just started the app I was working on after the great JSFDays and
>> now I get this exception. It was using trinidad 1.2.7-SNAPSHOT, but
>> the same happens with the 1.2.7 version - so maybe it is a bug in
>> orchestra as well. It seems to be using the default ExternalContext,
>> which throws an UnsupportedOperationException as defined in the JSF
>> 1.2 spec.
>> java.lang.UnsupportedOperationException at
>> javax.faces.context.ExternalContext.setRequest(
>> at
>> org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl._isSetRequestBugPresent(
>> at
>> org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(
>> at
>> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.(
>> at
>> org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl.getFacesContext(
>> at
>> javax.faces.webapp.FacesServlet.prepareFacesContext(
>> at javax.faces.webapp.FacesServlet.service( at
>> org.mortbay.jetty.servlet.ServletHolder.handle(
>> at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>> at
>> at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>> at
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(
>> at
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(
>> at
>> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
> href=I can't initially think how Orchestra could be involved here. Orchestra
> does not mess with the ExternalContext at all, eg doesn't create a
> decorator for it. It does wrap the FacesContext, but no FacesContext
> instances appear to be involved in this callstack either.
> I did make a change to to fix the
> FacesContext.getELContext method, but that isn't anywhere in this
> callstack, so that is unlikely to be the cause of the problem.
> Maybe the trinidad people have some idea what is going on here..

Umm..I take that back.

Mario has pointed out that Martin Marinschek committed a patch to
Orchestra core *after* the 1.1 release, which adds an
ExternalContextWrapper. And this is almost certainly the cause of the

So if you use the official 1.1 release, the problem will probably go away.

The root problem is again the broken delegation model of the JSF
specification. The ExternalContextWrapper decorates a JSF1.1
ExternalContext class by delegating to a "wrapped" instance. But the
JSF1.2 spec adds a new method, so invocations of that end up in the
default ExternalContext implementation not the wrapper. And therefore
does not properly delegate.

This can definitely be fixed by using reflection to implement this
additional 1.2-specific method, but as I mentioned above, just using the
core 1.1 release should also avoid this problem for the moment.


View raw message