Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 31502 invoked from network); 27 Feb 2008 13:58:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Feb 2008 13:58:10 -0000 Received: (qmail 90426 invoked by uid 500); 27 Feb 2008 13:58:01 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 90383 invoked by uid 500); 27 Feb 2008 13:58:01 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 90372 invoked by uid 99); 27 Feb 2008 13:58:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 05:58:01 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [194.152.182.1] (HELO mgate.ops.co.at) (194.152.182.1) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Feb 2008 13:57:28 +0000 Received: from smtp.ops.co.at (smtp.int.ops.co.at [172.27.0.4]) by mgate.ops.co.at (OPS Mail Gateway - authorized use only - NO UCE/UBE C=AT L=VIE) with ESMTP id A1974AFE3A for ; Wed, 27 Feb 2008 14:57:34 +0100 (CET) Received: by smtp.ops.co.at (Postfix, from userid 65534) id A9D056E023F; Wed, 27 Feb 2008 14:57:33 +0100 (CET) Received: from [172.27.1.104] (lints2.int.ops.co.at [172.27.1.104]) by smtp.ops.co.at (Postfix) with ESMTP id 8E1036E0234 for ; Wed, 27 Feb 2008 14:57:32 +0100 (CET) Message-ID: <47C56C4D.4020808@chello.at> Date: Wed, 27 Feb 2008 14:57:33 +0100 From: "simon.kitching@chello.at" User-Agent: Thunderbird 2.0.0.0 (X11/20070418) MIME-Version: 1.0 To: MyFaces Discussion Subject: Re: FacesContext.getCurrentInstance() provoking StackTraceException on initialization References: <1a681ff20802270528p1d3cc308p4191909cd9a3511a@mail.gmail.com> In-Reply-To: <1a681ff20802270528p1d3cc308p4191909cd9a3511a@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on smtp.ops.co.at X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=-3.7 required=7.0 tests=AWL,BAYES_00,IMPRONONCABLE_1, RATWR10_MESSID,SARE_TOCC_USER,SMILEY autolearn=no version=2.64 Hi Bruno, Bruno Aranda schrieb: > Hi, > > I have a webapp with the combination > > myfaces core 1.2.3-SNAPSHOT > trinidad 1.2.7-SNAPSHOT > orchestra-core 1.1-SNAPSHOT > and others (Facelets, Spring...) > > This used to work a weeks ago, but today I was trying to start it > again and on initialization this exception happens: > > 2008-02-27 13:23:37,991 [btpool0-1] DEBUG (JsfFrameworkAdapter,57) - > Beginning request > 2008-02-27 13:23:37,992 [btpool0-1] DEBUG > (OrchestraFacesContextFactory$1,114) - Running inithandler of type > java.util.LinkedList$ListItr > 2008-02-27 13:23:37,997 [btpool0-1] DEBUG > (OrchestraFacesContextFactory$1,114) - Running inithandler of type > java.util.LinkedList$ListItr > 2008-02-27 13:23:38,365 [btpool0-1] DEBUG > (OrchestraFacesContextFactory$1,129) - Running release > 2008-02-27 13:23:38,368 [btpool0-1] DEBUG (JsfFrameworkAdapter,69) - > Ending request > 2008-02-27 13:23:38.260::WARN: Error for > /intact/intact-search-webapp/search.xhtml > java.lang.StackOverflowError > at > javax.faces.context.FacesContext.getCurrentInstance(FacesContext.java:98) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:35) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > at javax.faces.context.FacesContext.getELContext(FacesContext.java:40) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.getELContext(FacesContextFactoryImpl.java:238) > > Tried to switch Trinidad and myfaces to stable or previous versions to > no avail, so I guess this is related to the FacesContext creation by > Orchestra. Any recent development that might cause this? Any > configuration I have to add? > > I am a bit rusty with orchestra lately, so hopefully I can be up to > date for the JSFDays! :) I don't *think* this is Orchestra. That last log message is ok, it just means that orchestra is cleaning up: public void endRequest() { log.debug("Ending request"); FrameworkAdapter.setCurrentInstance(null); } Orchestra does implement its own FacesContext object, and some of the related code has changed in the last few weeks. However that object should never be returned from FacesContext.getCurrentInstance() OrchestraFacesContextFactory calls: log.debug("getFacesContext: creating custom instance"); return new FacesContextWrapper(facesContext, false) { ... } with the "false" parameter here meaning that the object is *not* registered as the default FacesContext object; calls to FacesContext.getCurrentInstance still return the original. With that stack trace there isn't much info to go on. The obvious culprit is Trinidad, but if reverting to an earlier release does not solve the issue then I don't know what might be going on. BTW, I look forward to meeting you at JSFDays! Cheers, Simon