Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1414

NPE in LDAPAuthServiceImpl.java - context.getMessageTool() returns null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 1.1 M2
    • None
    • xwiki-1.1-milestone-2.3619.war running under JBoss 4.2.0 GA using an Oracle 10g database and Active Directory.

    Description

      In CreateUserFromLDAP method of LDAPAuthServiceImpl.java, context.getMessageTool() returns null so context.getMessageTool().get("core.comment.createdUser") generates NPE and user login fails.

      I produced this behavior with a source build ("Completed: At revision: 3774 ") of xwiki-1.1-milestone-2.3619.war running under JBoss 4.2.0 GA using an Oracle 10g database and Active Directory.

      Starting from a clean xwiki schema, attaching and importing xwiki-1.1-milestone-2.xar, I am able to reproduce this behavior building from the same code running standalone under Jetty 5.1.5 using an Oracle XE database and Active Directory.

      I created a workaround in LDAPAuthServiceImpl.java substituting:

      String msg = "Created User";
      if (context.getMessageTool() != null)
      msg = context.getMessageTool().get("core.comment.createdUser");
      context.getWiki().saveDocument(doc, oldDoc, msg, context);

      for

      context.getWiki().saveDocument(doc, oldDoc, context.getMessageTool().get("core.comment.createdUser");, context);

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            cardenizen Dennis Carroll
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: