I had catalina.jar in WEB-INF/lib. It's needed because we have an 
implementation of Realm to store an encrypted tomcat password users enter in 
the webapp.  If I remove it and add the catalina.jar from tomcat_home/lib to 
the classpath, I have to change the signature from 
org.apache.catalina.realm.RealmBase.Digest(String, String) to 
org.apache.catalina.realm.RealmBase.Digest(String, String, String). Then the 
code compiles ok, but I get this error when building with ant to make a war 
file:

error: method Digest in class RealmBase cannot be applied to given types;
    [javac]                                     encryptedOldPwd = 
RealmBase.Digest(oldTomcatPassword, digestAlg,null);

Should I not be writing code that needs classes from catalina.jar?

Thanks,

Jane

-----Original Message-----
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, June 13, 2013 11:09 AM
To: Tomcat Users List
Subject: Re: Class cast exception when starting tomcat 7.0.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jane,

On 6/13/13 12:38 PM, Jane Muse wrote:
> In the archives I thought the only unreleased versions would be 
> specified "beta". Please let me know if this is not the case.

I'll admit it's not clear from the version number which versions are beta, 
released, etc. You have to look at the ChangeLog:

http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Each release contains a release date and (optionally) a comment on the quality 
of the build. The first non-beta version of Tomcat 7.0.x was 7.0.6. Tomcat 
7.0.1 (distinct from 7.0.10) was actually "not released"
probably because it was broken for some reason.

When the Tomcat team rolls a release, there is a vote. If there aren't enough 
"yes" votes (or any "no" votes), the release is abandoned but the number isn't 
re-used.

Anyhow, there's no reason to attempt to migrate from Tomcat 6.0.x to Tomcat 
7.0.x by shooting for an "early" version of Tomcat 7.0.x: you should go for the 
latest.

Also, if you mistype and say "Tomcat 7.0.1" instead of "Tomcat 7.0.10"
or "Tomcat 7.0.4" instead of "Tomcat 7.0.40" (or "Tomcat 7.0.41"), don't get an 
offended when people tell you you are doing it wrong.
Just say "whoops, I meant 7.0.40" and move on.

Back to your original problem... have you modified the Tomcat 7 installation in 
any way -- other than dropping your WAR file/exploded WAR into the webapps/ 
directory)?

Also, do you have any Tomcat-related JAR files in your webapp's WEB-INF/lib 
directory?

- -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/

iQIcBAEBCAAGBQJRugqsAAoJEBzwKT+lPKRYkwcQALdDoGGk6ZNHg82Ow8vTjjrY
dO/70UaIg69t4TsgIJApzd+ReSMbzrThby4Ok+EkYOEXLC1tZgbbQpTQdx0sjqXc
k7fJl9oRQ/O9UP4lj+PR1iWL0zTX/Ze+eTQLIHiJ6rpNnyqgSOnZujsev1lbbaUZ
A2w8GwiWOPvA17MIQUio1Rr/OKd6s7/02EKJQwbxIRoBh4jdaTalgJXCBKb5+60p
EnNMautisYXQXrdE2hUhMgFX5EIyqPP4PZYxe2EKRRHlGuXnzybYJnuyxDLtGLY7
nTpOfy5LA5xuFLHEruHm7ARUo6Hb8AH2Qvi5saXDsp+6ddh6Fy4Id4JaWODk16Zl
KbPQXk1QjZayw8/nmFkr2gWJc8pGYQMzmeCqSxiJ8FqcrXo/bTq4GJwFazqK4cvE
xfQDLyCNXaNdbskJ3rM336173+j7spUhrVlS8LyZ7B7bRPPOzxt5CmOZ2b3Y5Ti+
uBTc1YUXQ74/gjoZCRet4xtaGwRfKXARVSebP6+33AtneOsAlbXejmz545ccmUWl
T/9c31jchDw+JlpX04KPu5hJzAb+/Jk3HdVG6LGDrB4oKyxcJcmzvREDXzVt+L5q
aPHhnAm8pAHYn1nSAR8k15NL61zDr16CC4ffzWu26c9DfSt9xq3XTg0ESPFv0U4J
kxt8hkkwFdx5ZbXxnFgb
=nulS
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to