Thank you. I added jetty-util and servlet-api and it worked.
It is strange though, that a missing jetty-util library makes kawa
behave like jetty is missing as well (when in fact it doesn't). If I
have only jetty and jetty util in classpath, but no servlet-api, I get
a NoClassDefFoundError, which is great because I know what's wrong.
> I used this command line:
> java -classpath /home/john/kawa-1.11/kawa-1.11.jar:jetty.jar:/usr/share/java/jetty-util.jar:/usr/share/tomcat5.5/common/lib/servlet-api.jar kawa.repl
> and then from the REPL
> #|kawa:1|# (org.mortbay.jetty.Server:start (org.mortbay.jetty.Server 8094))
> 2011-12-02 15:40:40.158:INFO::jetty-6.1.22
> 2011-12-02 15:40:40.289:INFO::Started SocketConnector@0.0.0.0:8094
> and was able to point my browser to localhost:8094 and see a Jetty response.
> I started out with exactly the same error as you.
> However, I found the clues from using (require <org.mortbay........ )
> This told me that Jetty needed the jetty-util.jar and servlet-api.jar files as dependencies.
> Hope that helps.
> ----- Original Message -----
> From: Răzvan Rotaru <razvan.rotaru@...>
> To: kawa@... > Cc:
> Sent: Friday, 2 December 2011, 12:49
> Subject: strange problem with jetty
> I'm having some strange problems with launching Jetty from Kawa. I am
> launching "java kawa.repl", with jetty-6.1.26.jar in the classpath,
> but the classes are not available:
> #|kawa:1|# (org.mortbay.jetty.Server 8080)
> /dev/stdin:1:1: warning - no declaration seen for org.mortbay.jetty.Server
> /dev/stdin:1:1: unbound location org.mortbay.jetty.Server
> at gnu.mapping.Location.get(Location.java:67)
> at atInteractiveLevel$1.run(stdin:1)
> at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:284)
> at gnu.expr.ModuleExp.evalModule(ModuleExp.java:185)
> at kawa.Shell.run(Shell.java:281)
> at kawa.Shell.run(Shell.java:194)
> at kawa.Shell.run(Shell.java:175)
> at kawa.repl.main(repl.java:848)
> Any ideas what the problem could be. Classes from other jars, which
> are also in the classpath have no problems.