[kaffe] NoSuchMethodError: javax/servlet/ServletContext.setAttribute

Greg Wooledge greg@wooledge.org
Fri Apr 18 16:50:01 2003


--sm4nu43k4a2Rpi4c
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

When I updated my CVS Kaffe source tree today and used it to restart
my Freenet node (stable branch), I got the following errors:

18-Apr-03 7:27:56 PM (freenet.node.Main, main, ERROR): Failed to load servi=
ce: mainport
java.lang.NoSuchMethodError: javax/servlet/ServletContext.setAttribute(Ljav=
a/lang/String;Ljava/lang/Object;)V
        at freenet.interfaces.servlet.ServletContainer.createServletContext=
(ServletContainer.java:140)
        at freenet.interfaces.servlet.MultipleHttpServletContainer.loadCont=
ext(MultipleHttpServletContainer.java:183)
        at freenet.interfaces.servlet.MultipleHttpServletContainer.init(Mul=
tipleHttpServletContainer.java:154)
        at freenet.node.Main.loadService(Main.java:1486)
        at freenet.node.Main.startNode(Main.java:1404)
        at freenet.node.Main.main(Main.java:865)

18-Apr-03 7:27:56 PM (freenet.node.Main, main, ERROR): Failed to load servi=
ce: distribution
java.lang.NoSuchMethodError: javax/servlet/ServletContext.setAttribute(Ljav=
a/lang/String;Ljava/lang/Object;)V
        at freenet.interfaces.servlet.ServletContainer.createServletContext=
(ServletContainer.java:140)
        at freenet.interfaces.servlet.SingleHttpServletContainer.init(Singl=
eHttpServletContainer.java:52)
        at freenet.node.Main.loadService(Main.java:1486)
        at freenet.node.Main.startNode(Main.java:1404)
        at freenet.node.Main.main(Main.java:865)

Since this same Freenet build worked with Kaffe before I updated
CVS, I suspect that a change in Kaffe is the immediate cause, but
I'm writing to both projects' lists just in case there is some
deeper problem in Freenet which is merely being exposed by a more
rigorous Java platform.

javax.servlet.ServletContext is part of the freenet-ext.jar file,
defined thus:

package javax.servlet;
public interface ServletContext {
    ...
    public void setAttribute(String name, Object object);
}

I don't understand why this error is occurring, given this definition.
It certainly looks all right to me.  So, being a simple but practical
person, I did a 'cvs -z3 update -dP -D "1 day ago"' (CVS/Tag =3D
D2003.04.17.23.42.42) and built that and used it.  Freenet then
started normally again.

--=20
Greg Wooledge                  |   "Truth belongs to everybody."
greg@wooledge.org              |    - The Red Hot Chili Peppers
http://wooledge.org/~greg/     |

--sm4nu43k4a2Rpi4c
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (OpenBSD)

iD8DBQE+oI94kAkqAYpL9t8RAuMvAKCFWbKbz0VPOvdkLotXQGTQtyNBGgCcDQs1
rOaT+WTttfTq1qca+Zgqojk=
=P9NO
-----END PGP SIGNATURE-----

--sm4nu43k4a2Rpi4c--