Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1174

NullPointerException in network server with LDAP authentication



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Network Server
    • None
    • Linux x86 (Fedora Core 4), 1.4.2_09 Sun JVM


      While trying to fix DERBY-1000 I tried to set up Derby's network server to use LDAP authentication, but I ran into something that looks like a bug, but could just as well be my own configuration mistake. I would appreciate any help in figuring this out. =)

      The problem is a NullPointerException in the Network Server when it tries to initialize the LDAP authentication service. The attached derby.log shows the exception and its stacktrace. The attached derby.properties is what I put in the derby home directory.

      I'm seeing this problem in the trunk as well as my own build of the 10.1 branch and the release build available from the Derby web site. ( http://db.apache.org/derby/releases/release- )

      The problem is cause by the setInitDirContextEnv method in JNDIAuthenticationSchemeBase receiving a null dbProps argument, which it obviously doesn't expect. Adding a check for a null dbProps argument and returning immediately after creating the initDirContextEnv object fixes the NullPointerException and makes LDAP authentication work for me. This is a reasonable enough robustness fix and shouldn't have any negative impact, but if the source of the problem is that JNDIAuthenticationSchemeBase should never receive that null pointer in the first place, more patching is needed. I'm not sure about this, so I'm leaving it up to the experts to decide this. =)


        1. derby.log
          6 kB
          Anders Morken
        2. derby.properties
          0.2 kB
          Anders Morken
        3. DERBY-1174.patch
          1 kB
          Anders Morken
        4. DERBY-1174.patch
          0.6 kB
          Anders Morken



            andersmo Anders Morken
            andersmo Anders Morken
            0 Vote for this issue
            0 Start watching this issue