Uploaded image for project: 'JBoss Modules'
  1. JBoss Modules
  2. MODULES-220

NullPointerException when running jboss-modules with -class option if CLASSPATH environment variable is empty.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.4.6.Final, 1.5.0.CR1
    • 1.5.0.Beta1
    • Core
    • None
    • Hide

      For example, in JBoss EAP 6.3 home directory:

      [jboss-eap-6.3]$ java -jar jboss-modules.jar -mp modules/ -dep org.picketbox -class org.picketbox.datasource.security.SecureIdentityLoginModule testString

      Expected Result:
      Encoded password

      Actual Result:
      Exception in thread "main" java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:459)
      at java.util.Properties.setProperty(Properties.java:166)
      at java.lang.System.setProperty(System.java:796)
      at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:44)
      at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:32)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.modules.ClassPathModuleLoader.<init>(ClassPathModuleLoader.java:51)
      at org.jboss.modules.Main.main(Main.java:370

      Show
      For example, in JBoss EAP 6.3 home directory: [jboss-eap-6.3] $ java -jar jboss-modules.jar -mp modules/ -dep org.picketbox -class org.picketbox.datasource.security.SecureIdentityLoginModule testString Expected Result: Encoded password Actual Result: Exception in thread "main" java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:459) at java.util.Properties.setProperty(Properties.java:166) at java.lang.System.setProperty(System.java:796) at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:44) at org.jboss.modules.PropertyWriteAction.run(PropertyWriteAction.java:32) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.modules.ClassPathModuleLoader.<init>(ClassPathModuleLoader.java:51) at org.jboss.modules.Main.main(Main.java:370
    • Workaround Exists
    • Hide

      Specify non-empty CLASSPATH when calling jboss-modules.

      [jboss-eap-6.3]$ CLASSPATH="." java -jar jboss-modules.jar -mp modules/ -dep org.picketbox -class org.picketbox.datasource.security.SecureIdentityLoginModule test

      Encoded password: 48e90df5bc00051e

      Show
      Specify non-empty CLASSPATH when calling jboss-modules. [jboss-eap-6.3] $ CLASSPATH="." java -jar jboss-modules.jar -mp modules/ -dep org.picketbox -class org.picketbox.datasource.security.SecureIdentityLoginModule test Encoded password: 48e90df5bc00051e

    Description

      When running jboss-modules standalone with -class option, if CLASSPATH environment variable is not set, an NPE is thrown when ClassPathModuleLoader attempts to write java.class.path = CLASSPATH.

      Attachments

        Activity

          People

            dlloyd@redhat.com David Lloyd
            djeremiah David Murphy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: