Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2316

NullPointerException in LdapExtLoginModule.rolesSearch() Line 306

XMLWordPrintable

      file: LdapExtLoginModule.java

      Receiving NullPointerExceptions when calling LdapExtLoginModule.roleSearch().

      Line 303 of LdapExtLoginModule.java currently reads:

      if( result != null )

      However, the result is never null, as it returns "No Attributes" (When debugging with Eclipse3.0). Then, when called upon line 305:

      Attribute roles = result.get(roleAttributeID);
      for(int n = 0; n < roles.size(); n ++)

      roles.size() is null, as result is null. A NullPointerException is thrown.
      Shouldn't line 303 read?

      if(result.size() != 0) or if(result.size() > 0)

      Please follow the reference link for full LDIF data, stack trace, and LDAP packet capture.

      http://aaron.thepaxson5.org/blog/2005/09/26/1127784334273.html

      I tried placing this data in the JAAS security forum, but the module threw an exception.

              Unassigned Unassigned
              neelixx_jira Aaron (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: