cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: [2.2] Runtime deployment
Date Sat, 04 Nov 2006 11:58:58 GMT
Giacomo Pati wrote:
> Class org.apache.cocoon.maven.deployer.monolithic.DevelopmentBlock has
> no such attribute: sitemapAdditionsConfPath in template context
> [anonymous anonymous]
> java.lang.NoSuchFieldException: sitemapAdditionsConfPath
>         at java.lang.Class.getField(Class.java:1507)
>         at
> org.antlr.stringtemplate.language.ASTExpr.getObjectProperty(ASTExpr.java:328)
> ...
>         at
> org.apache.cocoon.maven.deployer.monolithic.MonolithicCocoonDeployer.writeStringTemplateToFile(MonolithicCocoonDeployer.java:216)
> 
> I havn't see the remove of the isSitemapAdditionsConfPath method from
> the DevelopmentBlock class. If I remove the
> 
> 
> $if(devblock.sitemapAdditionsConfPath)$
>   <include dir="$devblock.sitemapAdditionsConfPath$" pattern="*.xmap"/>
> $endif$
> 
> part from the
> tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/resources/org/apache/cocoon/maven/deployer/monolithic/WEB-INF/cocoon/cocoon.xconf
> (dunno whether this is still needed but I guess not anymore).

you're right - this is not needed. I have removed the entry but the 
deployer still needs fixing - I see it tries to load the config files 
the old way from src/main/resources/META-INF/cocoon:

>         springConfPath = checkDir(new File(localPath, RESOURCES_DIR + "META-INF/cocoon/spring"));
>         xconfConfPath = checkDir(new File(localPath, RESOURCES_DIR + "META-INF/cocoon/avalon"));
>         xPatchPath = checkDir(new File(localPath, RESOURCES_DIR + "META-INF/xpatch"));
>         targetClassesPath = checkDir(new File(localPath, "target/classes"));
>         cobInfPath = checkDir(new File(localPath, RESOURCES_DIR + "COB-INF"));
>         propsPath = checkDir(new File(localPath, RESOURCES_DIR + "META-INF/cocoon/properties"));

and this will definitely lead to loading those files twice (once from 
this dir, second one from classpath).

I will try to fix this today (already rushing the clock). Stay tuned :)

> 2. running
> 
> Now jetty6:run failes with
> 
> Embedded error: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@157bf4c
> Directory 'context://WEB-INF/cocoon/avalon' does not exist
> (jar:file:/home/giacomo/svn/projects/project/target/project-0.1.0-SNAPSHOT/WEB-INF/cocoon/lib/cocoon-core-2.2.0-M2-SNAPSHOT.jar!/org/apache/cocoon/cocoon.xconf:41:69).
> 
> Seems the avalon directory is required (we have to make it optional!)
Not waiting for answers to my post I have removed the support for 
WEB-INF/cocoon/* completely. It's not needed anymore. See 
http://svn.apache.org/viewvc?view=rev&rev=471167 for changes.

If there's anyone who needs the support for WEB-INF/cocoon (though I 
clearly see no reason because one can use 
WEB-INF/classes/META-INF/cocoon instead) then the change is in one 
commit - easily reversible.

> 
> After mkdir target/project-0.1.0-SNAPSHOT/WEB-INF/cocoon/avalon I get
> 
> Embedded error: Unable to initialize Avalon component with role
> org.apache.cocoon.Processor; nested exception is
> org.apache.avalon.framework.configuration.ConfigurationException: Cannot
> resolve sitemap.xmap
> Component with 'org.apache.excalibur.source.SourceFactory/*' is not
> defined in this service manager. (Key='AvalonServiceManager')

<.../>

> I actually have no clue sincce when a lookup with a .../* has been
> allowed. Anybody esle (Carsten?)
This one does not happen for me. I have tested two of my current 
projects - both start up fine.

-- 
Leszek Gawron                                    CTO at MobileBox Ltd.


Mime
View raw message