Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2137

Register service throws NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: General
    • Labels:
      None

      Description

      A null pointer exception is thrown in the LanguageUtil getService method.

      java.lang.NullPointerException
      at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:53)
      at org.lamsfoundation.lams.util.LanguageUtil.getService(LanguageUtil.java:57)
      at org.lamsfoundation.lams.util.LanguageUtil.getSupportedLocaleOrNull(LanguageUtil.java:187)
      at org.lamsfoundation.lams.util.LanguageUtil.getSupportedLocale(LanguageUtil.java:161)

      This only occurs if the register service is called before any other page after a server restart

      A workaround is to load the main login page at least once after jboss starts

        Activity

        Hide
        ernieg Ernie Ghiglione added a comment -
        Follow workaround
        Show
        ernieg Ernie Ghiglione added a comment - Follow workaround

          People

          • Assignee:
            ernieg Ernie Ghiglione
            Reporter:
            asukkar Anthony Sukkar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development