I test my blocks in maven/jetty. After everything works I do the
following:
1. Build myBlock jar file and update maven repository. I assume that
version number is 1.0, version number is defined in myBlock pom file
cd /.../cocoon-2.2.0/myBlock
mvn package
mvn install:install-file -DgroupId=my.domain -DartifactId=myBlock -
Dversion=1.0 -Dpackaging=jar -Dfile=target/myBlock-1.0.jar
2. Package cocoon-webapp. This will create cocoon-webapp-1.0.war file
cd /.../cocoon-2.2.0/cocoon-webapp
mvn package
3. Test cocoon-webapp in maven/jetty
cd /.../cocoon-2.2.0/cocoon-webapp
mvn jetty:run
http://localhost:8888/myBlock/
4. To test in tomcat put cocoon-webapp-1.0.war file in tomcat/webapps
and start the application with url similar to this
http://localhost:8080/cocoon-webapp-1.0/myBlock/
Barbara
On 13 Jul, 2008, at 5:06 pm, David Legg wrote:
In true detective style I'm trying to work out whodunnit! It's
probably the butler! but in case it's not I'd appreciate any help.
I've successfully built a Cocoon block and a brand new Cocoon
generator and between them created a pipline to produce some HTML.
When I change into the Cocoon block's directory and type 'mvn
jetty:run' all is well and I can view the block's output in a
browser with no trouble.
I now want to create a Cocoon web application block in order to
generate a war file and also begin adding other blocks to handle
other aspects of the web application. I've followed (and edited!)
the tutorials so I wasn't expecting any problems here... but I
wasn't so lucky!
Having created the web app block (as per the deployment tutorial
[1]) I updated the pom file so that the web app block knew about
the other blocks. When I changed into the Web app block's
directory and ran 'mvn jetty:run' I noticed a lot of messages
scroll off the screen but Jetty seemed to launch ok. However when
I try viewing the output in a browser I get 404 errors. So it
looks like Jetty is running but the browser requests are either not
being passed on to Cocoon at all or the Cocoon web app block is not
passing the request on to the appropriate Cocoon block underneath it.
The trouble is I'm looking at a lot of messages from various
systems that mean nothing to me.
When I looked at the messages that scrolled off the screen they
contained the following: -
[...]
2008-07-13 12:57:46.840::INFO: jetty-6.1.7
2008-07-13 12:57:53.708::INFO: No Transaction manager found - if
your webapp requires one, please configure one.
log4j:WARN No appenders could be found for logger
(org.springframework.util.ClassUtils).
log4j:WARN Please initialize the log4j system properly.
2008-07-13 12:57:55.126::WARN: failed
[EMAIL PROTECTED]/,D:
\projects\meerkat\meerkat-webapp\target\meerkat-webapp-1.0-SNAPSHOT}
java.lang.AbstractMethodError:
org.slf4j.impl.Log4jLoggerAdapter.trace(Ljava/lang/String;)V
at org.apache.commons.logging.impl.SLF4JLog.trace
(SLF4JLog.java:82)
at
org.springframework.core.CollectionFactory.createConcurrentMapIfPossib
le(CollectionFactory.java:195)
at org.springframework.web.context.ContextLoader.<clinit>
(ContextLoader.java:153)
at
org.springframework.web.context.ContextLoaderListener.createContextLoa
der(ContextLoaderListener.java:53)
at
org.springframework.web.context.ContextLoaderListener.contextInitializ
ed(ContextLoaderListener.java:44)
at org.mortbay.jetty.handler.ContextHandler.startContext
(ContextHandler.java:540)
[...]
It looks like I've got a lot of homework to do...
Should I be worried about not having a transaction manager?
Do I need appenders for my logger?
What might cause a java.lang.AbstractMethod error and where do I
start looking?
I'm willing to add additional documentation to the site but I
suspect there are some fundamental things I need to add to the
tutorial like how to set up the logger, how to do simple spring
bean configuration and how the Cocoon web application archetype works.
Regards,
David Legg
[1] http://cocoon.apache.org/2.2/1362_1_1.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]