You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Luca Morandini <lm...@ieee.org> on 2006/11/26 22:07:16 UTC
Trying to start Cocoon 2.2
Could someone tell me what I'm missing ?
svn update
mvn -Dmaven.test.skip=true clean install
cd core/cocoon-webapp
mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
...
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-26 15:51:04.296::INFO: jetty-6.0.0rc4
2006-11-26 15:51:05.640::WARN: failed
ContextHandler@1f5b4d1{/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
2006-11-26 15:51:05.640::WARN: failed ContextHandlerCollection@323274
2006-11-26 15:51:05.640::WARN: failed HandlerCollection@18e80a6
2006-11-26 15:51:05.812::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-26 15:51:05.812::WARN: failed Server@103c29b
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.StackOverflowError
at java.util.jar.JarFile.getEntry(JarFile.java:200)
at java.util.jar.JarFile.getJarEntry(JarFile.java:183)
at
sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:674)
at sun.misc.URLClassPath.getResource(URLClassPath.java:161)
at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.apache.cocoon.maven.deployer.servlet.ShieldedClassLoader.getClass(ShieldedClassLoader.java:58)
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Luca Morandini skrev:
> Daniel Fagerstrom wrote:
...
> Dropped (again) the local maven repository, dropped the cocoon-2.2
> checkout, did a fresh checkout... and Cocoon eventually worked.
OK, considering that you had dropped the maven repository before, there
must have been some faulty file in the your previous checkout.
> But I suppose is not meant to be this way...
Most definitively not. At the moment the released milestone versions are
a little bit old. But the idea is that most users should not need to
check out anything at all. It should be enough to run a Maven archetype
(http://cocoon.zones.apache.org/dev-docs/1159_1_1.html) command and
modify the resulting project by adding the needed blocks to the pom.
Then everything needed will be downloaded automatically during build.
And for a developer it would be enough to check out the blocks that one
want to work on, and the rest could be automatically downloaded by Maven.
Most of the time Maven actually is very convenient to use, especially
since they upgraded to a powerful enough server for the repository. The
main problem is that when anything goes wrong, one have to learn much
more about how Maven and the repository works than one might want to :/
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
>> Reinhard Poetz wrote:
>>> Daniel Fagerstrom wrote:
>>>> Luca Morandini skrev:
>>>> We have updated the deployment mechanism recently, and I got the
>>>> same error message a short period before I updated the bean
>>>> configuration in
>>>> META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml for
>>>> cocoon-core-main-sample.
>>>
>>> Luca (and others), delete your org/apache/cocoon directory from your
>>> local repo and build cocoon again. Maybe this helps ...
>>
>> Unfortunately it doesn't.
>>
>> So, I updated the SVN working copy, deleted the whole cocoon branch of
>> the maven repo, executed a clean build and yet I cannot make Cocoon
>> run... despiriting indeed.
>
> Sounds frustrating :/
>
> I followed exactly the same steps as you have described in your mails,
> and for me it works.
>
> I assume that you get the same errors as before? In that case something
> is wrong with your Maven setup. The cocoon-webapp module doesn't depend
> on cocoon-core-main-sample anymore, so the fact that it shows in your
> stack trace means that it is not the poms from your newly updated Cocoon
> that is used. Probably some old poms and maybe also some old jars are
> downloaded during the build process. Also the error messages looks like
> problems that I and others have fixed some while ago. Which also is a
> reason to believe that some older versions of the jars are downloaded
> and executed.
Dropped the Maven local repository and re-ran the build: no hope.
> Jorg wrote some while ago that there can be problems with some settings
> file pointing to mirrors with artifacts that are not synchronized
> properly
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116404436302770&w=2.
> You could see if his suggestions help.
Dropped settings.xml and svn-updated to recreate it: no joy.
> Otherwise you need to figure out why cocoon-core-main-sample becomes
> part of your cocoon-webapp during build. If you rebuild cocoon-webapp
> using the -X switch you will get a complete tree view of all the
> dependencies. So here we would need to know the dependency chain for the
> cocoon-core-main-sample jar.
Dropped (again) the local maven repository, dropped the cocoon-2.2
checkout, did a fresh checkout... and Cocoon eventually worked.
But I suppose is not meant to be this way...
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Luca Morandini skrev:
> Reinhard Poetz wrote:
>> Daniel Fagerstrom wrote:
>>> Luca Morandini skrev:
>>> We have updated the deployment mechanism recently, and I got the same
>>> error message a short period before I updated the bean configuration
>>> in META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml
>>> for cocoon-core-main-sample.
>>
>> Luca (and others), delete your org/apache/cocoon directory from your
>> local repo and build cocoon again. Maybe this helps ...
>
> Unfortunately it doesn't.
>
> So, I updated the SVN working copy, deleted the whole cocoon branch of
> the maven repo, executed a clean build and yet I cannot make Cocoon
> run... despiriting indeed.
Sounds frustrating :/
I followed exactly the same steps as you have described in your mails,
and for me it works.
I assume that you get the same errors as before? In that case something
is wrong with your Maven setup. The cocoon-webapp module doesn't depend
on cocoon-core-main-sample anymore, so the fact that it shows in your
stack trace means that it is not the poms from your newly updated Cocoon
that is used. Probably some old poms and maybe also some old jars are
downloaded during the build process. Also the error messages looks like
problems that I and others have fixed some while ago. Which also is a
reason to believe that some older versions of the jars are downloaded
and executed.
Jorg wrote some while ago that there can be problems with some settings
file pointing to mirrors with artifacts that are not synchronized
properly
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116404436302770&w=2.
You could see if his suggestions help.
Otherwise you need to figure out why cocoon-core-main-sample becomes
part of your cocoon-webapp during build. If you rebuild cocoon-webapp
using the -X switch you will get a complete tree view of all the
dependencies. So here we would need to know the dependency chain for the
cocoon-core-main-sample jar.
Also you could take a look in target/cocoon-webapp/WEB-INF/lib and see
if the cocoon-core-main-sample jar and in that case see if its
META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml is
identical to the one in your source tree.
If the latest version of cocoon-core is the one that is actually
executed, the content of the COB-INF directory in
cocoon-core-main-sample should be unpacked in
target/work/blocks/cocoon-core-main-sample.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Reinhard Poetz wrote:
> Daniel Fagerstrom wrote:
>> Luca Morandini skrev:
>> We have updated the deployment mechanism recently, and I got the same
>> error message a short period before I updated the bean configuration
>> in META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml for
>> cocoon-core-main-sample.
>
> Luca (and others), delete your org/apache/cocoon directory from your
> local repo and build cocoon again. Maybe this helps ...
Unfortunately it doesn't.
So, I updated the SVN working copy, deleted the whole cocoon branch of
the maven repo, executed a clean build and yet I cannot make Cocoon
run... despiriting indeed.
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
> We have updated the deployment mechanism recently, and I got the same
> error message a short period before I updated the bean configuration in
> META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml for
> cocoon-core-main-sample.
Luca (and others), delete your org/apache/cocoon directory from your local repo
and build cocoon again. Maybe this helps ...
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
>> Embedded error: Error creating bean with name
>> 'org.apache.cocoon.core.main.block' defined in URL
>> [jar:file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-core-main-sample-1.0.0-SNAPSHOT.jar!/META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml]:
>> Invocation of init method failed; nested exception is
>> org.springframework.beans.factory.BeanCreationException: Could not
>> create configuration for TreeProcesoor; nested exception is
>> java.io.IOException: Couldn't find the sitemap /sitemap.xmap
>> [INFO]
>> ------------------------------------------------------------------------
> There is still something strange in your setup. As you can see above,
> Cocoon (in o.a.c.core.deployment.DeploymentUtil I would assume) reads
> from the jar: cocoon-core-main-sample-1.0.0-SNAPSHOT.jar, which not
> should be on the dependency list from recent cocoon-webapp checkouts.
> Probably there is an old version of the jar in your
> cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/ directory.
I zapped the contents of cocoon-webapp/target and rebuilt: no joy.
> We have updated the deployment mechanism recently, and I got the same
> error message a short period before I updated the bean configuration in
> META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml for
> cocoon-core-main-sample. To work the value of the property
> blockContextURL in the configuration file should be
> blockcontext:/cocoon-core-main-sample/ instead of a relative URL as it
> was before. So you probably either get an old version of the
> cocoon-core-main-sample or an old version of cocoon-core.
Well, actually
blocks\cocoon-core-sample\cocoon-core-main-sample\src\main\resources\META-INF\cocoon\spring\cocoon-core-main-sample-blockServlet.xml
has the correct value of blockContextURL (I did an svn update, so this
doesn't come as a surprise to me).
> ...
>>> The next question is of course why the shielding classloader doesn't
>>> work in some environments. It works for me (jdk1.5.0_06, Windows XP).
>> It's the same environment for me as well.
> Then something else must differ. I don't know that much about the
> working of the shielding classloader. Maybe Carsten has some hypothesis.
How can I be sure to have your exact configuration: dropping the maven
repo and build everything from scratch (how painful !) ?
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Luca Morandini skrev:
> Daniel Fagerstrom wrote:
>> Luca Morandini skrev:
>>> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
>>
>>
>> This is strange, I don't have this jar on my class path. It is
>> probably a leftover from a build without the
>> -Dmaven.war.shieldingclassloader=false switch. Try a "mvn
>> -Dmaven.war.shieldingclassloader=false clean install" in the
>> cocoon-webapp.
>
> I always do a clean install... I already had my fingers burnt a few
> times ;)
>
> Anyway, after an "svn up" and a clean install with
> shieeldingclassloader set to false, the error has changed, but an
> error it still is.
>
> I issued:
> cd core/cocoon-webapp/
> mvn jetty:run -X -Dorg.apache.cocoon.mode=dev
...
> Embedded error: Error creating bean with name
> 'org.apache.cocoon.core.main.block' defined in URL
> [jar:file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-core-main-sample-1.0.0-SNAPSHOT.jar!/META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml]:
> Invocation of init method failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Could not
> create configuration for TreeProcesoor; nested exception is
> java.io.IOException: Couldn't find the sitemap /sitemap.xmap
> [INFO]
> ------------------------------------------------------------------------
There is still something strange in your setup. As you can see above,
Cocoon (in o.a.c.core.deployment.DeploymentUtil I would assume) reads
from the jar: cocoon-core-main-sample-1.0.0-SNAPSHOT.jar, which not
should be on the dependency list from recent cocoon-webapp checkouts.
Probably there is an old version of the jar in your
cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/ directory.
We have updated the deployment mechanism recently, and I got the same
error message a short period before I updated the bean configuration in
META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml for
cocoon-core-main-sample. To work the value of the property
blockContextURL in the configuration file should be
blockcontext:/cocoon-core-main-sample/ instead of a relative URL as it
was before. So you probably either get an old version of the
cocoon-core-main-sample or an old version of cocoon-core.
...
>> The next question is of course why the shielding classloader doesn't
>> work in some environments. It works for me (jdk1.5.0_06, Windows XP).
> It's the same environment for me as well.
Then something else must differ. I don't know that much about the
working of the shielding classloader. Maybe Carsten has some hypothesis.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
>> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
>
> This is strange, I don't have this jar on my class path. It is probably
> a leftover from a build without the
> -Dmaven.war.shieldingclassloader=false switch. Try a "mvn
> -Dmaven.war.shieldingclassloader=false clean install" in the cocoon-webapp.
I always do a clean install... I already had my fingers burnt a few times ;)
Anyway, after an "svn up" and a clean install with shieeldingclassloader
set to false, the error has changed, but an error it still is.
I issued:
cd core/cocoon-webapp/
mvn jetty:run -X -Dorg.apache.cocoon.mode=dev
but...
[DEBUG] classpath element: classes
[DEBUG] classpath element: concurrent-1.3.4.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-beans-2.0.1.jar
[DEBUG] classpath element: cocoon-core-2.2.0-M2-SNAPSHOT.jar
[DEBUG] classpath element: excalibur-sourceresolve-2.1.jar
[DEBUG] classpath element: commons-lang-2.1.jar
[DEBUG] classpath element: junit-3.8.jar
[DEBUG] classpath element: avalon-framework-api-4.3.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: commons-jexl-1.0.jar
[DEBUG] classpath element: excalibur-store-2.1.jar
[DEBUG] classpath element: commons-jci-core-1.0-SNAPSHOT.jar
[DEBUG] classpath element: xml-apis-1.3.02.jar
[DEBUG] classpath element: commons-jci-fam-1.0-SNAPSHOT.jar
[DEBUG] classpath element: excalibur-pool-api-2.1.jar
[DEBUG] classpath element: ehcache-1.2.jar
[DEBUG] classpath element: avalon-framework-impl-4.3.jar
[DEBUG] classpath element: xml-resolver-1.1.jar
[DEBUG] classpath element: xalan-2.7.0.jar
[DEBUG] classpath element: spring-web-2.0.1.jar
[DEBUG] classpath element: excalibur-instrument-api-2.1.jar
[DEBUG] classpath element: commons-collections-3.2.jar
[DEBUG] classpath element: cocoon-blocks-fw-impl-1.0.0-SNAPSHOT.jar
[DEBUG] classpath element: commons-logging-api-1.0.4.jar
[DEBUG] classpath element: commons-io-1.2.jar
[DEBUG] classpath element: spring-context-2.0.1.jar
[DEBUG] classpath element: xercesImpl-2.8.0.jar
[DEBUG] classpath element: spring-aop-2.0.1.jar
[DEBUG] classpath element: spring-core-2.0.1.jar
[INFO] Webapp directory =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-28 04:23:57.703::INFO: jetty-6.0.0rc4
[DEBUG] Setting up classpath ...
...
[DEBUG] Started configuring web.xml, resource
base=C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
2006-11-28 04:23:58.343::INFO: Bound java:comp/env/greeting=Hello, World
[DEBUG] 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.
2006-11-28 04:23:59.015:/:INFO: Loading Spring root WebApplicationContext
2006-11-28 04:24:00.390:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
2006-11-28 04:24:01.437::WARN: failed
ContextHandler@dd89f9{/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
2006-11-28 04:24:01.437::WARN: failed ContextHandlerCollection@8d5aad
2006-11-28 04:24:01.437::WARN: failed HandlerCollection@3c35fd
2006-11-28 04:24:01.781::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-28 04:24:01.781::WARN: failed Server@8d0b0f
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failure
Embedded error: Error creating bean with name
'org.apache.cocoon.core.main.block' defined in URL
[jar:file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-core-main-sample-1.0.0-SNAPSHOT.jar!/META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml]:
Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
create configuration for TreeProcesoor; nested exception is
java.io.IOException: Couldn't find the sitemap /sitemap.xmap
[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:340)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:272)
at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:177)
at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
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:
Error creating bean with name 'org.apache.cocoon.core.main.block'
defined in URL
[jar:file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-core-main-sample-1.0.0-SNAPSHOT.jar!/META-INF/cocoon/spring/cocoon-core-main-sample-blockServlet.xml]:
Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not
create configuration for TreeProcesoor; nested exception is
java.io.IOException: Couldn't find the sitemap /sitemap.xmap
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1027)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
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.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
at
org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
> The next question is of course why the shielding classloader doesn't
> work in some environments. It works for me (jdk1.5.0_06, Windows XP).
It's the same environment for me as well.
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
vepeter skrev:
> Hi, all,
>
> I try to get started with cocoon 2.2
> I got it built with "mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean install"
> ant run with "mvn jetty:run -Dorg.apache.cocoon.mode=dev"
>
> But when I try to request any page I have the following error on the
> response page:
>
> Message: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
>
> Description: org.springframework.beans.factory.BeanDefinitionStoreException:
> Unexpected exception parsing XML document from resource loaded from
> byte array; nested exception is java.lang.NoSuchMethodError:
> javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
>
> Sender: org.apache.cocoon.servlet.RequestProcessor
>
> Source: Cocoon Servlet
>
> Request URI
>
> cause
>
> java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
>
> request-uri
>
> /
>
I don't know exactly how to solve it but you might get some insight from
the previous thread
http://www.mail-archive.com/dev@cocoon.apache.org/msg47740.html. The
lacking method is part of Java 5 but not Java 1.4. Cocoon has a
dependency on xml-apis-1.3.02.jar that contains the right version of
javax.xml.transform. So probably an older version of the library shadows
the right one in you classpath. Use the -X switch to jetty:run to see
what classpath you use. It might be that it is the one from Java 1.4, in
that case you could try to use the shielding classloader, it works for
some people.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by vepeter <ve...@ukr.net>.
Hi, all,
I try to get started with cocoon 2.2
I got it built with "mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean install"
ant run with "mvn jetty:run -Dorg.apache.cocoon.mode=dev"
But when I try to request any page I have the following error on the
response page:
Message: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
Description: org.springframework.beans.factory.BeanDefinitionStoreException:
Unexpected exception parsing XML document from resource loaded from
byte array; nested exception is java.lang.NoSuchMethodError:
javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
Sender: org.apache.cocoon.servlet.RequestProcessor
Source: Cocoon Servlet
Request URI
cause
java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
request-uri
/
full exception chain stacktrace
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from resource loaded from byte array; nested exception is java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
Caused by: java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:199)
at org.apache.xalan.transformer.TransformerIdentityImpl.setDocumentLocator(TransformerIdentityImpl.java:880)
at org.apache.cocoon.xml.AbstractXMLPipe.setDocumentLocator(AbstractXMLPipe.java:39)
at org.apache.cocoon.util.location.LocationAttributes$Pipe.setDocumentLocator(LocationAttributes.java:303)
at org.apache.xerces.parsers.AbstractSAXParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.cocoon.xml.dom.DomHelper.parse(DomHelper.java:89)
at org.apache.cocoon.core.container.spring.SitemapElementParser.readSitemap(SitemapElementParser.java:55)
at org.apache.cocoon.core.container.spring.SitemapElementParser.parse(SitemapElementParser.java:125)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:75)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1147)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1137)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:143)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:88)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:499)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:407)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.apache.cocoon.core.container.spring.CocoonWebApplicationContext.loadBeanDefinitions(CocoonWebApplicationContext.java:78)
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at org.apache.cocoon.core.container.spring.CocoonWebApplicationContext.<init>(CocoonWebApplicationContext.java:70)
at org.apache.cocoon.core.container.spring.avalon.SitemapHelper.createContainer(SitemapHelper.java:180)
at org.apache.cocoon.components.treeprocessor.sitemap.SitemapLanguage.build(SitemapLanguage.java:340)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
The similar exception is described in "work/cocoon-logs/log4j.log"
btpool0-2 DEBUG cocoon.sitemap - New context is file:/F:/java/cocoon/core/cocoon-webapp/target/cocoon-webapp/
btpool0-2 DEBUG cocoon.sitemap - first version of the ConcreteTreeProcessor
btpool0-2 DEBUG cocoon - No mime-type for xmlizing file:/F:/java/cocoon/core/cocoon-webapp/target/cocoon-webapp/sitemap.xmap,
guessing text/xml
btpool0-2 DEBUG cocoon - Response successfully reset
btpool0-2 ERROR cocoon - Internal Cocoon Problem
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from resource loade
d from byte array; nested exception is java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3
c/dom/Node;
Caused by:
java.lang.NoSuchMethodError: javax.xml.transform.dom.DOMResult.getNextSibling()Lorg/w3c/dom/Node;
at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler(TransformerIdentityImpl.java:199)
at org.apache.xalan.transformer.TransformerIdentityImpl.setDocumentLocator(TransformerIdentityImpl.java:880)
at org.apache.cocoon.xml.AbstractXMLPipe.setDocumentLocator(AbstractXMLPipe.java:39)
at org.apache.cocoon.util.location.LocationAttributes$Pipe.setDocumentLocator(LocationAttributes.java:303)
at org.apache.xerces.parsers.AbstractSAXParser.startDocument(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.cocoon.xml.dom.DomHelper.parse(DomHelper.java:89)
at org.apache.cocoon.core.container.spring.SitemapElementParser.readSitemap(SitemapElementParser.java:55)
at org.apache.cocoon.core.container.spring.SitemapElementParser.parse(SitemapElementParser.java:125)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:75)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate
.java:1147)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate
.java:1137)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefiniti
onDocumentReader.java:143)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefin
itionDocumentReader.java:88)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java
:499)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:4
07)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357
)
--
Regards,
Peter Velychko
vepeter@ukr.net
Tuesday, November 28, 2006, 12:59:54 AM, you wrote:
DF> Luca Morandini skrev:
>> Daniel Fagerstrom wrote:
>>> Luca Morandini skrev:
>>>> Patrick Refondini wrote:
>>>>>
>>>>> shouldn't it be :
>>>>> -Dmaven.war.shieldingclassloader=false
>>>>
>>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>>
>>>> I did:
>>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>>> clean install
>>>> cd core/cocoon-webapp
>>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>>>
>>> I have had problems lately with that an avalon-framework-4.0.jar (from
>>> 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
>>> Avalon framework 4.3 jars that Cocoon depends on and give a stack
>>> trace similar to yours. Remove the faulty jar and try to run Cocoon
>>> again.
>>
>> I don't think this is the issue, since I see only two Avalon JARs, both
>> 4.3 (avalon-framework-api-4.3.jar, avalon-framework-impl-4.3.jar).
DF> Yes, I found out (by building with -X) that it is the batik block that
DF> include the faulty avalon jar. And I had added the batik block my self
DF> for testing purposes.
>>> Some other points: jetty:run-exploded seem to do some unnecessary
>>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>>> that you get the whole stack trace. Otherwise it is very hard to see
>>> what is the problem.
>>
>> Here you are, Sir:
DF> Great ;)
>> [INFO] [jetty:run]
DF> ...
>> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
DF> This is strange, I don't have this jar on my class path. It is probably
DF> a leftover from a build without the
DF> -Dmaven.war.shieldingclassloader=false switch. Try a "mvn
DF> -Dmaven.war.shieldingclassloader=false clean install" in the cocoon-webapp.
DF> Actually a "mvn war:exploded" is even better as it is much faster
DF> (doesn't build the war file), and doesn't call the deployer.
DF> ...
>> Caused by: java.lang.RuntimeException: Cannot invoke listener
>> org.springframework.web.context.ContextLoaderListener@22e177
>> at
>> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke(ShieldingListener.java:181)
>>
>> at
>> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitialized(ShieldingListener.java:204)
>>
>> at
>> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
DF> And here we can see that shielding classloader seem to be called anyway.
DF> Probably the web.xml is patched to use the shielding stuff after an
DF> earlier build.
DF> The next question is of course why the shielding classloader doesn't
DF> work in some environments. It works for me (jdk1.5.0_06, Windows XP).
DF> /Daniel
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Luca Morandini skrev:
> Daniel Fagerstrom wrote:
>> Luca Morandini skrev:
>>> Patrick Refondini wrote:
>>>>
>>>> shouldn't it be :
>>>> -Dmaven.war.shieldingclassloader=false
>>>
>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>
>>> I did:
>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>> clean install
>>> cd core/cocoon-webapp
>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>>
>> I have had problems lately with that an avalon-framework-4.0.jar (from
>> 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
>> Avalon framework 4.3 jars that Cocoon depends on and give a stack
>> trace similar to yours. Remove the faulty jar and try to run Cocoon
>> again.
>
> I don't think this is the issue, since I see only two Avalon JARs, both
> 4.3 (avalon-framework-api-4.3.jar, avalon-framework-impl-4.3.jar).
Yes, I found out (by building with -X) that it is the batik block that
include the faulty avalon jar. And I had added the batik block my self
for testing purposes.
>> Some other points: jetty:run-exploded seem to do some unnecessary
>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>> that you get the whole stack trace. Otherwise it is very hard to see
>> what is the problem.
>
> Here you are, Sir:
Great ;)
> [INFO] [jetty:run]
...
> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
This is strange, I don't have this jar on my class path. It is probably
a leftover from a build without the
-Dmaven.war.shieldingclassloader=false switch. Try a "mvn
-Dmaven.war.shieldingclassloader=false clean install" in the cocoon-webapp.
Actually a "mvn war:exploded" is even better as it is much faster
(doesn't build the war file), and doesn't call the deployer.
...
> Caused by: java.lang.RuntimeException: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@22e177
> at
> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke(ShieldingListener.java:181)
>
> at
> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitialized(ShieldingListener.java:204)
>
> at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
And here we can see that shielding classloader seem to be called anyway.
Probably the web.xml is patched to use the shielding stuff after an
earlier build.
The next question is of course why the shielding classloader doesn't
work in some environments. It works for me (jdk1.5.0_06, Windows XP).
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Patrick Refondini <pa...@pobox.com>.
Luca Morandini wrote:
> Daniel Fagerstrom wrote:
>
>> Luca Morandini skrev:
>>
>>> Patrick Refondini wrote:
>>>
>>>>
>>>> shouldn't it be :
>>>> -Dmaven.war.shieldingclassloader=false
>>>
>>>
>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>
>>> I did:
>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>> clean install
>>> cd core/cocoon-webapp
>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
Hi Luca, following Reinhard Poetz advice:
"Luca (and others), delete your org/apache/cocoon directory from your
local repo and build cocoon again. Maybe this helps ... "
and after:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
-Dallblocks clean install
cd core/cocoon-webapp
mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
works fine:
~/dev/c22/cocoon_trunk/core/cocoon-webapp patrick$ mvn
jetty:run-exploded -Dorg.apache.cocoon.mode=dev
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jetty'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building Core Webapp
[INFO] task-segment: [jetty:run-exploded]
[INFO]
----------------------------------------------------------------------------
<snip />
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-30 19:09:10.977::INFO: jetty-6.0.0rc4
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-30 19:09:11.413:/:INFO: Loading Spring root WebApplicationContext
2006-11-30 19:09:13.680:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
Cannot find CatalogManager.properties
2006-11-30 19:09:16.993:/:INFO: DispatcherServlet: Block dispatcher was
initialized successfully.
2006-11-30 19:09:17.021::INFO: Started SelectChannelConnector @
0.0.0.0:8888
[INFO] Started Jetty Server
On Linux/MacOSX default maven repository is at:
~/.m2/repository/org/apache/cocoon
don't know on Windows.
A last thing which may lead to significant difference is Maven
settings.xml file config. For me this seems to play well:
In the servers section / Element:
<servers>
<!-- DEFINED according to Cocoon 2.2 settings.xml sample ... -->
<server>
<id>apache-maven-snapshot</id>
<username>jheymans</username>
</server>
</servers>
In the mirrors section / Element:
<mirrors>
<!-- DEFINED FOR COCOON 2.2
<mirror>
<mirrorOf>central</mirrorOf>
<id>ibiblioEuropeanMirror</id>
<url>http://mirrors.dotsrc.org/maven2</url>
</mirror>
-->
<!-- For Cocoon 2.2 -->
<!-- Denmark -->
<mirror>
<id>mirrors.dotsrc.org</id>
<url>http://mirrors.dotsrc.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- Denmark -->
<mirror>
<id>repo1.maven.org</id>
<url>http://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- United States, somewhere
<mirror>
<id>repo.mergere.com</id>
<url>http://repo.mergere.com/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!-- United States, Louisiana
<mirror>
<id>lsu.edu</id>
<url>http://ibiblio.lsu.edu/main/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!-- United States, North Carolina
<mirror>
<id>ibiblio.net</id>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
-->
<!--
<mirror>
<id>planetmirror.com</id>
<url>http://downloads.planetmirror.com/pub/maven2</url>
<mirrorOf>central</mirrorOf>
Australia, Queensland
</mirror>
-->
<!--
<mirror>
<mirrorOf>central</mirrorOf>
<id>ibiblioAustralianMirror</id>
<url>http://public.planetmirror.com/pub/maven2</url>
</mirror>
-->
</mirrors>
I let commented out mirrors for you to play with in case the only one I
have let do not work as expected... I do not have a strong understanding
of priorities given to defined mirrors so take my advice with care...
Hope this may help you,
Patrick
>>
>>
>> I have had problems lately with that an avalon-framework-4.0.jar (from
>> 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
>> Avalon framework 4.3 jars that Cocoon depends on and give a stack
>> trace similar to yours. Remove the faulty jar and try to run Cocoon
>> again.
>
>
> I don't think this is the issue, since I see only two Avalon JARs, both
> 4.3 (avalon-framework-api-4.3.jar, avalon-framework-impl-4.3.jar).
>
>
>> Some other points: jetty:run-exploded seem to do some unnecessary
>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>> that you get the whole stack trace. Otherwise it is very hard to see
>> what is the problem.
>
>
> Here you are, Sir:
>
> [INFO] [jetty:run]
> [INFO] Configuring Jetty for project: Core Webapp
> [INFO] Webapp source directory =
> C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
> [INFO] web.xml file =
> C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp\WEB-INF\web.xml
>
> [INFO] Classes directory
> C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\classes does not exist
> 2006-11-27 17:04:33.307::INFO: Logging to STDERR via
> org.mortbay.log.StdErrLog
> [INFO] Context path = /
> [INFO] Tmp directory =
> c:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\work
> [INFO] Web defaults = jetty default
> [INFO] Webapp directory =
> C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
> [INFO] Starting jetty 6.0.0rc4 ...
> 2006-11-27 17:04:35.150::INFO: jetty-6.0.0rc4
> [INFO] Classpath =
> [file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/classes/,
> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
> file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/classes,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-core/2.0/spring-core-2.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-bcel/jakarta-bcel/20040329/jakarta-bcel-20040329.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/logger/excalibur-logger/2.1/excalibur-logger-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-aop/2.0/spring-aop-2.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-core/2.2.0-M2-SNAPSHOT/cocoon-core-2.2.0-M2-SNAPSHOT.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/junit/junit/3.8/junit-3.8.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-api/4.3/avalon-framework-api-4.3.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/sourceresolve/excalibur-sourceresolve/2.1/excalibur-sourceresolve-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/xmlutil/excalibur-xmlutil/2.1/excalibur-xmlutil-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jexl/commons-jexl/1.0/commons-jexl-1.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/store/excalibur-store/2.1/excalibur-store-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-web/2.0/spring-web-2.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-core/1.0-SNAPSHOT/commons-jci-core-1.0-SNAPSHOT.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-fam/1.0-SNAPSHOT/commons-jci-fam-1.0-SNAPSHOT.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/pool/excalibur-pool-api/2.1/excalibur-pool-api-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/net/sf/ehcache/ehcache/1.2/ehcache-1.2.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-resolver/xml-resolver/1.1/xml-resolver-1.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xalan/xalan/2.7.0/xalan-2.7.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-context/2.0/spring-context-2.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/instrument/excalibur-instrument-api/2.1/excalibur-instrument-api-2.1.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-blocks-fw-impl/1.0.0-SNAPSHOT/cocoon-blocks-fw-impl-1.0.0-SNAPSHOT.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-io/commons-io/1.2/commons-io-1.2.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-beans/2.0/spring-beans-2.0.jar,
> file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xerces/xercesImpl/2.8.0/xercesImpl-2.8.0.jar]
>
> 2006-11-27 17:04:37.447::INFO: Bound java:comp/env/greeting=Hello, World
> log4j:WARN No appenders could be found for logger
> (org.springframework.web.context.ContextLoader).
> log4j:WARN Please initialize the log4j system properly.
> 2006-11-27 17:04:42.619:/:INFO: Loading Spring root WebApplicationContext
> 2006-11-27 17:04:46.510:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
> running in mode: dev
> 2006-11-27 17:04:47.369::WARN: failed
> ContextHandler@6765{/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
>
> 2006-11-27 17:04:47.369::WARN: failed ContextHandlerCollection@842e74
> 2006-11-27 17:04:47.369::WARN: failed HandlerCollection@5e9f1
> 2006-11-27 17:04:48.166::INFO: Started SelectChannelConnector @
> 0.0.0.0:8888
> 2006-11-27 17:04:48.166::WARN: failed Server@1a4eb56
> [INFO] Jetty server exiting.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failure
>
> Embedded error: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@22e177
> Couldn't find the sitemap /sitemap.xmap
> [INFO]
> ------------------------------------------------------------------------
> [INFO] 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:340)
>
> at
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:272)
>
> at
> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:177)
>
> at
> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>
> ... 16 more
> Caused by: java.lang.RuntimeException: Cannot invoke listener
> org.springframework.web.context.ContextLoaderListener@22e177
> at
> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke(ShieldingListener.java:181)
>
> at
> org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitialized(ShieldingListener.java:204)
>
> at
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
>
>
> --------------------
> Luca Morandini
> www.lucamorandini.it
> --------------------
>
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
>> Patrick Refondini wrote:
>>>
>>> shouldn't it be :
>>> -Dmaven.war.shieldingclassloader=false
>>
>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>
>> I did:
>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>> clean install
>> cd core/cocoon-webapp
>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>
> I have had problems lately with that an avalon-framework-4.0.jar (from
> 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
> Avalon framework 4.3 jars that Cocoon depends on and give a stack trace
> similar to yours. Remove the faulty jar and try to run Cocoon again.
I don't think this is the issue, since I see only two Avalon JARs, both
4.3 (avalon-framework-api-4.3.jar, avalon-framework-impl-4.3.jar).
> Some other points: jetty:run-exploded seem to do some unnecessary extra
> work compared to jetty:run. Use the -e switch for jetty:run so that you
> get the whole stack trace. Otherwise it is very hard to see what is the
> problem.
Here you are, Sir:
[INFO] [jetty:run]
[INFO] Configuring Jetty for project: Core Webapp
[INFO] Webapp source directory =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
[INFO] web.xml file =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp\WEB-INF\web.xml
[INFO] Classes directory
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\classes does not exist
2006-11-27 17:04:33.307::INFO: Logging to STDERR via
org.mortbay.log.StdErrLog
[INFO] Context path = /
[INFO] Tmp directory = c:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\work
[INFO] Web defaults = jetty default
[INFO] Webapp directory =
C:\apps\cocoon-2.2-dev\core\cocoon-webapp\target\cocoon-webapp
[INFO] Starting jetty 6.0.0rc4 ...
2006-11-27 17:04:35.150::INFO: jetty-6.0.0rc4
[INFO] Classpath =
[file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/classes/,
file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/WEB-INF/lib/cocoon-deployer-plugin-classloading.jar,
file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/classes,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/concurrent/concurrent/1.3.4/concurrent-1.3.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-core/2.0/spring-core-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-bcel/jakarta-bcel/20040329/jakarta-bcel-20040329.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/logger/excalibur-logger/2.1/excalibur-logger-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-aop/2.0/spring-aop-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-core/2.2.0-M2-SNAPSHOT/cocoon-core-2.2.0-M2-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-lang/commons-lang/2.1/commons-lang-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/junit/junit/3.8/junit-3.8.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-api/4.3/avalon-framework-api-4.3.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/sourceresolve/excalibur-sourceresolve/2.1/excalibur-sourceresolve-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/log4j/log4j/1.2.13/log4j-1.2.13.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/xmlutil/excalibur-xmlutil/2.1/excalibur-xmlutil-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jxpath/commons-jxpath/1.2/commons-jxpath-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-jexl/commons-jexl/1.0/commons-jexl-1.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/store/excalibur-store/2.1/excalibur-store-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-web/2.0/spring-web-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-core/1.0-SNAPSHOT/commons-jci-core-1.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-apis/xml-apis/1.3.02/xml-apis-1.3.02.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/commons/commons-jci-fam/1.0-SNAPSHOT/commons-jci-fam-1.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/components/pool/excalibur-pool-api/2.1/excalibur-pool-api-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/net/sf/ehcache/ehcache/1.2/ehcache-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/avalon/framework/avalon-framework-impl/4.3/avalon-framework-impl-4.3.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xml-resolver/xml-resolver/1.1/xml-resolver-1.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xalan/xalan/2.7.0/xalan-2.7.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-context/2.0/spring-context-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/excalibur/containerkit/instrument/excalibur-instrument-api/2.1/excalibur-instrument-api-2.1.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-collections/commons-collections/3.2/commons-collections-3.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/apache/cocoon/cocoon-blocks-fw-impl/1.0.0-SNAPSHOT/cocoon-blocks-fw-impl-1.0.0-SNAPSHOT.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-logging/commons-logging-api/1.0.4/commons-logging-api-1.0.4.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/commons-io/commons-io/1.2/commons-io-1.2.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/org/springframework/spring-beans/2.0/spring-beans-2.0.jar,
file:/C:/Documents%20and%20Settings/morandil/.m2/repository/xerces/xercesImpl/2.8.0/xercesImpl-2.8.0.jar]
2006-11-27 17:04:37.447::INFO: Bound java:comp/env/greeting=Hello, World
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-27 17:04:42.619:/:INFO: Loading Spring root WebApplicationContext
2006-11-27 17:04:46.510:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
2006-11-27 17:04:47.369::WARN: failed
ContextHandler@6765{/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
2006-11-27 17:04:47.369::WARN: failed ContextHandlerCollection@842e74
2006-11-27 17:04:47.369::WARN: failed HandlerCollection@5e9f1
2006-11-27 17:04:48.166::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-27 17:04:48.166::WARN: failed Server@1a4eb56
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failure
Embedded error: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@22e177
Couldn't find the sitemap /sitemap.xmap
[INFO]
------------------------------------------------------------------------
[INFO] 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:340)
at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:272)
at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:177)
at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
Caused by: java.lang.RuntimeException: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@22e177
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.invoke(ShieldingListener.java:181)
at
org.apache.cocoon.maven.deployer.servlet.ShieldingListener.contextInitialized(ShieldingListener.java:204)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:441)
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Patrick Refondini <pa...@pobox.com>.
Daniel Fagerstrom wrote:
> Patrick Refondini skrev:
>
>> Daniel Fagerstrom wrote:
>>
>>> Luca Morandini skrev:
>>>
>>>> Patrick Refondini wrote:
>>>>
>>>>>
>>>>> shouldn't it be :
>>>>> -Dmaven.war.shieldingclassloader=false
>>>>
>>>>
>>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>>
>>>> I did:
>>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>>> clean install
>>>> cd core/cocoon-webapp
>>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>>>
>>>
>>> I have had problems lately with that an avalon-framework-4.0.jar
>>> (from 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It
>>> shadows the Avalon framework 4.3 jars that Cocoon depends on and give
>>> a stack trace similar to yours. Remove the faulty jar and try to run
>>> Cocoon again.
>>>
>>> No idea why the 4.0 is included, some transitive dependency must be
>>> faulty. It didn't happen some weeks ago.
>>>
>>> Some other points: jetty:run-exploded seem to do some unnecessary
>>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>>> that you get the whole stack trace. Otherwise it is very hard to see
>>> what is the problem.
>>
>>
>> I have this recurrent problem when running / packaging trunk samples:
>>
>> cocoon_trunk/dists/cocoon-dist-samples> mvn -e package
>> (...)
>> [INFO] [war:war]
>> [INFO] Exploding webapp...
>> [INFO] Copy webapp webResources to
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Assembling webapp cocoon-dist-samples in
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Expanding:
>> /home/prefondini/.m2/repository/org/apache/cocoon/cocoon-webapp/2.2.0-M2-SNAPSHOT/cocoon-webapp-2.2.0-M2-SNAPSHOT.war
>> into
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/war/work/cocoon-webapp-2.2.0-M2-SNAPSHOT
>>
>> [INFO] Overlaying 1 war(s).
>> [INFO] Generating war
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>>
>> [INFO] Building war:
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>>
>> [INFO] [cocoon:deploy {execution: default}]
>> [INFO] Exploding webapp...
>> [INFO] Copy webapp webResources to
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Assembling webapp cocoon-dist-samples in
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] FATAL ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] null
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> java.lang.NullPointerException
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379)
>>
>> at
>> org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182)
>>
>> at
>> org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64)
>>
>> at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>>
>> 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)
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 15 seconds
>> [INFO] Finished at: Tue Nov 28 14:31:29 CET 2006
>> [INFO] Final Memory: 12M/23M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> The problem seems to happen at cocoon:deploy ... But the above
>> stacktrace does not seem very useful, at least to me...
>>
>> Although it's not as FATAL as it claims. It does not prevent me to
>> successfully use mvn jetty:run afterward.
>> I could even successfully deploy and run the produced
>> cocoon-samples.war in apache-tomcat-5.5.20
>>
>>
>> Test Context:
>>
>> Cocoon trunk at revision 480034
>> Java version "1.5.0_09" on Linux
>> (I will test that on MacOSX jdk 1.5 soon and report).
>> Maven version: 2.0.4
>>
>> Patrick
>
> The cocoon:deploy plugin expects a certain directory to be present, that
> is created a little bit later in the plugin. If you build it twice it
> will work.
I checked out the latest trunk sources and built it using:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean
install
and a couple more
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false install
(no clean) to get around naugthy mirrors no providing what I needed.
Then cd core/cocoon-webapp/
mvn package
mvn jetty:run
No single problem !
In dists/cocoon-dist-samples/
mvn package still gives the exact same error as above even when run
several times (whithout clean of course)
mvn jetty:run still plays the samples nicely ...
Test Context:
Cocoon trunk at revision 480141
java version "1.5.0_06" on MacOSX 10.4.6
Maven version: 2.0.4
> See
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2 and
> the rest of the thread.
I did not read the thread yet but I will. Maybe is there something more
I overlooked.
Thanks for the hint,
Patrick
>
> /Daniel
>
Re: Trying to start Cocoon 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Daniel Fagerstrom wrote:
> Reinhard Poetz skrev:
>> Daniel Fagerstrom wrote:
> ...
>>> The cocoon:deploy plugin expects a certain directory to be present,
>>> that is created a little bit later in the plugin. If you build it
>>> twice it will work. See
>>> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2
>>> and the rest of the thread.
>>
>> and as being said, the deployer isn't really necessary if you don't
>> need shielding or want to patch your web.xml.
> So, what about making not using the deployer the default? E.g. by
> putting it in a profile in the poms. There have been several people
> trying out the trunk lately, (which is really great), and several of
> them have had problems with the deployer and shielding. IMO we should
> make it as easy as possible for new people to start experimenting and
> develop Cocoon 2.2.
>
> With the shielding it seem to be some bug in some environments, but it
> doesn't happen for me, so there is not much I can do in helping out.
I saw some of the problems about 10 days ago, but now everything works fine,
with and without the shielding classloader. For me it's no problem to remove the
deployer and the shielding for now.
I will come back to the deployment topic as soon as I have (hopefully)
integrated the reloading classloader in the same way like the shielding classloader.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Reinhard Poetz skrev:
> Daniel Fagerstrom wrote:
...
>> The cocoon:deploy plugin expects a certain directory to be present,
>> that is created a little bit later in the plugin. If you build it
>> twice it will work. See
>> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2
>> and the rest of the thread.
>
> and as being said, the deployer isn't really necessary if you don't
> need shielding or want to patch your web.xml.
So, what about making not using the deployer the default? E.g. by
putting it in a profile in the poms. There have been several people
trying out the trunk lately, (which is really great), and several of
them have had problems with the deployer and shielding. IMO we should
make it as easy as possible for new people to start experimenting and
develop Cocoon 2.2.
With the shielding it seem to be some bug in some environments, but it
doesn't happen for me, so there is not much I can do in helping out.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Reinhard Poetz <re...@apache.org>.
Daniel Fagerstrom wrote:
> Patrick Refondini skrev:
>> Daniel Fagerstrom wrote:
>>> Luca Morandini skrev:
>>>> Patrick Refondini wrote:
>>>>>
>>>>> shouldn't it be :
>>>>> -Dmaven.war.shieldingclassloader=false
>>>>
>>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>>
>>>> I did:
>>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>>> clean install
>>>> cd core/cocoon-webapp
>>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>>>
>>> I have had problems lately with that an avalon-framework-4.0.jar
>>> (from 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It
>>> shadows the Avalon framework 4.3 jars that Cocoon depends on and give
>>> a stack trace similar to yours. Remove the faulty jar and try to run
>>> Cocoon again.
>>>
>>> No idea why the 4.0 is included, some transitive dependency must be
>>> faulty. It didn't happen some weeks ago.
>>>
>>> Some other points: jetty:run-exploded seem to do some unnecessary
>>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>>> that you get the whole stack trace. Otherwise it is very hard to see
>>> what is the problem.
>>
>> I have this recurrent problem when running / packaging trunk samples:
>>
>> cocoon_trunk/dists/cocoon-dist-samples> mvn -e package
>> (...)
>> [INFO] [war:war]
>> [INFO] Exploding webapp...
>> [INFO] Copy webapp webResources to
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Assembling webapp cocoon-dist-samples in
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Expanding:
>> /home/prefondini/.m2/repository/org/apache/cocoon/cocoon-webapp/2.2.0-M2-SNAPSHOT/cocoon-webapp-2.2.0-M2-SNAPSHOT.war
>> into
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/war/work/cocoon-webapp-2.2.0-M2-SNAPSHOT
>>
>> [INFO] Overlaying 1 war(s).
>> [INFO] Generating war
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>>
>> [INFO] Building war:
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>>
>> [INFO] [cocoon:deploy {execution: default}]
>> [INFO] Exploding webapp...
>> [INFO] Copy webapp webResources to
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO] Assembling webapp cocoon-dist-samples in
>> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [ERROR] FATAL ERROR
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] null
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Trace
>> java.lang.NullPointerException
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600)
>>
>> at
>> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379)
>>
>> at
>> org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182)
>>
>> at
>> org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64)
>>
>> at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>>
>> at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>>
>> 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)
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 15 seconds
>> [INFO] Finished at: Tue Nov 28 14:31:29 CET 2006
>> [INFO] Final Memory: 12M/23M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>> The problem seems to happen at cocoon:deploy ... But the above
>> stacktrace does not seem very useful, at least to me...
>>
>> Although it's not as FATAL as it claims. It does not prevent me to
>> successfully use mvn jetty:run afterward.
>> I could even successfully deploy and run the produced
>> cocoon-samples.war in apache-tomcat-5.5.20
>>
>>
>> Test Context:
>>
>> Cocoon trunk at revision 480034
>> Java version "1.5.0_09" on Linux
>> (I will test that on MacOSX jdk 1.5 soon and report).
>> Maven version: 2.0.4
>>
>> Patrick
> The cocoon:deploy plugin expects a certain directory to be present, that
> is created a little bit later in the plugin. If you build it twice it
> will work. See
> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2 and
> the rest of the thread.
and as being said, the deployer isn't really necessary if you don't need
shielding or want to patch your web.xml.
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Patrick Refondini skrev:
> Daniel Fagerstrom wrote:
>> Luca Morandini skrev:
>>> Patrick Refondini wrote:
>>>>
>>>> shouldn't it be :
>>>> -Dmaven.war.shieldingclassloader=false
>>>
>>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>>
>>> I did:
>>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>>> clean install
>>> cd core/cocoon-webapp
>>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>>
>> I have had problems lately with that an avalon-framework-4.0.jar
>> (from 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It
>> shadows the Avalon framework 4.3 jars that Cocoon depends on and give
>> a stack trace similar to yours. Remove the faulty jar and try to run
>> Cocoon again.
>>
>> No idea why the 4.0 is included, some transitive dependency must be
>> faulty. It didn't happen some weeks ago.
>>
>> Some other points: jetty:run-exploded seem to do some unnecessary
>> extra work compared to jetty:run. Use the -e switch for jetty:run so
>> that you get the whole stack trace. Otherwise it is very hard to see
>> what is the problem.
>
> I have this recurrent problem when running / packaging trunk samples:
>
> cocoon_trunk/dists/cocoon-dist-samples> mvn -e package
> (...)
> [INFO] [war:war]
> [INFO] Exploding webapp...
> [INFO] Copy webapp webResources to
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>
> [INFO] Assembling webapp cocoon-dist-samples in
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>
> [INFO] Expanding:
> /home/prefondini/.m2/repository/org/apache/cocoon/cocoon-webapp/2.2.0-M2-SNAPSHOT/cocoon-webapp-2.2.0-M2-SNAPSHOT.war
> into
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/war/work/cocoon-webapp-2.2.0-M2-SNAPSHOT
>
> [INFO] Overlaying 1 war(s).
> [INFO] Generating war
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>
> [INFO] Building war:
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
>
> [INFO] [cocoon:deploy {execution: default}]
> [INFO] Exploding webapp...
> [INFO] Copy webapp webResources to
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>
> [INFO] Assembling webapp cocoon-dist-samples in
> /smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] null
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at
> org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704)
>
> at
> org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680)
>
> at
> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600)
>
> at
> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379)
>
> at
> org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182)
>
> at
> org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
>
> 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)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 15 seconds
> [INFO] Finished at: Tue Nov 28 14:31:29 CET 2006
> [INFO] Final Memory: 12M/23M
> [INFO]
> ------------------------------------------------------------------------
>
> The problem seems to happen at cocoon:deploy ... But the above
> stacktrace does not seem very useful, at least to me...
>
> Although it's not as FATAL as it claims. It does not prevent me to
> successfully use mvn jetty:run afterward.
> I could even successfully deploy and run the produced
> cocoon-samples.war in apache-tomcat-5.5.20
>
>
> Test Context:
>
> Cocoon trunk at revision 480034
> Java version "1.5.0_09" on Linux
> (I will test that on MacOSX jdk 1.5 soon and report).
> Maven version: 2.0.4
>
> Patrick
The cocoon:deploy plugin expects a certain directory to be present, that
is created a little bit later in the plugin. If you build it twice it
will work. See
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116414054703369&w=2 and
the rest of the thread.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Patrick Refondini <pa...@pobox.com>.
Daniel Fagerstrom wrote:
> Luca Morandini skrev:
>> Patrick Refondini wrote:
>>>
>>> shouldn't it be :
>>> -Dmaven.war.shieldingclassloader=false
>>
>> Thanks for this bit of information, but Cocoon doesn't run yet.
>>
>> I did:
>> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false
>> clean install
>> cd core/cocoon-webapp
>> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
>
> I have had problems lately with that an avalon-framework-4.0.jar (from
> 2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
> Avalon framework 4.3 jars that Cocoon depends on and give a stack trace
> similar to yours. Remove the faulty jar and try to run Cocoon again.
>
> No idea why the 4.0 is included, some transitive dependency must be
> faulty. It didn't happen some weeks ago.
>
> Some other points: jetty:run-exploded seem to do some unnecessary extra
> work compared to jetty:run. Use the -e switch for jetty:run so that you
> get the whole stack trace. Otherwise it is very hard to see what is the
> problem.
I have this recurrent problem when running / packaging trunk samples:
cocoon_trunk/dists/cocoon-dist-samples> mvn -e package
(...)
[INFO] [war:war]
[INFO] Exploding webapp...
[INFO] Copy webapp webResources to
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
[INFO] Assembling webapp cocoon-dist-samples in
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
[INFO] Expanding:
/home/prefondini/.m2/repository/org/apache/cocoon/cocoon-webapp/2.2.0-M2-SNAPSHOT/cocoon-webapp-2.2.0-M2-SNAPSHOT.war
into
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/war/work/cocoon-webapp-2.2.0-M2-SNAPSHOT
[INFO] Overlaying 1 war(s).
[INFO] Generating war
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
[INFO] Building war:
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples.war
[INFO] [cocoon:deploy {execution: default}]
[INFO] Exploding webapp...
[INFO] Copy webapp webResources to
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
[INFO] Assembling webapp cocoon-dist-samples in
/smartgene/work/cocoon_trunk/dists/cocoon-dist-samples/target/cocoon-samples
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at
org.apache.maven.plugin.war.AbstractWarMojo.unpack(AbstractWarMojo.java:704)
at
org.apache.maven.plugin.war.AbstractWarMojo.unpackWarToTempDirectory(AbstractWarMojo.java:680)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:600)
at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:379)
at
org.apache.cocoon.maven.deployer.AbstractDeployMojo.deployMonolithicCocoonAppAsWebapp(AbstractDeployMojo.java:182)
at
org.apache.cocoon.maven.deployer.DeployExplodedMojo.execute(DeployExplodedMojo.java:64)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
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)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Tue Nov 28 14:31:29 CET 2006
[INFO] Final Memory: 12M/23M
[INFO]
------------------------------------------------------------------------
The problem seems to happen at cocoon:deploy ... But the above
stacktrace does not seem very useful, at least to me...
Although it's not as FATAL as it claims. It does not prevent me to
successfully use mvn jetty:run afterward.
I could even successfully deploy and run the produced cocoon-samples.war
in apache-tomcat-5.5.20
Test Context:
Cocoon trunk at revision 480034
Java version "1.5.0_09" on Linux
(I will test that on MacOSX jdk 1.5 soon and report).
Maven version: 2.0.4
Patrick
>
> /Daniel
>
Re: Trying to start Cocoon 2.2
Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Luca Morandini skrev:
> Patrick Refondini wrote:
>>
>> shouldn't it be :
>> -Dmaven.war.shieldingclassloader=false
>
> Thanks for this bit of information, but Cocoon doesn't run yet.
>
> I did:
> mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean
> install
> cd core/cocoon-webapp
> mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
I have had problems lately with that an avalon-framework-4.0.jar (from
2002!) is included in target/cocoon-webapp/WEB-INF/lib. It shadows the
Avalon framework 4.3 jars that Cocoon depends on and give a stack trace
similar to yours. Remove the faulty jar and try to run Cocoon again.
No idea why the 4.0 is included, some transitive dependency must be
faulty. It didn't happen some weeks ago.
Some other points: jetty:run-exploded seem to do some unnecessary extra
work compared to jetty:run. Use the -e switch for jetty:run so that you
get the whole stack trace. Otherwise it is very hard to see what is the
problem.
/Daniel
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Patrick Refondini wrote:
>
> shouldn't it be :
> -Dmaven.war.shieldingclassloader=false
Thanks for this bit of information, but Cocoon doesn't run yet.
I did:
mvn -Dmaven.test.skip=true -Dmaven.war.shieldingclassloader=false clean
install
cd core/cocoon-webapp
mvn jetty:run-exploded -Dorg.apache.cocoon.mode=dev
But...
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2006-11-27 15:36:32.609:/:INFO: Loading Spring root WebApplicationContext
2006-11-27 15:36:34.218:/:INFO: Apache Cocoon 2.2.0-M2-SNAPSHOT is
running in mode: dev
2006-11-27 15:36:34.718::WARN: failed
ContextHandler@41f227{/,file:/C:/apps/cocoon-2.2-dev/core/cocoon-webapp/target/cocoon-webapp/}
2006-11-27 15:36:34.718::WARN: failed ContextHandlerCollection@1811e2c
2006-11-27 15:36:34.718::WARN: failed HandlerCollection@1e40274
2006-11-27 15:36:34.781::INFO: Started SelectChannelConnector @
0.0.0.0:8888
2006-11-27 15:36:34.781::WARN: failed Server@1be0369
[INFO] Jetty server exiting.
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failure
Embedded error: Cannot invoke listener
org.springframework.web.context.ContextLoaderListener@5e9f1
Couldn't find the sitemap /sitemap.xmap
(same error with ./start.sh, by the way).
Any clue ?
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 26, 2006, at 10:34 PM, Patrick Refondini wrote:
> shouldn't it be :
> -Dmaven.war.shieldingclassloader=false
>
> Just to make sure.
um... yes.
Anyway, it definitely has "shield", "class", and "load" in it
somewhere. That much I'm sure of... :-/
cheers,
—ml—
Re: Trying to start Cocoon 2.2
Posted by Patrick Refondini <pa...@pobox.com>.
Mark Lundquist wrote:
>
> On Nov 26, 2006, at 2:44 PM, Luca Morandini wrote:
>
>> I built Cocoon with: mvn -Dmaven.test.skip=true
>> -Dshieldedclassloading=false clean install
>>
>> and run within the Jetty mvn plugin, but no joy.
>>
>> Is the name of this property correct ?
>
>
> oops, my bad... no, it should be "shieldedclassloader".
>
> —ml—
>
Looking at the source:
/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/AbstractDeployMojo.java:
* @parameter expression="${maven.war.shieldingclassloader}"
shouldn't it be :
-Dmaven.war.shieldingclassloader=false
Just to make sure.
Patrick
Re: Trying to start Cocoon 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 26, 2006, at 2:44 PM, Luca Morandini wrote:
> I built Cocoon with: mvn -Dmaven.test.skip=true
> -Dshieldedclassloading=false clean install
>
> and run within the Jetty mvn plugin, but no joy.
>
> Is the name of this property correct ?
oops, my bad... no, it should be "shieldedclassloader".
—ml—
Re: Trying to start Cocoon 2.2
Posted by Luca Morandini <lm...@ieee.org>.
Mark Lundquist wrote:
>
> On Nov 26, 2006, at 1:07 PM, Luca Morandini wrote:
>
>> Could someone tell me what I'm missing ?
>
> Per some other recent threads: try "-Dshieldedclassloading=false" in
> your mvn.
I built Cocoon with: mvn -Dmaven.test.skip=true
-Dshieldedclassloading=false clean install
and run within the Jetty mvn plugin, but no joy.
Is the name of this property correct ?
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: Trying to start Cocoon 2.2
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Nov 26, 2006, at 1:07 PM, Luca Morandini wrote:
> Could someone tell me what I'm missing ?
Per some other recent threads: try "-Dshieldedclassloading=false" in
your mvn.
cheers,
—ml—