Trusting your tools

After Grzegorz’s piping up, I’m giving cocoon 2.2 another try. Here are some selected errors.

  javax.servlet.ServletException: No block for /favicon.ico
          at org.apache.cocoon.servletservice.DispatcherServlet.service(
          at javax.servlet.http.HttpServlet.service(
          at org.mortbay.jetty.servlet.ServletHolder.handle(
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
          at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
          at org.apache.cocoon.servlet.DebugFilter.doFilter(
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
          at org.mortbay.jetty.servlet.ServletHandler.handle(
          at org.mortbay.jetty.servlet.SessionHandler.handle(
          at org.mortbay.jetty.handler.ContextHandler.handle(
          at org.mortbay.jetty.webapp.WebAppContext.handle(
          at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
          at org.mortbay.jetty.handler.HandlerCollection.handle(
          at org.mortbay.jetty.handler.HandlerWrapper.handle(
          at org.mortbay.jetty.Server.handle(
          at org.mortbay.jetty.HttpConnection.handleRequest(
          at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
          at org.mortbay.jetty.HttpParser.parseNext(
          at org.mortbay.jetty.HttpParser.parseAvailable(
          at org.mortbay.jetty.HttpConnection.handle(
          at org.mortbay.thread.BoundedThreadPool$

How fabulous! 30 lines to tell me about a 404 I couldn’t care less about! (this is from mvn jetty:run). And in the process, obliterating any messages I did care about.

  [ERROR] VM #displayTree: error : too few arguments to macro. Wanted 2 got 0
  [ERROR] VM #menuItem: error : too few arguments to macro. Wanted 1 got 0
  [INFO] ------------------------------------------------------------------------
  [INFO] ------------------------------------------------------------------------

There’s an error, but the build was successful. That makes sense. Not.(from mvn site).

  Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: TEXT must be immediately followed by END_TAG and not START_TAG (position: START_TAG seen ...<reports>n            <report>... @118:21)
          at org.codehaus.plexus.util.xml.pull.MXParser.nextText(
          at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(
          ... 17 more
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2 seconds
  [INFO] Finished at: Sun Jan 27 22:25:35 GMT 2008
  [INFO] Final Memory: 1M/2M
  [INFO] ------------------------------------------------------------------------

XML parser exception (and in only 40+ lines!). Complaining about unbalanced tags? Must be non-well-formed XML, right? Wrong. This is down to copying an example from “Better builds with maven”. But the example’s wrong—I’m missing a tag. Can you guess what’s missing from this XML?


You mean you didn’t spot the missing reportSet element? I’m shocked, I tell you, shocked. Plus the lack of indication that an error actually occurred. The stacktrace is a good indication, but an actual “ERROR” or “BUILD FAILED” message would be nice (there is an error line, but it zoomed past three screens ago. I blinked and missed it).

So that’s two strikes to maven and one to cocoon. My trust in them is basically non-existent at this point. But at least the RCL worked as documented.

3 replies on “Trusting your tools”

It gets better!

I’ve just found target/work/log/log4j.log. In one hour, this has built up to 28,000 lines of debug output. which used to log to the console in Cocoon 2.1 now no longer does so. Instead, it disappears into the above behemoth.

Hello Dominic.

I’m going to address your points again.

“How fabulous! 30 lines to tell me about a 404 I couldn’t care less about! (this is from mvn jetty:run).”

I think it’s not such a big deal but I decided to fix it, see

When it comes to mvn site. I haven’t used this command to much so I cannot comment but I would like to point you out that whole Cocoon’s site is built using mvn site and as you can see at it works pretty well. This site isn’t trivial.

The fact that our site build with mvn site quite well does not prove Maven hasn’t flaws. It has and I expressed my own signs of disappointment here

Nevertheless, after a while I got used to some amount of bugs (every big project has them, remember that) and now I’m really happy with it and I do trust Maven. When working on Cocoon’s trunk, after typing mvn install I get build failure I trust Maven enough to always look at me as the cause of that failure.

“I’ve just found target/work/log/log4j.log. In one hour, this has built up to 28,000 lines of debug output.”

It’s so verbose because you are running in dev mode (which is default when you run block using jetty:run). See

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s