Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-430

NullPointer exception when fetching children of a node

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.4.0
    • Component/s: studio-ldapbrowser
    • Labels:
      None
    • Environment:
      Desktop: Ubuntu 8.10, Linux 2.6, Java 6 (standard packages)
      Server: Ubuntu 8.04, Linux 2.6, OpenLDAP 2.3 (standard packages)

      Description

      When I browse to a specific node in my directory I get the following exception.

      Error while reading entry
      java.lang.NullPointerException
      java.lang.NullPointerException

      Ldif of the branch in question (some info removed):

      dn: ou=principals,o=directory
      objectClass: organizationalUnit
      objectClass: top
      ou: principals

      dn: krb5PrincipalName=krbtgt/KERBEROSDOMAIN@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: krbtgt/KERBEROSDOMAIN

      dn: krb5PrincipalName=kadmin/changepw@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: kadmin/changepw

      dn: krb5PrincipalName=kadmin/admin@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: kadmin/admin

      dn: krb5PrincipalName=changepw/kerberos@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: changepw/kerberos

      dn: krb5PrincipalName=kadmin/hprop@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: kadmin/hprop

      dn: krb5PrincipalName=default@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: default

      dn: krb5PrincipalName=richard@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      objectClass: shadowAccount
      uid: richard
      userPassword:: aG50bWhhdm5iIQ==

      dn: krb5PrincipalName=ldap/pinkfloyd.KERBEROSDOMAIN@KERBEROSDOMAIN,ou=principals,o=directory
      objectClass: top
      objectClass: account
      objectClass: krb5Principal
      objectClass: krb5KDCEntry
      uid: ldap/pinkfloyd.KERBEROSDOMAIN

        Activity

        Richard Smith created issue -
        Hide
        Stefan Seelmann added a comment -

        Could you please attach the complete stacktrace? You could find it in <home>/.ApacheDirectoryStudio/.metedata/.log

        Show
        Stefan Seelmann added a comment - Could you please attach the complete stacktrace? You could find it in <home>/.ApacheDirectoryStudio/.metedata/.log
        Hide
        Richard Smith added a comment -

        eclipse.buildId=unknown
        java.version=1.6.0_0
        java.vendor=Sun Microsystems Inc.
        BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
        Command-line arguments: -os linux -ws gtk -arch x86

        !ENTRY org.apache.directory.studio.connection.core 4 4 2008-11-26 11:56:51.763
        !MESSAGE Error while reading entry
        !STACK 0
        org.apache.directory.studio.ldapbrowser.core.model.ConnectionException: java.lang.NullPointerException
        at org.apache.directory.studio.ldapbrowser.core.utils.JNDIUtils.createConnectionException(JNDIUtils.java:147)
        at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.searchAndUpdateModel(SearchRunnable.java:365)
        at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.executeSearch(InitializeChildrenRunnable.java:323)
        at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.initializeChildren(InitializeChildrenRunnable.java:207)
        at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.run(InitializeChildrenRunnable.java:165)
        at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:110)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
        !SUBENTRY 1 org.apache.directory.studio.connection.core 4 4 2008-11-26 11:56:51.764
        !MESSAGE java.lang.NullPointerException

        Show
        Richard Smith added a comment - eclipse.buildId=unknown java.version=1.6.0_0 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86 !ENTRY org.apache.directory.studio.connection.core 4 4 2008-11-26 11:56:51.763 !MESSAGE Error while reading entry !STACK 0 org.apache.directory.studio.ldapbrowser.core.model.ConnectionException: java.lang.NullPointerException at org.apache.directory.studio.ldapbrowser.core.utils.JNDIUtils.createConnectionException(JNDIUtils.java:147) at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.searchAndUpdateModel(SearchRunnable.java:365) at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.executeSearch(InitializeChildrenRunnable.java:323) at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.initializeChildren(InitializeChildrenRunnable.java:207) at org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable.run(InitializeChildrenRunnable.java:165) at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:110) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) !SUBENTRY 1 org.apache.directory.studio.connection.core 4 4 2008-11-26 11:56:51.764 !MESSAGE java.lang.NullPointerException
        Hide
        Richard Smith added a comment -

        Not sure if this helps, but I've done some digging around, and It appears as if the ldap server is returning an "invalid dn" error for objects under that branch.

        Show
        Richard Smith added a comment - Not sure if this helps, but I've done some digging around, and It appears as if the ldap server is returning an "invalid dn" error for objects under that branch.
        Hide
        Emmanuel Lecharny added a comment -

        Which DN generates such an error ?

        Show
        Emmanuel Lecharny added a comment - Which DN generates such an error ?
        Hide
        Richard Smith added a comment -

        dn: krb5PrincipalName=krbtgt/KERBEROSDOMAIN@KERBEROSDOMAIN,ou=principals,o=directory

        Show
        Richard Smith added a comment - dn: krb5PrincipalName=krbtgt/KERBEROSDOMAIN@KERBEROSDOMAIN,ou=principals,o=directory
        Hide
        Emmanuel Lecharny added a comment -

        Do you have the same issue when using another ldap browser ? (softera, Ldapbrowser...)

        Show
        Emmanuel Lecharny added a comment - Do you have the same issue when using another ldap browser ? (softera, Ldapbrowser...)
        Hide
        Richard Smith added a comment -

        Yes:

        GQ and Luma handles the error and gives me a helpful error message.

        DS just throws this null pointer exception at me.

        Show
        Richard Smith added a comment - Yes: GQ and Luma handles the error and gives me a helpful error message. DS just throws this null pointer exception at me.
        Hide
        Emmanuel Lecharny added a comment -

        Starting to make sense ... I think we don't handle correctly the error returned by JNDI.

        What message do you get with GQ and Luma ?

        Show
        Emmanuel Lecharny added a comment - Starting to make sense ... I think we don't handle correctly the error returned by JNDI. What message do you get with GQ and Luma ?
        Hide
        Richard Smith added a comment -

        No,

        ApacheDS does not handle the error returned by JDNI correctly.

        Apologies, yesterday was a bad day for communication. Brain was disengaged.

        Luma and GQ both report the error in their respective error handlers and display the error returned by the server (translated from ASN.1 into (l)user speak) "Invalid DN" which I believe is LDAP error 0x22 (LDAP_INVALID_DN_SYNTAX)

        ApacheDS only displays a NullPointerException and no detail on the reason behind the NullPointer[1] a bit unfriendly and amazingly frustrating.

        [1] It does this in several places, although the above bug is the straw that broke the camels back so to speak, since the rest of the time I just work around it, having little to no time to work out what the hell is going on.

        Show
        Richard Smith added a comment - No, ApacheDS does not handle the error returned by JDNI correctly. Apologies, yesterday was a bad day for communication. Brain was disengaged. Luma and GQ both report the error in their respective error handlers and display the error returned by the server (translated from ASN.1 into (l)user speak) "Invalid DN" which I believe is LDAP error 0x22 (LDAP_INVALID_DN_SYNTAX) ApacheDS only displays a NullPointerException and no detail on the reason behind the NullPointer [1] a bit unfriendly and amazingly frustrating. [1] It does this in several places, although the above bug is the straw that broke the camels back so to speak, since the rest of the time I just work around it, having little to no time to work out what the hell is going on.
        Stefan Seelmann made changes -
        Field Original Value New Value
        Fix Version/s 1.4.0 [ 12313402 ]
        Assignee Stefan Seelmann [ seelmann ]
        Stefan Seelmann made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Stefan Seelmann added a comment -

        I wasn't able to reproduce your error. However I changed the exception handling. The wrapping ConnectionException is removed and the real cause should popup in the error message.

        Show
        Stefan Seelmann added a comment - I wasn't able to reproduce your error. However I changed the exception handling. The wrapping ConnectionException is removed and the real cause should popup in the error message.
        Stefan Seelmann made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        Pierre-Arnaud Marcelot added a comment -

        Apache Directory Studio version 1.4.0 has been released.

        Show
        Pierre-Arnaud Marcelot added a comment - Apache Directory Studio version 1.4.0 has been released.
        Pierre-Arnaud Marcelot made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Stefan Seelmann
            Reporter:
            Richard Smith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development