Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-11249

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

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.0.DR19
    • Fix Version/s: 7.1.0.ER2
    • Component/s: JDR
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      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:
      Workaround Exists
    • Workaround Description:
      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
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bmaxwell Brad Maxwell
                  Reporter:
                  msvehla Martin Svehla
                  Tester:
                  Martin Svehla
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: