Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4359598

NullPointerException in com.sun.jndi.ldap.Connection.run(Connection.java:567)

XMLWordPrintable

    • ladybird
    • generic
    • generic

        When running JNDI on a multi-processor machine, we get intermittent instances
        of the following exception:
          java.lang.NullPointerException
                at com.sun.jndi.ldap.Connection.run(Connection.java:567)
                at java.lang.Thread.run(Thread.java:484)
        This exception is not trapped by our try/catch block.

        Once the exception has occurred, we get one instance of the following exception
        on a call to InitialDirContext.getAttributes.
        javax.naming.ServiceUnavailableException: roonadan.eng.sun.com:389; remaining name 'OU=prjC, OU=divA, OU=Comp, O=sun, C=us'
                at com.sun.jndi.ldap.Connection.readReply(Connection.java:221)
                at com.sun.jndi.ldap.Connection.readReply(Connection.java:243)
                at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:539)
                at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:503)
                at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1720)
                at com.sun.jndi.ldap.LdapCtx.doSearchOnce(LdapCtx.java:1670)
                at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1074)
                at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:216)
                at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:124)
                at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:112)
                at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:124)
                at DirAccessTest2.runTest(DirAccessTest2.java:67)
                at DirAccessTest2.main(DirAccessTest2.java:31)

        If we continue calls to InitialDirContext.getAttributes following this
        exception we get

        javax.naming.CommunicationException: Socket closed. Root exception is java.net.SocketException: Socket closed
                at java.net.SocketOutputStream.socketWrite(Native Method)
                at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
                at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:72)
                at java.io.BufferedOutputStream.write(BufferedOutputStream.java:116)
                at com.sun.jndi.ldap.Connection.writeRequest(Connection.java:209)
                at com.sun.jndi.ldap.LdapClient.search(LdapClient.java:497)
                at com.sun.jndi.ldap.LdapCtx.doSearch(LdapCtx.java:1720)
                at com.sun.jndi.ldap.LdapCtx.doSearchOnce(LdapCtx.java:1670)
                at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1074)
                at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:216)
                at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:124)
                at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:112)
                at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:124)
                at DirAccessTest2.runTest(DirAccessTest2.java:59)
                at DirAccessTest2.main(DirAccessTest2.java:27)

              rleesunw Rosanna Lee (Inactive)
              aandersosunw Anne Anderson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: