Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DDDD81093E for ; Fri, 14 Jun 2013 02:37:04 +0000 (UTC) Received: (qmail 76911 invoked by uid 500); 14 Jun 2013 02:37:01 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 76708 invoked by uid 500); 14 Jun 2013 02:37:00 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 76692 invoked by uid 99); 14 Jun 2013 02:36:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jun 2013 02:36:59 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [76.96.62.17] (HELO qmta10.westchester.pa.mail.comcast.net) (76.96.62.17) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Jun 2013 02:36:54 +0000 Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta10.westchester.pa.mail.comcast.net with comcast id o11U1l0040mv7h05A2cDCQ; Fri, 14 Jun 2013 02:36:13 +0000 Received: from Christophers-MacBook-Pro.local ([69.143.106.98]) by omta11.westchester.pa.mail.comcast.net with comcast id o2cD1l00L27QCxh3X2cD0Z; Fri, 14 Jun 2013 02:36:13 +0000 Message-ID: <51BA819D.6030107@christopherschultz.net> Date: Thu, 13 Jun 2013 22:36:13 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Class cast exception when starting tomcat 7.0.1 References: <99C8B2929B39C24493377AC7A121E21FC4B5894442@USEA-EXCH8.na.uis.unisys.com> <58be3f70c0fb4dd0bd1366364ab2f35e@wal-s-mbx2.rocketsoftware.com> <99C8B2929B39C24493377AC7A121E21FC4B59ED49F@USEA-EXCH8.na.uis.unisys.com> <99C8B2929B39C24493377AC7A121E21FC4B59EDD2C@USEA-EXCH8.na.uis.unisys.com> <37bce4ca912247e4af7b90c237e19af6@den-s-mbx4.rocketsoftware.com> <99C8B2929B39C24493377AC7A121E21FC4B59EDE09@USEA-EXCH8.na.uis.unisys.com> <8203fc7f47ad417b9a634277dcd625c6@den-s-mbx4.rocketsoftware.com> <51BA0AAC.7040102@christopherschultz.net> <62c08125e6654ae8b9e203267b1d5737@den-s-mbx4.rocketsoftware.com> <99C8B2929B39C24493377AC7A121E21FC4B5B32F36@USEA-EXCH8.na.uis.unisys.com> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1371177373; bh=vRFokhqu5efGKGCaauz7sjPJAm6g99bxk4CUljyKWbA=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=LCA16DPYiNTHA82xzjujGimOO/2jqwU/TTZuUQ1eMi261t46XqFIe2x/XD7zpPije lLHgQtt0BfWq7qCUlOX7ip6EsIPJb+Ydn8I+5B4iPuiBAeU8IzzS8bXGMw/bRLJ0V+ zcQ6wDarAzQ4+HJpHV7Hq96cg8ncr5AJGEuN/JGDnKI3cCvyiSBoXrqIMNFUeZtjt1 gLvQCht4TDsG5+EJU3YRP3ZHQNNUNlAHH2q+nCULg6Km5QASo9VpMZD2XCQhSkld4a HVs/VD2tzER/lLKZ7Fl3/tRBTDxf1D2HtbstgmqfxzsYwY4QQaff1IB+tLX4Z/6+Gb emuIVWos/Zt4g== X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jane, On 6/13/13 6:44 PM, Jane Muse wrote: > I'm using the standard implementation of Realm. Here's the code > > //Validate passwords try { if (oldTomcatPassword != null && > !"".equals(oldTomcatPassword.trim())) { TomcatConfig tconf = > TomcatConfig.getInstance(); String digestAlg = > tconf.getTomcatPwdEncryptionType(); String encryptedOldPwd = > oldTomcatPassword; if (digestAlg != null) encryptedOldPwd = > RealmBase.Digest(oldTomcatPassword, digestAlg); if > (!encryptedOldPwd.equals(tconf.getEncryptedTomcatPwd(tomcatUserName))) > { errors.add("incorrectPwd", new > ActionError("error.password.incorrect")); } } I'm not sure this is any different than the built-in Tomcat digest-based realms. Why not just use the available ones and discard your own realm? > As I said, it no longer compiles with catalina.jar from Tomcat > 7.0.41. This is not a surprise, that the signature would change, > and I changed the code accordingly. Now it is: > > encryptedOldPwd = RealmBase.Digest(oldTomcatPassword, digestAlg, > encodedType); > > Compiles fine now. > > . However, when I build with ant, it says actual and formal > argument lists differ in length. I don't know why there's an actual > and a formal argument list. I swapped out catalina.jar. So, it complies "fine" except not when you build with ant? In what situation does it compile "fine", then? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJRuoGcAAoJEBzwKT+lPKRYeiYP+gI32KTIuZ5KO2B6GSthwTHl +C30U4F16Wy1TGRuE5x876hlD/DKQP0DCzfk8D2rUsdQ/GqujQpt28hgtKHdBzij ffHjs90S4lawDjiAxZyU6ZeiHT6g/r66gtCoQXMbN/s8Geur433XqLDWHDHIzloi HpZDbLbbeDr+X06UYir037Xt34fMRAyahDCrCW25nJIOaPE/7ckAeiOsDjbBYWx1 G1/KJ5iE3WfysiERnmh7sFH0wt1g5b2B6BmmbNUGKP8lZNdpbmT8GeCcKfS3SR7e J+onHNVcxEihwdZ1+5121npQlL9F4rxenO3u6StcLqYowL+++ysYt+wb2J9pI69E Mw2Cpt83Ig1FtDnXSDd4g5jvj98yaZlqxAkT0JEDY6sHW70CpATJrFLoUwIHzAtE VmRjVBDI5oVCOaGbz6pY53ZnM3eSrG/CiU4OVyzSAH9geKc093poRoE0pOiwGFIx v1iG4Nj+LAsOPQjHyBPqtmd10htSxoScvy6tcVleava1uonSazsWKJbz4HDRv4ht H+f+CC6KAfraMVWkCegB9PPxiWcfUnzeo49EfKWcNPspsIUCWYaXR90yvxYlssjb jqlPp1sc1K7js6aTxeddTtmFPXXhpkFfs0UNmKJ0jZkd0IMQCVQt7dal26/JhbTY I/sOTgQ+9mYooxZk9YkO =S8rU -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org