You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "M. Jeremy Carter" <vi...@yahoo.com> on 2011/07/26 17:37:15 UTC
Unable to generate pw hash on cmd line since 7.0.16
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>
Re: Unable to generate pw hash on cmd line since 7.0.16
Posted by Ognjen Blagojevic <og...@gmail.com>.
On 27.7.2011 0:11, Ognjen Blagojevic wrote:
> Add tomcat-coyote.jar to your classpath, and you should be fine.
Ops... Didn't notice you already solved it. Thunderbird broke it into
separate threads.
-Ognjen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Unable to generate pw hash on cmd line since 7.0.16
Posted by Ognjen Blagojevic <og...@gmail.com>.
Hi Jeremy,
On 26.7.2011 17:37, M. Jeremy Carter wrote:
> 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.
Classpath info on realm-howto is a bit outdated.
Add tomcat-coyote.jar to your classpath, and you should be fine.
-Ognjen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org