Sample code to connect LDAP server using jndi

Hi,
can any one help me with sample code to connect LDAP server using jndi,
like i want to make use of Ldap server for serching Active directoty.
Thanks in advance,
Regards
Muthu

You can set ldap_auth=none for anonymous user.
User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
Thansk,

Similar Messages

  • "untrusted server cert chain" exception while connecting LDAP server

    While connecting to LDAP server using JNDI over JSSE ..This is happening when trying to get the initial context
    using
    InitialDirContext initContext = new InitialDirContext(env);
    where env is a hash table set with the default parametes.The certificate used for is a Novell CA certificate converted to X509 format and the key store is initialized with this

    This got resolved when in the code the following
    System.setProperty("javax.net.ssl.tmrustStore", CertFileName);
    where cert file name is the filename with complete path.the file is a CA certificate of the LDAP server
    in X509 format

  • Need sample code to connect MDM using JCA

    hi friends,
    I want to connect MDM server using JCA
    can you please provide me the sample code for that.
    Regards,
    Venki

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • Need sample code to connect MDM using JCO

    hi friends,
    I want to connect MDM server using JCO,
    can you please provide me the sample code for that.
    Regards,
    Venki.

    Hello Venki,
    why do you want to use JCo for connecting to MDM? MDM has its own specific Java API for this task. There's no need for using JCo at all.
    BR Michael.

  • Deleting a Entry in LDAP Server through JNDI

    I have modified and created enteries in LDAP Server.But have no idea how to remove or delete a entry(a subcontext).
    can anyone help ne out
    thanks
    murali

    Thank you mike.its working.I just missed that method.
    I have one more problem.
    i am using the octetstring's jdbc-ldap bridge to connect to Eudora LDAP server, but when ever i try to connect to the server we are getting the following error...
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'o=Siquell,c=IN'
    even though we have the root dsn i.e "o=Siquell,c=IN". this we can say cause we were able to connect to the same server using JNDI.
    Is this because octetstring's jdbc-ldap bridge is not supported by Eudora LDAP server.
    Thanks
    Murali

  • How can we update data in LDAP server using PL/SQL.

    Hi,
    How can we update data in LDAP server using PL/SQL program.
    Is there any sample code for refrence.
    Thanks,
    Tarun

    Hi Justin,
    Thanks for your help. You got my correct requirements.
    Tim's example returning all the attributes of current user which is admin user. Please correct me if I am wrong.
    I have the following information:
    the admin user and password,server info , port and ldap_base for admin.
    I have uid and password for regular user, I am trying find the ldap_base for regular user, which may be different from adminuser.
    Please help me.
    Thanks,
    Edited by: james. on Jan 12, 2009 5:39 PM

  • Cannot connect to server using message server: ms://xiidhasoft:50004/P4

    Hi SAP Guru's
    When PISUPER or any any of the enduser is trying to login in the Integration Builder , they are getting error
    Cannot connect to server using message server: ms://xiidhasoft:50004/P4
    I have tryed to search in SDN and got below solution but no success
    1. Exchange Profile of PI - http://host:port/exchangeProfile
    2. Check with the rmi port number.
    3. if rmi port number is empty or any number is present ( check with Tr code: SMICM - services - check for p4 port number - it will be ex: 5<nr>04)
    4. fill the rmi port number as present in the P4.
    OR
    implement note 864268
    I have Netweaver PI 7.1 .
    Please suggest some alternative solution.
    Thanks & Regards
    Vinay Patel

    You may check your local PC Java Network Setting.
    Troubleshooting:
    Probably Javau2122 WebStart does not detect the correct Proxy Settings. In this case please proceed as follows:
    To change the Proxy Settings for Javau2122 Web Start:
    1. Click Start --> Run  and enter javaws. Press button OK.
    2. Control Panel -> Programs ->Java -> Network Settings...
    3. Select Direct Connection to switch off the proxy settings and press button OK.
    If this still does not work, select Use proxy server to set manually the HTTP Proxy and Port.
    Contact your network administrator for the correct settings.

  • Connecting SQL server using JavaScript

    I found an article on connecting SQL server using JavaScript. http://www.devarticles.com/c/a/JavaScript/Combining-North-Pole-with-South-Pole-JavaScript-with-SQL-Server-2000/
    Do you people think it's possible? i try out the code already but something wrong with it. I just copy and paste it to a html file but it comes out with error. Do I miss out something? Thanks.
    SY Tee

    Check the permissions and server authentication from the below link,
    http://technet.microsoft.com/en-us/library/ms179354(v=sql.90).aspx
    Regards, RSingh

  • PI 7.11: Cannot connect to server using message server:...

    Hello Guys,
    we make the Application Management for a Customer PI System.
    Scenario:
    - the SAP Gui Connection to the ABAP Stack is routed via SAPRouter and Works fine.
      SAP Gui -> our SAP Router -> VPN Box from Customer -> Firewall Customer -> ABAP Stack PI System
    - WebAccess its working fine, the Customer use Webdispatcher on every PI Server...
      Browser -> VPN Box from Customer -> Firewall Customer -> Java Stack (Port: 5xx00 btw. 81xx (Webdispatcher))
    Problem:
    Our Problem ist, we can not proceed the Integration Builder or the ESB, the Java Web Start works fine and open the Logon Screen Correctly -> but i fill the Logon Screen with my User name and Password and press Logon come the follwing Error:
    "Cannot connect to server using message server: ms://<hostname>.<domain>:8134/P4"
    In the Details from the Error Message:
    "<hostname>.<domain>:53404 Reason: com.sap.engine.services.rmi_p4.P4IOException:
    Cannot open connection to host: <IP-Adress of Central Instance> and Port: 53404"
    The Customer says, the Firewall is open with the IP Adresses and P4 Port but i dont think so...
    Can everybody help me, or have tips for me! I have checked a lot of OSS Messages (PI High Availabilty etc... its all correct on the System)
    Sorry for my bad English
    Best Regards,
    Markus

    Hi Markus,
    did you check if the browser is using a proxy? (In this case your scenario unfortunately won't work).
    P4-port should generally be routed via a proxy (described in the help.sap.com), but within the PI-Tools(JNLP) the proxy-usage is not implemented.  There is even a SAP-note that describes how to check the JavaWebStart-Proxyconfiguration, but this won't help either.
    If there is a proxy defined in the browser everything is working fine till you pass the logon-screen but even with the correct "javaws"-settings you won't be able to go on.
    (This problem is pretty bad if you do have developers and the SAP-servers seperated because of security issues. I'm hoping that this malfunction will be solved with upcoming patches.)
    Solution: Establish a connection without any proxy in between.
      E.g.: a terminal server in the same network
    It would be helpful to find more people with the same problem to force a fix from SAP for that.
    If anyone else is having problems with this, please add a comment to this thread.
    Best regards
    Christian

  • How to Connect to Server using Server Admin

    I am trying to connect to Server using Server Admin so I can setup a wiki.
    I enter my hostname, username and password and I get the error unable to connect to server, any ideas what is going wrong?
    I can ping the server name and that works. Is there something else I have to do to get the server running
    Thanks in advance

    Any firewalls/routers "in the way"?
    Is this over Internet?

  • Help !! I can't connect to server using connection manager

    Hello :
    i hava three machine,i use connection manager on Oracle 8.1.7
    i can't connect to server using connection manager
    1.lsnrctl start (Server)
    2.svmrgrl (Server)
    start (Server)
    3.cmctl start (Middle tier)
    4.sqlplus scott/tiger@test (client)
    ORA-12564
    Please help my!
    ---- CLIENT (sqlnet.ora)
    USE_CMAN = TRUE
    NAMES.DIRECTORY_PATH= (TNSNAMES)
    ---- CLIENT (tnsname.ora)
    (DESCRIPTION =
    (SOURCE_ROUTE = YES)
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-middler)(PORT = 1610))
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-db)(PORT = 1521))
    (CONNECT_DATA =
    (SID = bigbear)
    ---- MIDDLE TIER(cman.ora)
    CMAN = (ADDRESS_LIST =
    (ADDRESS =
    (PROTOCOL = TCP)
    (HOST = orcl-middler)
    (PORT = 1610)
    ---- SERVER (listener.ora)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = orcl-db)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = /u01/app/oracle/product/8.1.7)
    (SID_NAME = bigbear)
    ---- SERVER (init.ora)
    MTS_DISPATCHERS = "(PROTOCOL = TCP)(DISPATCHERS=10)(MULTIPLE=ON)"
    MTS_MAX_DISPATCHERS=20
    MTS_MAX_SERVERS = 30
    MTS_SERVERS = 10
    MTS_SERVICE = bigbear
    db_name = "bigbear"
    db_domain = intumit.com
    instance_name = bigbear
    service_names = bigbear.intumit.com

    midder tier must config hosts
    because dispatcher have listener information
    midder tier must know ipaddress
    Ex. on midder tier
    /etc/hosts
    192.168.10.1 orcl-middler
    from client to server it's ok

  • I was wondering if there's a way to connect to my work server from my home iMac i7. I can't seem to get Share Screen to work. I have tried connecting to server using the vnc but doesn't work.

    I was wondering if there's a way to connect to my work server from my home iMac i7. I can't seem to get Share Screen to work. I have tried connecting to server using the vnc but doesn't work.

    The easiest way would be to use Back to My Mac, but that will only work if the server is a Mac running OS X 10.7 or later and you have the cooperation of the network administrator.
    OS X: Using and troubleshooting Back to My Mac with your iCloud account

  • Simple example code connect Ldap server...

    Hi all.
    I am beginning working with Ldap.
    Please help me a simple example source code to connect with Ldap server.
    I install Ldap administrator and see a public Server : ldap://directory.d-trust.de:389 How to connect it ?
    Thanks in advance
    Diego

    Hi ThuCT,
    Just have a read of the following links :
    http://www.javaworld.com/javaworld/jw-03-2000/jw-0324-ldap.html
    http://java.sun.com/products/jndi/tutorial/ldap/index.html

  • Connect to open ldap server using ODI

    Hello,
    I need to use openldap as dataserver in ODI. But I'm not sure how to provide valid connection string. My test ldap server:
    - host: 172.18.0.106
    - port: 389
    - base dn: dc=example,dc=com
    And (optionally), root access (simple authentication):
    - Bind dn: cn=jimbob, dc=example, dc=com
    - password: pass
    So, I'm trying to begin with anonymous access (read only), this is my connection string:
    jdbc:snps:ldap?ldap_url=ldap://localhost:389/&ldap_basedn='dc=example,dc=com'
    Unfortunatelly, it does now work:
    java.sql.SQLException: ODI-40528: A com.sunopsis.ldap.connection.SnpsLdapDriverPropertyException occurred saying: ODI-40546: A user has not been provided
    Why does it ask me for user? ODI documentation says, that user/pass are not mandatory.
    What are correct connection strings for anonymous access and root (or other user) access in my case? Both methods works with apache directory studio.

    You can set ldap_auth=none for anonymous user.
    User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
    Thansk,

  • HELP: Can not connect LDAP server with 64bit ldap csdk5.08 on Solaris10

    We are using 64bit ldap csdk5.08 on SunOS5.10. But it doesn't work.
    We wrote a simple client program that connects using ldap_simple_bind_s() function. When I run the code it gives an error saying 'Can't connect to the LDAP server - Connection refused' .
    At the same time using snoop to capture network packages on the ldap server , it shows no package received at all.
    But if we use 32bit ldap library, the program works well and no error is raised.
    And the 64bit ldap tool ldapsearch also works well, it can search data from the server successfully.
    The sample code:
    ==================================================
    #include <ldap.h>
    #include <stdio.h>
    int
    main( int argc, char **argv )
         LDAP *ld;
         int rc;
         /* Get a handle to an LDAP connection. */
         if ( (ld = ldap_init( "150.236.42.53", 38902)) == NULL )
              perror( "ldap_init" );
              return( 1 );
         /* Bind anonymously to the LDAP server. */
         rc = ldap_simple_bind_s( ld, NULL, NULL );
         if ( rc != LDAP_SUCCESS )
              ldap_perror(ld, "ldap_simple_bind_s:");
         return( 1 );
    }

    This looks like a mismatch between C-sdk libraries and Solaris native libraries.
    Are you sure your program loads the correct libraries ?
    Ludovic.

Maybe you are looking for

  • How many users does HFM support?

    Hi, how many users does HFM support(Maximum)? and why we are choose HFM compare to Hyperion enterprise? thanks Edited by: user10919054 on May 18, 2009 3:07 AM

  • Training and Event (PE) Tables

    I would be grateful if someone could give me a copy or tell me how I can get a list of all the tables in PE - Training and Event Management. Thanks

  • Increasing the number of line items in PO

    hello fellow abapers, i have a query. i dont know if its the headache of the function ppl or the technicial person - which happens to be me - but i have to get this solved at the earliest. now ive made a PO for materials from the scratch and everythi

  • GLIBC_2.0 not defined in file libc.so.6

    I am attempting to install the patch 11I.ATG.PF.H Detla 7, got errors at the end with 7 reports not compiling successfully. I went to recompile one report and got the following error message Error Message: /finora/product/10222/8.0.6/bin/rwcon60: rel

  • Upgrading Oracle 11.1.0.6.0 to 11.2

    I am upgrading Oracle 11g to a new version of 11g in Windows 2003 environment and need some your thoughts. What are the steps involved - just install the software and let it copy on the old copy? Or create in new folder (db_2)? Do need to create a ne