Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-8863

JDR throws NPE when running through jdr.sh with non-English locale

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 11.0.0.Beta1
    • None
    • JDR
    • None
    • Hide

      Start EAP and run

      LC_ALL=cs_CZ $JBOSS_HOME/bin/jdr.sh
      

      You can use any locale that have different day/month names than English

      Show
      Start EAP and run LC_ALL=cs_CZ $JBOSS_HOME/bin/jdr.sh You can use any locale that have different day/month names than English
    • Workaround Exists
    • Hide

      Enforce default locale by LC_ALL=C or LC_ALL=en_US when running the script

      Show
      Enforce default locale by LC_ALL=C or LC_ALL=en_US when running the script

    Description

      When running jdr.sh script with non-English locale, the script throws NullPointerException. Problem seems to be that the generate-jdr-output always uses English locale, but when parsing start-date and end-date, SimpleDateFormat uses system defined locales.

      Initializing JBoss Diagnostic Reporter...
      Trying to connect to http-remoting localhost:9990
      Exception in thread "main" java.lang.NullPointerException
      	at org.jboss.as.jdr.CommandLineMain.printJdrReportInfo(CommandLineMain.java:150)
      	at org.jboss.as.jdr.CommandLineMain.main(CommandLineMain.java:144)
      	at org.jboss.modules.Module.run(Module.java:344)
      	at org.jboss.modules.Main.main(Main.java:519)
      

      This is not issue when running generate-jdr-report() from CLI. Also easy to workaround by enforcing locale for the script run

      LC_ALL=C $JBOSS_HOME/bin/jdr.sh
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-bmaxwell Brad Maxwell
              msvehla@redhat.com Martin Svehla
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: