3 Replies Latest reply on Oct 1, 2013 7:54 AM by Christian Neumueller-Oracle

    How to use LDAP_USER in APEX 4.2

    Saeed Hassanpour


      I have an application with LDAP Authentication, But when I want to log in the below error is occurred.

      (Logging exception in final_exception_handler: Sqlerrm: ORA-20987: APEX - Error processing edit LDAP user function. - ORA-20001: Unable to bind username verify length of item is 30 bytes or less. Use v() syntax to reference items longer than 30 bytes. ORA-01006: bind variable does not exist Backtrace: ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 861 ORA-06512: at "APEX_040200.WWV_FLOW_ERROR", line 896 ORA-06512: at "APEX_040200.WWV_FLOW_PROCESS", line 917 ORA-06512: at "APEX_040200.WWV_FLOW", line 8428)


      • Application Express
      • WebLogic Server Version:
      • Oracle Directory Services Manager Version
      • Oracle database
      • apex_listener1.4

      Setting in apex:


      Scheme TypeLDAP_DIRECTORY
      Use SSL No SSL
      Distinguished Name (DN) Stringcn=%LDAP_USER%,cn=Users,dc=mydomain,dc=com
      Use Exact Distinguished Name (DN)yes
      LDAP Username Edit Functionnull


      When I use cn=sso7 instead of %LDAP_USER%, I can log in successfully.(Distinguished Name (DN) String ==>cn=sso7,cn=Users,dc=mydomain,dc=com). it means when I mention CN clearly

      Moreover, I think this my problem is %LDAP_USER%.

      Thank you in advance.

        • 1. Re: How to use LDAP_USER in APEX 4.2
          Christian Neumueller-Oracle

          Hi user12001093,


          the top level error message is "ORA-20987: APEX - Error processing edit LDAP user function". This means that the error occurred when APEX called the username edit function that you specified in the authentication scheme. That function only gets called when you have a %LDAP_USER% substitution string in the DN or in the search string. That's the reason why the error did not occur anymore, after you replaced %LDAP_USER% with a hard coded username. You mentioned that the edit function in your authentication scheme is not set, but then APEX would not execute the edit function. Can you please check that attribute again?



          • 2. Re: How to use LDAP_USER in APEX 4.2
            Saeed Hassanpour

            Hi Christian,


            I do not now what happened?.Today after I have turned on my computer and I tried again every things worked correctly, yet I things that error was saved.

            Moreover, this error is not good cos it is several time.is it a bug?




            • 3. Re: How to use LDAP_USER in APEX 4.2
              Christian Neumueller-Oracle

              Hi Saeed,


              if you still encounter problems with LDAP authentication, maybe you should use debug LEVEL9 to examine what's going on in detail. That part of the APEX engine contains a lot of instrumentation. If you need help in analyzing the debug output, you can just post it here.



              1 person found this helpful