tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Jeremy Carter" <vizo...@yahoo.com>
Subject Unable to generate pw hash on cmd line since 7.0.16
Date Tue, 26 Jul 2011 15:37:15 GMT
Since upgrading to Tomcat 7.0.16, the command line noted at http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html
hasn't worked for me.  I've been unable to find any answers from google, other than some
references that seem to say I'm missing tomcat-util.jar on my classpath (which I'm not). 
I did narrow the problem down to catalina.jar.  If I copy an old version into the lib directory,
overwriting the new copy, it works again.  Am I doing something wrong, or is this a bug? 
See below for examples of running the command with various versions.

OS: Windows XP and Windows Server 2003

Thanks,
Jeremy C.

C:\Code\tomcattest>java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

C:\Code\tomcattest>dir /ad /b
apache-tomcat-7.0.11
apache-tomcat-7.0.12
apache-tomcat-7.0.14
apache-tomcat-7.0.16
apache-tomcat-7.0.19

C:\Code\tomcattest>set classpath
classpath=c:\code\tomcattest\apache-tomcat\bin\tomcat-juli.jar;c:\code\tomcattest\apache-tomcat\lib\catalina.jar;c:\code\tomcattest\apache-tomcat\lib\tomcat-util.jar

C:\Code\tomcattest>xcopy /e /q /i apache-tomcat-7.0.11 apache-tomcat
543 File(s) copied

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:e727d1464ae12436e899a726da5b2f11d8381b26

C:\Code\tomcattest>rd /q /s apache-tomcat

C:\Code\tomcattest>xcopy /e /q /i apache-tomcat-7.0.12 apache-tomcat
544 File(s) copied

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:e727d1464ae12436e899a726da5b2f11d8381b26

C:\Code\tomcattest>rd /q /s apache-tomcat

C:\Code\tomcattest>xcopy /e /q /i apache-tomcat-7.0.14 apache-tomcat
544 File(s) copied

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:e727d1464ae12436e899a726da5b2f11d8381b26

C:\Code\tomcattest>rd /q /s apache-tomcat

C:\Code\tomcattest>xcopy /e /q /i apache-tomcat-7.0.16 apache-tomcat
544 File(s) copied

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/HexUtils
        at org.apache.catalina.realm.RealmBase.Digest(RealmBase.java:1293)
        at org.apache.catalina.realm.RealmBase.main(RealmBase.java:1320)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.buf.HexUtils
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 2 more

C:\Code\tomcattest>rd /q /s apache-tomcat

C:\Code\tomcattest>xcopy /e /q /i apache-tomcat-7.0.19 apache-tomcat
547 File(s) copied

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/buf/HexUtils
        at org.apache.catalina.realm.RealmBase.Digest(RealmBase.java:1291)
        at org.apache.catalina.realm.RealmBase.main(RealmBase.java:1318)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.buf.HexUtils
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 2 more

C:\Code\tomcattest>copy apache-tomcat-7.0.11\lib\catalina.jar apache-tomcat\lib
Overwrite apache-tomcat\lib\catalina.jar? (Yes/No/All): y
        1 file(s) copied.

C:\Code\tomcattest>java org.apache.catalina.realm.RealmBase -a SHA mypass
mypass:e727d1464ae12436e899a726da5b2f11d8381b26

C:\Code\tomcattest>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message