Some hints: *) When you run mvn jetty:run you don't have a WebapplicationContext in your url so you can address it like http://localhost:8888/block/ However, when you deploy the warfile in tomcat you do have a webapplicationContext so it will become something like http://localhost:8080/mywebapp/block/ *) Did you make sure you have declared a dependency on the block in your webapp project? *) It's best to disable the reloading classloader when deploying as a war. Use it only while developing for quick prototyping
Kind regards, Robby Pelssers -----Oorspronkelijk bericht----- Van: fls...@googlemail.com namens Florian Schmitt Verzonden: ma 4-10-2010 12:59 Aan: users@cocoon.apache.org Onderwerp: Deploying a Cocoon 2.2 webapp in Tomcat 6.0.20 Hi, i'm quite new regarding cocoon 2.2 and i'm stuck trying to deploy a Cocoon 2.2 webapp in Tomcat 6.0.20. I've spent two days googling, going through the tutorials at cocoon.apache.org and the nice article at http://www.csparks.com/cocoon/c22without, but without any success. I followed those steps to create a minimal webapp : - create a new dir for the complete webapp == create a new block: - in that new dir, run "mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org" - select 2 to create a block, enter groupId, artifactId "block", version and package - change to "block" subdir created by maven, run "mvn install" to build and install "block" in repo; == create a new webapp - change back to parent dir - run "mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org" again - select 3 to create a webap, enter same groupId, artifactId "webapp", same version and same package with new artifactId appended - modified webapp/pom.xml to add the "block" dependency; - change to package subdir created by maven, run "mvn package jetty:run" to build webapp and test it using Jetty; - open http://localhost:8888/block/ - works :-) == deploy it in tomcat - open Tomcat manager app, select webapp/target/webapp-1.0.0.war, hit deploy; - Tomcat replies OK, displaying webapp-1.0.0 as deployed but not started; starting manually fails. :-( - Tomcat log contains the stacktrace attached. I found some hints online regarding class loaders, but i'm not experienced enough to fix this on my own. I tried to add <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> </dependency> to webapp/pom.xml because it seems that Tomcat can't find the javax.servlet.ServletContextListener class, but that didn't help. Are there any step i missed? TIA for any help! florian
<<winmail.dat>>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org