tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Class cast exception when starting tomcat 7.0.1
Date Fri, 14 Jun 2013 02:36:13 GMT
-----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


Mime
View raw message