You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Giacomo Pati <gi...@apache.org> on 2006/11/05 14:42:25 UTC

Try to get Block Archetypes working

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I'm trying to get the archetypes running again and started with the
block one.

It builds without errors and it seems to have the correct structure:

./src/main/java/demo/MyBean.java
./src/main/resources/META-INF/cocoon/spring/demo-application-context.xml
./src/main/resources/COB-INF/demo.js
./src/main/resources/COB-INF/sitemap.xmap
./src/main/resources/COB-INF/demo.xml
./pom.xml

The target directory look like:

target/test-1.0-SNAPSHOT/blocks/sitemap.xmap
target/test-1.0-SNAPSHOT/sitemap.xmap
target/test-1.0-SNAPSHOT/META-INF
target/test-1.0-SNAPSHOT/WEB-INF/lib/cocoon-bootstrap-1.0.0-M2-SNAPSHOT.jar
target/test-1.0-SNAPSHOT/WEB-INF/applicationContext.xml
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/lib/...
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/cocoon.xconf
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/properties/core.properties
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/log4j.xconf
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/classes/demo/MyBean.class
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/classes/META-INF/cocoon/spring/demo-application-context.xml
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/classes/COB-INF/demo.js
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/classes/COB-INF/sitemap.xmap
target/test-1.0-SNAPSHOT/WEB-INF/cocoon/classes/COB-INF/demo.xml
target/test-1.0-SNAPSHOT/WEB-INF/web.xml
target/test-1.0-SNAPSHOT/WEB-INF/classes
target/classes/demo/MyBean.class
target/classes/META-INF/cocoon/spring/demo-application-context.xml
target/classes/COB-INF/demo.js
target/classes/COB-INF/sitemap.xmap
target/classes/COB-INF/demo.xml

But a 'mvn -X jetty6:run' produces a error unfamiliar to me:

