cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour <mansou...@yahoo.com>
Subject Re: javax.servlet.ServletException: No block for /myBlock/index.html
Date Thu, 22 Nov 2007 11:38:21 GMT
I did not understand you questions, but here's the content's of 
Bloclk/COB-INF/sitemap.xmap. I have used the same file for testing 
Cocoon 2.1 application.

<?xml version="1.0" encoding="iso-8859-1"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
    <map:components>
        <map:generators default="file">
            <map:generator label="content"
                logger="sitemap.generator.file" name="file"
                pool-max="${file-generator.pool-max}"
                src="org.apache.cocoon.generation.FileGenerator" />
        </map:generators>

        <map:transformers default="xslt">
            <map:transformer logger="sitemap.transformer.xslt"
                name="xslt" pool-max="${xslt-transformer.pool-max}"
                src="org.apache.cocoon.transformation.TraxTransformer">
                <use-request-parameters>false</use-request-parameters>
                <use-session-parameters>false</use-session-parameters>
                <use-cookie-parameters>false</use-cookie-parameters>
                <xslt-processor-role>xalan</xslt-processor-role>
                <check-includes>true</check-includes>
            </map:transformer>
            <map:transformer logger="sitemap.transformer.xalan"
                name="xalan" pool-max="${xalan-transformer.pool-max}"
                src="org.apache.cocoon.transformation.TraxTransformer">
                <use-request-parameters>false</use-request-parameters>
                <use-session-parameters>false</use-session-parameters>
                <use-cookie-parameters>false</use-cookie-parameters>
                <xslt-processor-role>xalan</xslt-processor-role>
                <check-includes>true</check-includes>
            </map:transformer>
        </map:transformers>
       
        <map:serializers default="html">
            <map:serializer logger="sitemap.serializer.html"
                mime-type="text/html" name="html"
                pool-max="${html-serializer.pool-max}"
                src="org.apache.cocoon.serialization.HTMLSerializer">
                <doctype-public>
                    -//W3C//DTD HTML 4.01 Transitional//EN
                </doctype-public>
                <doctype-system>
                    http://www.w3.org/TR/html4/loose.dtd
                </doctype-system>
            </map:serializer>
        </map:serializers>
        <map:matchers default="wildcard">
            <map:matcher logger="sitemap.matcher.wildcard"
                name="wildcard" 
src="org.apache.cocoon.matching.WildcardURIMatcher" />

            <map:matcher logger="sitemap.matcher.regexp" name="regexp"
                src="org.apache.cocoon.matching.RegexpURIMatcher" />
        </map:matchers>
       
        <map:pipes default="caching">
            <map:pipe name="caching"
                
src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"
                pool-max="${caching-pipeline.pool-max}">
            </map:pipe>
            <map:pipe name="noncaching"
                
src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"
                pool-max="${noncaching-pipeline.pool-max}">
            </map:pipe>
        </map:pipes>
       
    </map:components>
   
    <map:pipelines>
        <map:pipeline type="caching">
            <map:match pattern="*.html">
                <map:generate src="index.xml" />
                <map:transform src="doc2html.xsl" />
                <map:serialize type="html" />
            </map:match>
        </map:pipeline>
    </map:pipelines>
   
</map:sitemap>



Joerg Heinicke wrote:
> Is there any reason why we create a new BeanDefinitionStoreException 
> from a BeanDefinitionStoreException? Do we add more information? Is 
> there a reason for getting rid of the root cause?
>
> AbstractSettingsBeanFactoryPostProcessor:
>
> protected void processProperties(ConfigurableListableBeanFactory 
> beanFactoryToProcess,
>                                  Properties props)
> throws BeansException {
>     final BeanDefinitionVisitor visitor = new 
> CocoonSettingsResolvingBeanDefinitionVisitor(this.settings);
>     String[] beanNames = beanFactoryToProcess.getBeanDefinitionNames();
>     for (int i = 0; i < beanNames.length; i++) {
>         BeanDefinition bd = 
> beanFactoryToProcess.getBeanDefinition(beanNames[i]);
>         try {
>             visitor.visitBeanDefinition(bd);
>         } catch (BeanDefinitionStoreException ex) {
>             throw new 
> BeanDefinitionStoreException(bd.getResourceDescription(),
>                     beanNames[i], ex.getMessage());
>         }
>     }
> }
>
> And what can be the actual reason for the error. I grepped the code 
> base and did not find any reference to 'file-generator.pool-max'.
>
> Joerg
>
> On 22.11.2007 1:41 Uhr, Mansour wrote:
>> OK, I found it. It was something wrong with my sitemap.xmap. I am 
>> getting new exception now:
>>
>> *exception*
>>
>> javax.servlet.ServletException: Error registering bean with name 
>> 'org.apache.cocoon.generation.Generator/file' defined in null: Could 
>> not resolve placeholder 'file-generator.pool-max'
>>     
>> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:232) 
>>     
>> org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:64) 
>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>     
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:567)

>>     
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:544)

>>     
>> org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:230)

>>     
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)

>>     
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

>>     $Proxy5.service(Unknown Source)
>>     
>> org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:102)

>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>> *root cause*
>>
>> org.springframework.beans.factory.BeanDefinitionStoreException: Error 
>> registering bean with name 
>> 'org.apache.cocoon.generation.Generator/file' defined in null: Could 
>> not resolve placeholder 'file-generator.pool-max'
>>     
>> org.apache.cocoon.spring.configurator.impl.AbstractSettingsBeanFactoryPostProcessor.processProperties(AbstractSettingsBeanFactoryPostProcessor.java:288)

>>     
>> org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)

>>     
>> org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:467)

>>     
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)

>>     
>> org.apache.cocoon.core.container.spring.avalon.SitemapHelper.createContainer(SitemapHelper.java:317)

>>     
>> org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.build(SitemapLanguage.java:343)

>>     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>     
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>     
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>     java.lang.reflect.Method.invoke(Method.java:597)
>>     
>> org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)

>>     $Proxy7.build(Unknown Source)
>>     
>> org.apache.cocoon.components.treeprocessor.TreeProcessor.buildConcreteProcessor(TreeProcessor.java:417)

>>     
>> org.apache.cocoon.components.treeprocessor.TreeProcessor.setupConcreteProcessor(TreeProcessor.java:342)

>>     
>> org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:250)

>>     
>> org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:357) 
>>     
>> org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:171) 
>>     
>> org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:64) 
>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>     
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:567)

>>     
>> org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:544)

>>     
>> org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:230)

>>     
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)

>>     
>> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

>>     $Proxy5.service(Unknown Source)
>>     
>> org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:102)

>>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


Mime
View raw message