tags:

views:

471

answers:

2

I have started to look at Hudson as a replacement for CruiseControl. I would like to use it to monitor external jobs as well. I have tried to follow the advice on this page: Monitoring External Jobs

When I run this command:

java -jar hudson-core-1.309.jar
I get this error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
        at hudson.EnvVars.initMaster(EnvVars.java:197)
        at hudson.EnvVars.(EnvVars.java:192)
        at hudson.Main.getHudsonHome(Main.java:71)
        at hudson.Main.run(Main.java:61)
        at hudson.Main.main(Main.java:53)
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
+1  A: 

Add servlet.jar to the executing classpath. hudson-core-1.309.jar is built to run in a web container and thus doesn't have that included.

stevedbrown
I am running hudson stand alone (ie: "java -jar hudson.war"). There is no servlet.jar inside hudson.war. Or, at least not in side the expanded war directory that is created.
abendigo
Right - I think that the above means that Hudson needs to have a servlet.jar or at least a servlet-api.jar on the classpath to find HttpServletRequest.
stevedbrown
A: 

http://n2.nabble.com/hudson-monitoring-external-jobs-tp3771019p3771019.html

Michael Alsen
It would be nice to expand a little on that link
Michael Donohue

related questions