cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r651726 - /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java
Date Fri, 25 Apr 2008 22:39:59 GMT
Author: gkossakowski
Date: Fri Apr 25 15:39:59 2008
New Revision: 651726

URL: http://svn.apache.org/viewvc?rev=651726&view=rev
Log:
Added helpful exception message that explains what's wrong if people upgrade to latest trunk
and forget to modify their web.xml files.

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java?rev=651726&r1=651725&r2=651726&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/spring/BlockPathPropertyPlaceholderConfigurer.java
Fri Apr 25 15:39:59 2008
@@ -46,6 +46,10 @@
     protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess,
Properties props)
                     throws BeansException {
         Map blockContexts = (Map) this.servletContext.getAttribute(BlockDeploymentServletContextListener.BLOCK_CONTEXT_MAP);
+        if (blockContexts == null) {
+            throw new RuntimeException("Failed to obtain blockContexts Map. The most probable
cause is that " +
+            		"BlockDeploymentServletContextListener has not been executed. Check your web.xml
or upgrade your Cocoon Maven plug-in.");
+        }
         final BeanDefinitionVisitor visitor = new ResolvingBeanDefinitionVisitor(blockContexts);
         String[] beanNames = beanFactoryToProcess.getBeanDefinitionNames();
         for (int i = 0; i < beanNames.length; i++) {



Mime
View raw message