Hi, Make sure you only have one version of the servlet API jar in your classpath. It should be in $CATALINA_HOME/common/lib -- make sure there's only one there. Further, make sure you don't have any servlet JARs in your WEB-INF/lib directory.
Yoav Shapira http://www.yoavshapira.com >-----Original Message----- >From: Rob Tanner [mailto:[EMAIL PROTECTED] >Sent: Monday, November 08, 2004 2:36 PM >To: 'Tomcat Users List' >Subject: What worke on 4.1.27 fails of 4.1.31 > >I upgraded my development station to tomcat 4.1.31 from 4.1.27 and from >j2sdk1.4.2_02 to j2sdk1.4.2_06. The following unchanged snippet now throws >a >NoSuchMethodError exception: > > env.put(Context.SECURITY_PRINCIPAL, BIND_DN); > env.put(Context.SECURITY_CREDENTIALS, password); > env.put(Context.SECURITY_AUTHENTICATION, "simple"); > > ctx = new InitialDirContext(env); > > session = request.getSession(); > > session.setAttribute("sess.context", ctx); > session.setAttribute("sess.env", env); > session.setAttribute("sess.uid", uid); > session.setAttribute("sess.dn", BIND_DN); > session.setAttribute("sess.valid", "true"); > > >The exception is thrown on the first session.setAttribute() statement (line >110 in the java source). I have included the top of the stack trace below >(lines wrapped for readability): > >java.lang.NoSuchMethodError:\ > javax.servlet.http.HttpSessionBindingEvent.<init>\ > (Ljavax/servlet/http/HttpSession;Ljava/lang/String;Ljava/lang/Object;)V >at org.apache.catalina.session.\ > StandardSession.setAttribute(StandardSession.java:1231) >at org.apache.catalina.session.\ > StandardSessionFacade.setAttribute(StandardSessionFacade.java:144) >at ClassListAdministrator.doGet(ClassListAdministrator.java:110) > >Another much more complex servlet that I moved over but that does not >require >the use of sessions works fine, so I think the basic installation is okay. >Any idea why that error's coming up on sessions? > >Thanks, >Rob > > >-- >Rob Tanner >UNIX Services Manager >Linfield College, McMinnville OR > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