[INFO] [jetty6:run]
[INFO] Configuring Jetty for project: test
[INFO] Webapp source directory is: /home/giacomo/tmp/test/target/test-1.0-SNAPSHOT
[INFO] web.xml file located at: /home/giacomo/tmp/test/target/test-1.0-SNAPSHOT/WEB-INF/web.xml
[INFO] Classes located at: /home/giacomo/tmp/test/target/classes
[INFO] tmp dir for webapp will be /home/giacomo/tmp/test/target/jetty-tmp
[INFO] Starting Jetty Server ...
[DEBUG] Setting Connector: org.mortbay.jetty.nio.SelectChannelConnector on port 8888
1 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger@e576d4 via org.mortbay.log.Slf4jLog
[INFO] Context path = /
[DEBUG] Adding artifact concurrent-1.3.4.jar for WEB-INF/lib
[DEBUG] Adding artifact spring-core-2.0.jar for WEB-INF/lib
[DEBUG] Adding artifact aopalliance-1.0.jar for WEB-INF/lib
[DEBUG] Adding artifact jakarta-bcel-20040329.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-logger-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact jakarta-regexp-1.4.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-logging-1.0.4.jar for WEB-INF/lib
[DEBUG] Adding artifact spring-aop-2.0.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-core-2.2.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact avalon-framework-api-4.3.jar for WEB-INF/lib
[DEBUG] Adding artifact junit-3.8.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-lang-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-sourceresolve-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-flowscript-impl-1.0.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact log4j-1.2.13.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-xmlutil-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-jxpath-1.2.jar for WEB-INF/lib
[DEBUG] Adding artifact oro-2.0.8.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-forms-impl-1.0.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact nekohtml-0.9.5.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-jexl-1.0.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-store-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact daisy-util-1.4.1.jar for WEB-INF/lib
[DEBUG] Adding artifact spring-web-2.0.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-jci-core-1.0-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact xml-apis-1.3.02.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-pool-api-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-jci-fam-1.0-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact ehcache-1.2.jar for WEB-INF/lib
[DEBUG] Adding artifact avalon-framework-impl-4.3.jar for WEB-INF/lib
[DEBUG] Adding artifact nekodtd-0.1.11.jar for WEB-INF/lib
[DEBUG] Adding artifact xml-resolver-1.1.jar for WEB-INF/lib
[DEBUG] Adding artifact xalan-2.7.0.jar for WEB-INF/lib
[DEBUG] Adding artifact js-1.6R2.jar for WEB-INF/lib
[DEBUG] Adding artifact daisy-htmlcleaner-1.4.1.jar for WEB-INF/lib
[DEBUG] Adding artifact icu4j-3.4.4.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-ajax-impl-1.0.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact spring-context-2.0.jar for WEB-INF/lib
[DEBUG] Adding artifact excalibur-instrument-api-2.1.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-collections-3.2.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-bootstrap-1.0.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] Adding artifact xreporter-expression-r683.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-logging-api-1.0.4.jar for WEB-INF/lib
[DEBUG] Adding artifact commons-io-1.2.jar for WEB-INF/lib
[DEBUG] Adding artifact xercesImpl-2.8.0.jar for WEB-INF/lib
[DEBUG] Adding artifact spring-beans-2.0.jar for WEB-INF/lib
[DEBUG] Adding artifact cocoon-template-impl-1.0.0-M2-SNAPSHOT.jar for WEB-INF/lib
[DEBUG] classpath element: concurrent-1.3.4.jar
[DEBUG] classpath element: spring-core-2.0.jar
[DEBUG] classpath element: aopalliance-1.0.jar
[DEBUG] classpath element: jakarta-bcel-20040329.jar
[DEBUG] classpath element: excalibur-logger-2.1.jar
[DEBUG] classpath element: jakarta-regexp-1.4.jar
[DEBUG] classpath element: commons-logging-1.0.4.jar
[DEBUG] classpath element: spring-aop-2.0.jar
[DEBUG] classpath element: cocoon-core-2.2.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: avalon-framework-api-4.3.jar
[DEBUG] classpath element: junit-3.8.jar
[DEBUG] classpath element: commons-lang-2.1.jar
[DEBUG] classpath element: excalibur-sourceresolve-2.1.jar
[DEBUG] classpath element: cocoon-flowscript-impl-1.0.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: log4j-1.2.13.jar
[DEBUG] classpath element: excalibur-xmlutil-2.1.jar
[DEBUG] classpath element: commons-jxpath-1.2.jar
[DEBUG] classpath element: oro-2.0.8.jar
[DEBUG] classpath element: cocoon-forms-impl-1.0.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: nekohtml-0.9.5.jar
[DEBUG] classpath element: commons-jexl-1.0.jar
[DEBUG] classpath element: excalibur-store-2.1.jar
[DEBUG] classpath element: daisy-util-1.4.1.jar
[DEBUG] classpath element: spring-web-2.0.jar
[DEBUG] classpath element: commons-jci-core-1.0-SNAPSHOT.jar
[DEBUG] classpath element: xml-apis-1.3.02.jar
[DEBUG] classpath element: excalibur-pool-api-2.1.jar
[DEBUG] classpath element: commons-jci-fam-1.0-SNAPSHOT.jar
[DEBUG] classpath element: ehcache-1.2.jar
[DEBUG] classpath element: avalon-framework-impl-4.3.jar
[DEBUG] classpath element: nekodtd-0.1.11.jar
[DEBUG] classpath element: xml-resolver-1.1.jar
[DEBUG] classpath element: xalan-2.7.0.jar
[DEBUG] classpath element: js-1.6R2.jar
[DEBUG] classpath element: daisy-htmlcleaner-1.4.1.jar
[DEBUG] classpath element: icu4j-3.4.4.jar
[DEBUG] classpath element: cocoon-ajax-impl-1.0.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: spring-context-2.0.jar
[DEBUG] classpath element: excalibur-instrument-api-2.1.jar
[DEBUG] classpath element: commons-collections-3.2.jar
[DEBUG] classpath element: cocoon-bootstrap-1.0.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: xreporter-expression-r683.jar
[DEBUG] classpath element: commons-logging-api-1.0.4.jar
[DEBUG] classpath element: commons-io-1.2.jar
[DEBUG] classpath element: xercesImpl-2.8.0.jar
[DEBUG] classpath element: spring-beans-2.0.jar
[DEBUG] classpath element: cocoon-template-impl-1.0.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: classes
[INFO] Webapp directory = /home/giacomo/tmp/test/target/test-1.0-SNAPSHOT
[INFO] Setting up classpath ...
[INFO] Finished setting up classpath
[INFO] Started configuring web.xml, resource base=/home/giacomo/tmp/test/target/test-1.0-SNAPSHOT
532 [main] INFO org.mortbay.log - Bound java:comp/env/greeting=Hello, World
[INFO] Finished configuring web.xml
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
690 [main] INFO / - Loading Spring root WebApplicationContext
2633 [main] INFO / - Apache Cocoon 2.2.0-M2-SNAPSHOT is running in mode: prod
3429 [main] WARN org.mortbay.log - failed Cocoon
3429 [main] WARN org.mortbay.log - failed ContextHandler@11402c4{/,file:/home/giacomo/tmp/test/target/test-1.0-SNAPSHOT/}
3460 [main] INFO org.mortbay.log - Started SelectChannelConnector @ 0.0.0.0:8888
3460 [main] WARN org.mortbay.log - failed Server@4e194f
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failure

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:246)
        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:235)
        ... 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

Does anybody of the recent Refactorer have a clue about it?

TIA

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

iD8DBQFFTepALNdJvZjjVZARAl5tAKDlxdSTUoWAqxWvDqX+hzrAT9Es2wCgiCR0
UktZfZ5ubUqOgQkz+1mNs7Q=
=Davw
-----END PGP SIGNATURE-----