Return-Path: Delivered-To: apmail-struts-commits-archive@minotaur.apache.org Received: (qmail 97726 invoked from network); 21 Sep 2009 15:22:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Sep 2009 15:22:41 -0000 Received: (qmail 60500 invoked by uid 500); 21 Sep 2009 15:22:41 -0000 Delivered-To: apmail-struts-commits-archive@struts.apache.org Received: (qmail 60457 invoked by uid 500); 21 Sep 2009 15:22:41 -0000 Mailing-List: contact commits-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list commits@struts.apache.org Received: (qmail 60448 invoked by uid 99); 21 Sep 2009 15:22:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:22:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Sep 2009 15:22:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A51BC23888CC; Mon, 21 Sep 2009 15:22:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r817287 - /struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java Date: Mon, 21 Sep 2009 15:22:10 -0000 To: commits@struts.apache.org From: wesw@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090921152210.A51BC23888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wesw Date: Mon Sep 21 15:22:08 2009 New Revision: 817287 URL: http://svn.apache.org/viewvc?rev=817287&view=rev Log: ww-3230 Rich, you're the man, thanks for the patch! Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java?rev=817287&r1=817286&r2=817287&view=diff ============================================================================== --- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java (original) +++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java Mon Sep 21 15:22:08 2009 @@ -76,7 +76,15 @@ boolean useClassCache = "true".equals(useClassCacheStr); LOG.info("Initializing Struts-Spring integration..."); - ApplicationContext appContext = (ApplicationContext) servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); + Object rootWebApplicationContext = servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE); + + if(rootWebApplicationContext instanceof RuntimeException){ + RuntimeException runtimeException = (RuntimeException)rootWebApplicationContext; + LOG.fatal(runtimeException.getMessage()); + return; + } + + ApplicationContext appContext = (ApplicationContext) rootWebApplicationContext; if (appContext == null) { // uh oh! looks like the lifecycle listener wasn't installed. Let's inform the user String message = "********** FATAL ERROR STARTING UP STRUTS-SPRING INTEGRATION **********\n" +