cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [2.2] Runtime deployment
Date Sat, 04 Nov 2006 10:14:37 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Carsten Ziegeler wrote:
> With the help from Leszek we now have a Cocoon version in trunk which
> does not need any deployment plugin. This means you can just drop the
> jar files into WEB-INF/lib and are done! So it doesn't matter if you're
> using Maven, Ant or some other strange tool :)
> All you need is the main Spring applicationContext.xml with our two
> elements for setting up Cocoon and the Avalon bridge.
> 
> So, what has changed?
> We now load all configuration files directly from within the jar files,
> so all files in META-INF/cocoon/avalon, META-INF/cocoon/spring and
> META-INF/cocoon/properties are applied at runtime without the need to
> extract these files.
> 
> Currently on startup of Cocoon, all COB-INF directories are extracted to
> {webapp-directory}/blocks/{block-name}.
> 
> What is missing?
> 1. With the changes from above, Cocoon does not run as an unexpanded war
> file anymore. So I think we should extract the COB-INF directory into
> the temporary directory and mount the blocks from there. This should be
> very simple to change.
> 2. We should check on startup if we need to extract a COB-INF directory
> again. If anyone has a good idea how to check this without too much work
> would be great.
> 3. Update to our deployer plugins (and perhaps archetypes) - we changed
> some directory names and obviously the deployment has changed. So we
> should check if all our plugins, development procedures, archetypes etc.
> are still working. I just tested the core-webapp.

I've quick checked a Cocoon Block (mvn -X clean install jetty6:run). I
got the following failure:

1. building/deploying

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).


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!)

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')
[INFO]
- ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Failure
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failure
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:296)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:242)
        at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:122)
        at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:160)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        ... 16 more
Caused by: org.springframework.beans.factory.BeanCreationException:
Unable to initialize Avalon component with role
org.apache.cocoon.Processor; nested exception is
org.apache.avalon.framework.configuration.ConfigurationException: Cannot
resolve sitemap.xmap
        at
org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:247)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:297)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1025)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:642)
        at
org.apache.cocoon.servlet.RequestProcessor.<init>(RequestProcessor.java:99)
        at
org.apache.cocoon.servlet.SitemapServlet.init(SitemapServlet.java:49)
        at javax.servlet.GenericServlet.init(GenericServlet.java:283)
        at
org.apache.cocoon.bootstrap.servlet.ShieldingServlet.init(ShieldingServlet.java:92)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:377)
        at
org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:234)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:37)
        at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:565)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:961)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:341)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:367)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:37)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:101)
        at org.mortbay.jetty.Server.doStart(Server.java:235)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:37)
        at
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:114)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:285)
        ... 21 more
Caused by:
org.apache.avalon.framework.configuration.ConfigurationException: Cannot
resolve sitemap.xmap
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.configure(TreeProcessor.java:215)
        at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)
        at
org.apache.cocoon.core.container.spring.avalon.AvalonBeanPostProcessor.postProcessBeforeInitialization(AvalonBeanPostProcessor.java:236)
        ... 46 more
Caused by: org.apache.excalibur.source.SourceException: Unable to select
source factory for sitemap.xmap
        at
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:168)
        at
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:182)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.configure(TreeProcessor.java:213)
        ... 48 more
Caused by: org.apache.cocoon.ProcessingException: Unable to lookup
source factory for scheme: *
        at
org.apache.cocoon.components.source.CocoonSourceResolver.getSourceFactory(CocoonSourceResolver.java:228)
        at
org.apache.cocoon.components.source.CocoonSourceResolver.resolveURI(CocoonSourceResolver.java:161)
        ... 50 more
Caused by: org.apache.avalon.framework.service.ServiceException:
Component with 'org.apache.excalibur.source.SourceFactory/*' is not
defined in this service manager. (Key='AvalonServiceManager')
        at
org.apache.cocoon.core.container.spring.avalon.AvalonServiceManager.lookup(AvalonServiceManager.java:57)
        at
org.apache.cocoon.components.source.CocoonSourceResolver.getSourceFactory(CocoonSourceResolver.java:226)
        ... 51 more

I actually have no clue sincce when a lookup with a .../* has been
allowed. Anybody esle (Carsten?)

Ciao

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFTGgMLNdJvZjjVZARAnUhAJ0ew1DKsHRXIEV2A4h06RVpIwiY5ACgm+pD
3Mz1D0NpgRvwzqaWhA4ov0A=
=AIND
-----END PGP SIGNATURE-----

Mime
View raw message