Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hudson is a continuous integration engine that runs as a Java Servlet in tomcat. https://hudson.dev.java.net/

I have Tomcat 5.5 successfully installed on my CentOS 5.3 system. I can see and interact with it on port 8080.

I can upload the hudson.war file which reports success and appears to unpack everything correctly into the webapps directory.

However, when I attempt to start the hudson application from the tomcat web application manager page it fails reporting "FAIL - application at context path /hudson could not be started."

The balancer, admin, and other default webapps appear to start correctly.

SELinux is enabled on this system, which has caused me some trouble in the past. Not sure if it is relevant to this case.

The tomcat log looks like this:

8-Jul-09 4:32:15 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application at '/hudson'
8-Jul-09 4:32:16 PM hudson.WebAppMain contextInitialized
SEVERE: Failed to initialize Hudson
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.installLogger(WebAppMain.java:227)
   at hudson.WebAppMain.contextInitialized(WebAppMain.java:112)
   at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.so)

   ... snip ...

   at java.lang.Class.initializeClass(libgcj.so.7rh)
   ...24 more
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class hudson.WebAppMain
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.installLogger(WebAppMain.java:227)
   at hudson.WebAppMain.contextInitialized(WebAppMain.java:112)
   at org.apache.catalina.core.StandardContext.listenerStart(catalina-5.5.23.jar.so)

   ... snip ... 

   at org.apache.catalina.loader.WebappClassLoader.loadClass(catalina-5.5.23.jar.so)
   at java.lang.Class.forName(libgcj.so.7rh)
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   ...24 more
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/hudson] startup failed due to previous errors
8-Jul-09 4:32:16 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class hudson.WebAppMain
java.lang.NoClassDefFoundError: hudson.model.Hudson
   at java.lang.Class.initializeClass(libgcj.so.7rh)
   at hudson.WebAppMain.contextDestroyed(WebAppMain.java:280)
   at org.apache.catalina.core.StandardContext.listenerStop(catalina-5.5.23.jar.so)

   ... snip ... 

   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(tomcat-util-5.5.23.jar.so)
   at java.lang.Thread.run(libgcj.so.7rh)
8-Jul-09 4:32:16 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
share|improve this question
add comment

2 Answers

java.lang.NoClassDefFoundError: hudson.model.Hudson

Looks like the class loader is unable to load the classes and it might be a permissions issue due to SELinux.

Can you try running the embedded version of Hudson, just to clear out that it can work on your system?

share|improve this answer
    
Yep ran "java -jar hudson.war --javaHome=/usr/java/latest --httpPort=1000" as root and things look good. I see the hudson page and can interact with it. –  nolandda Jul 9 '09 at 19:27
1  
Root? What about tomcat or an unprivileged user? –  Robert Munteanu Jul 9 '09 at 20:16
    
It works as the non privileged tomcat user (as long as I bind it to a non-privileged port of course). –  nolandda Jul 9 '09 at 21:35
add comment
up vote 1 down vote accepted

I wasn't able to resolve this through configuration, so I took a lesson from Aliens and nuked it from orbit. It is, after all, the only way to be sure.

After clearing out the version installed by my package manager (yum) I went to the tomcat site and downloaded, installed, and configured their binary release of Tomcat 5.5 Core and Administration Web Application.

After that I had a few minor permissions issues, modified the script they keep in $CATALINA_HOME/bin/jsvc-src/native/Tomcat5.sh to run tomcat as a daemon, and now everything seems to work well.

I know, not a very satisfying answer, but I couldn't afford to bang my head against it any longer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.