Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-6748

unable to handle ldap referral

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 7.1.1.Final, EAP 6.1.0.Alpha (7.2.0.Final)
    • Naming
    • None

      Description of problem:
      I have 2 ldap servers. ldap server #1 has a referral which points ldap server#2. As EAP6 searches ldap server #1 for an entry where the referral is configured, I got an exception :-

      14:35:36,903 ERROR [stderr] (http-/127.0.0.1:18080-1) javax.naming.NotContextException: Cannot create context for: ldap://localhost:3389/ou=People,dc=example,dc=com; remaining name 'cn=NewReferralPeople,o=JNDITutorial,dc=imc,dc=org'
      14:35:36,903 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.ldap.LdapReferralContext.<init>(LdapReferralContext.java:123)
      14:35:36,903 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.ldap.LdapReferralException.getReferralContext(LdapReferralException.java:132)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.ldap.LdapCtx.c_getAttributes(LdapCtx.java:1339)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_getAttributes(ComponentDirContext.java:213)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:121)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.getAttributes(PartialCompositeDirContext.java:109)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:123)
      14:35:36,904 ERROR [stderr] (http-/127.0.0.1:18080-1) at javax.naming.directory.InitialDirContext.getAttributes(InitialDirContext.java:118)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at com.redhat.gss.CheckReferral.check2(CheckReferral.java:80)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.jsp.NewFile_jsp._jspService(NewFile_jsp.java:66)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
      14:35:36,905 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
      14:35:36,906 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
      14:35:36,907 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      14:35:36,907 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      14:35:36,907 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
      14:35:36,907 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      14:35:36,907 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
      14:35:36,908 ERROR [stderr] (http-/127.0.0.1:18080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
      14:35:36,908 ERROR [stderr] (http-/127.0.0.1:18080-1) at java.lang.Thread.run(Thread.java:662)

      Version-Release number of selected component (if applicable):

      How reproducible:

      Steps to Reproduce:
      1. Download the Oracle Directory Server, set the password of "cn=Directory Manager" to 12345678
      2.1 create one directory server instance,set the port to 3389, import the Example.ldif to it
      2.2 create one directory server instance,set the port to 2389, import the tutorial.ldif to it.
      3. Run the CreateReferral.java to create one ref on 3389
      4.1 Run the CheckRefeeral.java, you will see below in the console:

      {ou=ou: People, objectclass=objectClass: top, organizationalunit}

      4.2 Deploy the AAA.war to the jboss server, visit the http://hostname:port/AAA/NewFile.jsp, you can see the exception in the server.log
      Expected result: in the server.log, you should see the same result in the J2SE environment.

      14:35:36,903 ERROR [stderr] (http-/127.0.0.1:18080-1) javax.naming.NotContextException: Cannot create context for: ldap://localhost:3389/ou=People,dc=example,dc=com; remaining name 'cn=NewReferralPeople,o=JNDITutorial,dc=imc,dc=org'

      Deploying AAA.war on Tomcat 6 & 7, no exception thrown

      https://bugzilla.redhat.com/show_bug.cgi?id=920992

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              hkkng K Ng (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: