My personal blog

Wednesday, September 19, 2007

Appfuse 2.0: Errors I encountered and how I fixed them

Appfuse 2.0 has finally been released. Instead of using version 1.9.4 (the previous stable release) for an upcoming web project, I decided to use this latest version. The fastest way to learn this new version is through the Quick Start guide. I encountered errors while following this guide. I googled around and found the fixes. For those starting with Appfuse 2.0, here's a list of errors I encountered and what I did to fix them. Note: I may not be able to explain why the fixes fixed the errors.
  1. Error: Executed 'mvn' command and got a 'Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds/Launcher'.

    Fix: Set a M2_HOME environment variable. This should point to your Maven directory. Also, be sure you have JAVA_HOME setup. Appfuse 2.0 requires Maven 2.0.6+ and Java 5+.

  2. Error: After fixing the above error, I got a "Error while expanding /tmp/cargo/installs/apache-tomcat-6.0.14.zip Unexpected end of ZLIB input stream"

    Fix: Delete all files inside /tmp/cargo/installs/ (or whatever directory indicated in your case) and manually download apache-tomcat-6.0.14.zip and put it there.

  3. Error: Executed 'mvn jetty:run-war' and got a "Failed startup of context org.mortbay.jetty.webapp.WebAppContext@4d342f5b
    {/,jar:file:/.../.../.../.../web/target/..-webapp-1.0-SNAPSHOT.war!/}
    java.util.zip.ZipException: error in opening zip file"

    Fix: Delete everything inside ~/.m2/repository and execute the command again. This will download everything again.
I hope this post helps you. If you have other errors you encountered, please share how you fixed them. Thanks!

2 comments:

Unknown said...

Well, it did not help me to delete and place the apache-tomcat-6.0.14.zip file in installs.
Seems to be some bug.
I did extract and pack back to zip file. It helped for me.

Anonymous said...

The tomcat zip file maven downloads seems to be corrupted becuase of which unzip does not happen. I downloaded a copy of the server zip file from apache's site and placed it in the installs folder. and reran the task. It worked.

About Me

Philippines
milObjects Software is a micro ISV by Milo Felipe.

My Amazon Wish List

My Amazon.com Wish List