Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-9336

password_tool.bat generates java.lang.ClassNotFoundException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.1.0
    • 6.0.0.Final
    • Security
    • None
    • Hide

      1. Fix password_tool.bat
      Replace line 25: set JBOSSPASS_CLASSPATH=%JBOSSPASS_CLASSPATH%;%JBOSS_HOME%\lib\endorsed\xalan.jar
      With: set JBOSSPASS_CLASSPATH=%JBOSSPASS_CLASSPATH%;%JBOSS_HOME%\client\xalan.jar
      or,
      2. Place a copy of xalan.jar in %JBOSS_HOME%\lib\endorsed

      Show
      1. Fix password_tool.bat Replace line 25: set JBOSSPASS_CLASSPATH=%JBOSSPASS_CLASSPATH%;%JBOSS_HOME%\lib\endorsed\xalan.jar With: set JBOSSPASS_CLASSPATH=%JBOSSPASS_CLASSPATH%;%JBOSS_HOME%\client\xalan.jar or, 2. Place a copy of xalan.jar in %JBOSS_HOME%\lib\endorsed

      The password_tool.bat command found in %JBOSS_HOME%\bin generates a java.lang.ClassNotFoundException

      D:\JBoss\jboss-6.0.0.GA\bin>password_tool.bat
      **********************************

            • JBoss Password Tool********
              **********************************
              Keystore is null. Please specify keystore below:
              0: Encrypt Keystore Password 1:Specify KeyStore 2:Create Password 3: Remove a domain 4:Enquire Domain 5:Exit
              1
              Enter Keystore location including the file name
              password/password.keystore
              Enter Keystore alias
              jboss
              log4j:WARN No appenders could be found for logger (org.apache.xml.security.Init).
              log4j:WARN Please initialize the log4j system properly.
              Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException
              at org.jboss.security.integration.password.XMLEncryptionUtil.decrypt(XMLEncryptionUtil.java:205)
              at org.jboss.security.integration.password.PasswordMaskManagement.load(PasswordMaskManagement.java:200)
              at org.jboss.security.integration.password.PasswordTool.load(PasswordTool.java:172)
              at org.jboss.security.integration.password.PasswordTool.main(PasswordTool.java:128)
              Caused by: java.lang.ClassNotFoundException: org.apache.xml.utils.URI$MalformedURIException
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
              ... 4 more
              org.jboss.security.integration.password.PasswordTool$ShutdownHook run called
              Storing domains [
              ]
              Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException
              at org.jboss.security.integration.password.XMLEncryptionUtil.encrypt(XMLEncryptionUtil.java:136)
              at org.jboss.security.integration.password.PasswordMaskManagement.store(PasswordMaskManagement.java:251)
              at org.jboss.security.integration.password.PasswordTool$ShutdownHook.run(PasswordTool.java:205)
              Caused by: java.lang.ClassNotFoundException: org.apache.xml.utils.URI$MalformedURIException
              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
              ... 3 more

      The underlying problem is xalan.jar cannot be found on the classpath. In GA6.0.0 xalan.jar is located in %JBOSS_HOME%\client, not %JBOSS_HOME%\lib\endorsed, so the password_tool.bat classpath declaration needs to reflect this.

        1. JBAS-9336.patch
          0.7 kB
          Tomasz Skórka

              mmoyses Marcus Moyses (Inactive)
              Smurfs Andrew Murphy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: