JNDI returns nothing from MS Exchange LDAP server

I used code sample from answer to "Question of the week # 143" to get the attributes of certain LDAP objects from our NT, LDAP server, but it's returning zero results. I can see some of the DIT object names by looking at email properties in Microsoft Outlook (i.e. c, o), yet I am not getting anything when running the example.
I tried it in slightly a different way to do a basic search by passing an attribute/value, but I keep getting this error:
javax.naming.CommunicationException: [LDAP: error code 2 - Protocol Error]; remaining name 'o=Dalsemi' blah blah...
Our LDAP is X.400 and I believe the latest JNDI supports X.500. Could this be part of the problem? I'd appreciate any help.
Thanks.

Hi, I am having the exact same problem. Wondering if you were able to solve your problem. If so, how?

Similar Messages

  • Changing the Default OAB from an Exchange 2003 server to an Exchange 2010

    I am in the process of decommissioning my old Exchange 2003 servers. All mailboxes have been moved over to Exchange 2010. I already have OABs and Public Folders created on the Exchange 2010 servers. Since I see the "Default Offline Address List",
    which is pointing to my old Exchange 2003 server and the Default OAB is set to "True", can I just make an existing Exchange 2010 OAB the "Default OAB"? I have read that I have to perform a move on the "Default Offline Address List"
    OAB. Is this required?
    thanks
    Noe

    Configure the Exchange 2010 mailbox databases to use the Exchange 2010 OAB, and leave the Exchange 2003 databases alone.  You can delete the old OAB just before taking the Exchange 2003 servers out of production.  The "Default" setting
    means the OAB is the one that's assigned by default when you create a new mailbox database, so yes, you should set that.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Return nothing from DB

    I am a beginner to JDBC and my english is not good. i hope anyone here understand where my problem is.
    i am trying to show some data in the database using very simple servlet. i have checked that the string returned have size (rs.getString(1).length()) but it shows nothing. If the string is a number, it shows characters. What's wrong?
    WINXP chinese platform
    j2sdk1.4.1_02
    mysql-connector-java-3.0.6-stable
    Tomcat 4.1
    segment of code:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class DataViewerServlet extends HttpServlet {
    /**Load JDBC driver*/
    private String DBclass = "com.mysql.jdbc.Driver";
    private String DBURL = "jdbc:mysql://localhost/test?user=root";
    public void init() {
    try {
    Class.forName(DBclass);
    System.out.println("JDBC driver loaded");
    catch (ClassNotFoundException e) {
    System.out.println(e.toString());
    /**Process the HTTP Get request*/
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<HTML>");
    out.println("<HEAD>");
    out.println("<TITLE>Display All Users</TITLE>");
    out.println("</HEAD>");
    out.println("<BODY>");
    out.println("<CENTER>");
    out.println("<BR><H2>Displaying All Users</H2>");
    out.println("<BR>");
    out.println("<BR>");
    out.println("<TABLE>");
    out.println("<TR>");
    out.println("<TH>First Name</TH>");
    out.println("<TH>Last Name</TH>");
    out.println("<TH>User Name</TH>");
    out.println("<TH>Password</TH>");
    out.println("</TR>");
    String sql = "SELECT FirstName, LastName, UserName, Password FROM Users";
    try {
    Connection con = DriverManager.getConnection(DBURL);
    Statement s = con.createStatement();
    ResultSet rs = s.executeQuery(sql);
              System.out.println(sql);
    while (rs.next()) {
    out.println("<TR>");
    out.println("<TD>" + rs.getString(1) + "</TD>");
    out.println("<TD>" + rs.getString(2) + "</TD>");
    out.println("<TD>" + rs.getString(3) + "</TD>");
    out.println("<TD>" + rs.getString(4) + "</TD>");
    out.println("</TR>");
    //checking
    System.out.print("FirstName : " + rs.getString(1));
    System.out.println(" length = " + rs.getString(1).length());
    System.out.print("LastName : " + rs.getString(2));
    System.out.println(" length = " + rs.getString(2).length());
    System.out.print("UserName : " + rs.getString(3));
    System.out.println(" length = " + rs.getString(3).length());
    System.out.print("Password : " + rs.getString(4));
    System.out.println(" length = " + rs.getString(4).length());
    // end checking
    rs.close();
    s.close();
    con.close();
    catch (SQLException e) {
    catch (Exception e) {
    out.println("</TABLE>");
    out.println("</CENTER>");
    out.println("</BODY>");
    out.println("</HTML>");
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doGet(request, response);
    database:
    mysql> select * from users;
    -----------------------------------------+
    | FirstName | LastName | UserName | Password |
    -----------------------------------------+
    | abc | def | ghi | jkl |
    | 123 | 456 | 789 | 0 |
    -----------------------------------------+
    2 rows in set (0.79 sec)
    console:
    SELECT FirstName, LastName, UserName, Password FROM Users
    FirstName : length = 3
    LastName : length = 3
    UserName : length = 3
    Password : length = 3
    FirstName : qrs length = 3
    LastName : tuv length = 3
    UserName : wxy length = 3
    Password : p length = 1
    why the string cannot be printed out and the number have changed to character?

    i found that it can only return the type of data of each column. If the result contains any user defined string, it shows nothing.
    i.e.
    System.out.println("column's database-specific type name. :" + rsmd.getColumnTypeName(1));
    it returns "varchar".
    System.out.println("number of columns in this ResultSet object :" + rsmd.getColumnCount
    it returns the correct number of columns in the result set
    however,
    ResultSetMetaData rsmd = rs.getMetaData();
    System.out.println("designated column's table name :" + rsmd.getTableName(1));
    System.out.println("Get the designated column's name. :" + rsmd.getColumnName(1));
    it shows nothing.
    it seems that the problem is on the handling of String from database to resultset.The db connector use the default setting and the my.ini setting is:
    character-sets-dir=C:\\mysql\\share\\charsets
    default-character-set=latin1

  • LDAP failover - what happens when the primary LDAP server returns...?

    Hi,
    Got a question regarding LDAP failover...
    I`m running IMS5.2hf2.09 and when our corporate LDAP server has a hiccup the IMS box succesfully fails over to the next one according to the 'local.ugldaphost' configutil entry and the following entry is recorded in the http log:
    [05/Feb/2006:21:00:02 -0500] ******** [29882]: General Error: ldappool: ldap1.***.***.*** : Can't connect to the LDAP server - failover to ldap2.***.***.***However my question is when does it recover back to the original LDAP server (ldap1) or does it stay on the failover LDAP server (ldap2) until that has a problem and so on? In this instance (where it has failed over to ldap2) there are no other log entries saying it has returned back to the original LDAP server (ldap1) yet NETSTAT shows LDAP connections to ldap1.
    Our LDAP team have got some changes planned and so I want to understand the failover process better.
    Thanks,
    Tom
    iPlanet Messaging Server 5.2 HotFix 2.09 (built Nov 18 2005)
    libimta.so 5.2 HotFix 2.09 (built 10:35:58, Nov 18 2005)
    SunOS ******** 5.8 Generic_108528-19 sun4u sparc SUNW,Ultra-80

    Thanks Jay - that makes quite a difference!
    Our failover LDAP server (ldap2) is over in Asia so if the primary LDAP server (ldap1 in US) has a hiccup - ALL LDAP traffic is going to go to Asia until ldap2 has a problem.
    The majority of our IMS servers are in the US so I guess we`ll need to watch out for delays whilst in failover mode.

  • Error moving mailbox from 2003 Exchange to 2010 Exchange

    Hi everyone
    I am having some trouble moving a mailbox from our Exchange 2003 server and over to our Exchange 2010 server. at this point i have moved 300 users, but this one here is causing some grief. It stops at 10% Any ideas????
    23/06/2012 21:35:28 [VMPRIEXCH] 'ad.DNSArrow.co.uk/Admin Accounts/RJ Admin' created move request.
    23/06/2012 21:35:28 [VMPRIEXCH] 'ad.DNSArrow.co.uk/Admin Accounts/RJ Admin' allowed a large amount of data loss when moving the mailbox (250 bad items).
    23/06/2012 21:35:30 [VMPRIEXCH] The Microsoft Exchange Mailbox Replication service 'VMPRIEXCH.ad.DNSArrow.co.uk' (14.2.247.1 caps:07) is examining the request.
    23/06/2012 21:35:30 [VMPRIEXCH] Connected to target mailbox 'Primary (c8e0ea6b-eec7-4da0-8ea5-e031a91cc984)', database 'SHAREDMBDB', Mailbox server 'VMPRIEXCH.ad.DNSArrow.co.uk' Version 14.2 (Build 247.0).
    23/06/2012 21:35:30 [VMPRIEXCH] Connected to source mailbox 'Primary (c8e0ea6b-eec7-4da0-8ea5-e031a91cc984)', database 'EX01\SG2\Mailbox Store SG2 C', Mailbox server 'ex01.ad.DNSArrow.co.uk' Version 6.0 (Build 7654.0).
    23/06/2012 21:35:41 [VMPRIEXCH] Request processing started.
    23/06/2012 21:35:41 [VMPRIEXCH] Mailbox signature will not be preserved for mailbox 'Primary (c8e0ea6b-eec7-4da0-8ea5-e031a91cc984)'. Outlook clients will need to restart to access the moved mailbox.
    23/06/2012 21:35:41 [VMPRIEXCH] Source mailbox information before the move:
    Regular Items: 189917, 5.272 GB (5,660,371,162 bytes)
    Regular Deleted Items: 2491, 135 MB (141,547,842 bytes)
    FAI Items: 2490, 0 B (0 bytes)
    FAI Deleted Items: 0, 972 B (972 bytes)
    23/06/2012 21:35:49 [VMPRIEXCH] Fatal error MapiExceptionNotFound has occurred.
    Error details: MapiExceptionNotFound: Unable to GetSearchCriteria. (hr=0x8004010f, ec=-2147221233)
    Diagnostic context:
        Lid: 45095   EMSMDB.EcDoRpcExt2 called [length=48]
        Lid: 61479   EMSMDB.EcDoRpcExt2 returned [ec=0x0][length=98][latency=0]
        Lid: 23226   --- ROP Parse Start ---
        Lid: 27962   ROP: ropGetSearchCriteria [49]
        Lid: 31418   --- ROP Parse Done ---
        Lid: 45095   EMSMDB.EcDoRpcExt2 called [length=53]
        Lid: 61479   EMSMDB.EcDoRpcExt2 returned [ec=0x0][length=48][latency=15]
        Lid: 23226   --- ROP Parse Start ---
        Lid: 27962   ROP: ropLtidFromId [67]
        Lid: 17082   ROP Error: 0x8004010F
        Lid: 17505  
        Lid: 21921   StoreEc: 0x8004010F
        Lid: 31418   --- ROP Parse Done ---
        Lid: 22753  
        Lid: 21817   ROP Failure: 0x8004010F
        Lid: 30894  
        Lid: 24750   StoreEc: 0x8004010F
        Lid: 29358  
        Lid: 27950   StoreEc: 0x8004010F
        Lid: 29310  
        Lid: 23998   StoreEc: 0x8004010F
        Lid: 29329  
        Lid: 19729   StoreEc: 0x8004010F
        Lid: 23185  
        Lid: 25233   StoreEc: 0x8004010F
       at Microsoft.Mapi.MapiExceptionHelper.ThrowIfError(String message, Int32 hresult, SafeExInterfaceHandle iUnknown, Exception innerException)
       at Microsoft.Mapi.MapiContainer.GetSearchCriteria(Restriction& restriction, Byte[][]& entryIds, SearchState& state)
       at Microsoft.Exchange.MailboxReplicationService.LocalFolder.Microsoft.Exchange.MailboxReplicationService.IFolder.GetSearchCriteria(RestrictionData& restriction, Byte[][]& entryIds, SearchState& state)
       at Microsoft.Exchange.MailboxReplicationService.FolderWrapper.<>c__DisplayClass19.<Microsoft.Exchange.MailboxReplicationService.IFolder.GetSearchCriteria>b__18()
       at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute(GenericCallDelegate operation)
       at Microsoft.Exchange.MailboxReplicationService.FolderWrapper.Microsoft.Exchange.MailboxReplicationService.IFolder.GetSearchCriteria(RestrictionData& restriction, Byte[][]& entryIds, SearchState& state)
       at Microsoft.Exchange.MailboxReplicationService.FolderRecWrapper.EnsureDataLoaded(IFolder folder, FolderRecDataFlags dataToLoad, ReportBadItemsDelegate reportBadItemsDelegate)
       at Microsoft.Exchange.MailboxReplicationService.MailboxWrapper.<>c__DisplayClass4`1.<LoadFolders>b__0()
       at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute(GenericCallDelegate operation)
       at Microsoft.Exchange.MailboxReplicationService.MailboxWrapper.LoadFolders[TFolderRec](FolderRecDataFlags dataToLoad, PropTag[] additionalPtags, GenericCallDelegate abortDelegate, ReportBadItemsDelegate reportBadItemsDelegate)
       at Microsoft.Exchange.MailboxReplicationService.MailboxWrapper.GetFolderMap[TFolderRec](FolderRecDataFlags dataToLoad, PropTag[] additionalPtags, GenericCallDelegate abortDelegate, ReportBadItemsDelegate reportBadItemsDelegate)
       at Microsoft.Exchange.MailboxReplicationService.MailboxCopierBase.GetSourceFolderMap(GetFolderMapFlags flags, FolderRecDataFlags dataToLoad, GenericCallDelegate abortDelegate)
       at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.<CreateFolderHierarchy>b__2d(MailboxMover mbxCtx)
       at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.ForeachMailboxContext(MailboxMoverDelegate del)
       at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.CreateFolderHierarchy(Object[] wiParams)
       at Microsoft.Exchange.MailboxReplicationService.CommonUtils.CatchKnownExceptions(GenericCallDelegate del, FailureDelegate failureDelegate)
    Error context: --------
    Operation: IFolder.GetSearchCriteria
    OperationSide: Source
    Primary (c8e0ea6b-eec7-4da0-8ea5-e031a91cc984)
    Search folder: 'MS-OLK-BGPooledSearchFolder28E6C24EFE39F845A1C7309FF139D54F', entryId [len=46, data=00000000ED492DE46CCB2941A6EFC600B0DC8ABD010062EB1CE91779304984F59E79C254E5430000033BC7BF0000], parentId [len=46, data=00000000ED492DE46CCB2941A6EFC600B0DC8ABD010062EB1CE91779304984F59E79C254E54300000015852B0000]
    23/06/2012 21:35:50 [VMPRIEXCH] Removing target mailbox 'Primary (c8e0ea6b-eec7-4da0-8ea5-e031a91cc984)' due to an offline move failure.
    23/06/2012 21:35:50 [VMPRIEXCH] Relinquishing job.
    Regards
    Ronnie
    Ronnie Jorgensen | MCTS Windows Server 2008

    Hi ,
    Maybe we can configure BadItemLimit for it .
    New-MoveRequest:
    http://technet.microsoft.com/en-us/library/dd351123.aspx
    More information for your reference.
    Can not move Exchange 2003 mailboxes to Exchange 2010:<//span>
    http://social.technet.microsoft.com/Forums/en-US/exchangesvrmigration/thread/89902f00-4b84-4f10-b909-121a81241c85/
    Wendy Liu
    TechNet Community Support
    Hi Wendy
    BadItemLimit is already set to 250 mails and with accept data loss
    New-MoveRequest -Identity 'vquotes' -TargetDatabase "DB06" -BadItemLimit 250 -AcceptLargeDataLoss
    So that is not the problem :)
    Ronnie Jorgensen | MCTS Windows Server 2008

  • Portal and Netscape LDAP server integration

    Hi,
    I am trying to integrate Netscape LDAP server (6.0) with portal server 7, but
    having lots of trouble doing that.
    I've followed the instructions in the developer guide and completed the following
    steps:
    1. added a CustomRealm named defaultLDAPRealmForNetscapeDirectoryServer in config.xml
    and modified the entries to fit my environment.
    2. Deployed ldapprofile.jar and customized the env variables.
    After these two steps, nothing happened. Then I did the third step:
    3. added a iPlanet Authenticator to the realm CompatibilityRealm, which is my
    default realm for the server.
    However, after step 3, I wasn't able to boot weblogic server. Please note I have
    create two users, system and weblogic in my LDAP server.
    I copied the stack trace below. Any suggestions will be greatly appreciated.
    Weiguo
    C:\prog\bea\user_projects\portalDemoDomain>"C:\prog\bea\jdk131_03\bin\java" -hotspot
    -Xms128m -Xmx128m -XX:MaxPermSize=128m -Dcommerce.properties="C:\prog\bea\weblogic700\portal\weblogiccommerce.properties"
    -Dweblogic.Name=portalDemoServer
    -Dbea.home="C:\prog\bea" -Dweblogic.management.username= -Dweblogic.management.p
    assword= -Dweblogic.ProductionModeEnabled=true -Dweblogic.management.discover=fa
    lse -Djava.security.policy=="C:\prog\bea\weblogic700\server\lib\weblogic.policy"
    weblogic.Server
    <Nov 4, 2002 1:18:45 PM EST> <Info> <Security> <090065> <Getting boot identity
    from user.>
    Enter username to boot WebLogic server:weblogic
    Enter password to boot WebLogic server:
    Starting WebLogic Server...
    <Nov 4, 2002 1:19:06 PM EST> <Notice> <Management> <140005> <Loading configuration
    C:\prog\bea\user_projects\portalDemoDomain\.\config.xml>
    <Nov 4, 2002 1:19:21 PM EST> <Notice> <Security> <090093> <No configuration data
    was found on server portalDemoServer for realm CompatibilityRealm.>
    <Nov 4, 2002 1:19:21 PM EST> <Notice> <Security> <090082> <Security initializing
    using realm CompatibilityRealm.>
    <Nov 4, 2002 1:19:21 PM EST> <Critical> <WebLogicServer> <000364> <Server failed
    during initialization. Exception:java.lang.SecurityException: Authentication for
    user weblogic denied
    java.lang.SecurityException: Authentication for user weblogic denied at
    weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    >
    <Nov 4, 2002 1:19:21 PM EST> <Emergency> <WebLogicServer> <000342> <Unable to
    in
    itialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user weblogic denied
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    >
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    Reason: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user weblogic denied
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)

    Thanks a lot Scott. I followed your instructions and got it working to a certain
    degree. I am pretty happy about the results.
    There are still a few issues:
    1. I had to create groups and users in my directory server in order to boot up
    and logon to the server. This is expected, but is it possible to export these
    user/group settings from the embedded LDAP server so that I can import them into
    my directory server? Currently, the only way is manual and it's error prone. A
    lot of trial and error has to happen to get there.
    2. It seems that using Netscape LDAP server only allows read-only access. This
    means we have to create new users/groups outside of the portal server and one
    other side effect is self-registration is impossible, unless we use custom security
    providers. Is this assessment correct? Since LDAP integration is so important,
    wouldn't it be nice if BEA have that built-in and all we need to do is to switch
    to and configure it?
    3. I got duplicate users and groups in compatibility security. Obviously, one
    set is from my LDAP server and the other is from the embedded one. I tried to
    remove to embedded LDAP authenticator, but the duplicates are still there. How
    can I get rid of the duplicates - I only want the ones from my LDAP server?
    Thanks again Scott.
    Weiguo
    Scott Dunbar <[email protected]> wrote:
    Weiguo,
    WLP 7.0 uses a compatibility realm only and will not work with the
    custom realm that you created for the Netscape directory server.
    Configuring an LDAP compatibility realm isn't too bad and its
    configuration is much like 4.0. However, it can be hard to configure
    initially from the console. One way is to shut your server down and
    modify config.xml directly - but make sure you make a backup copy first!
    Then add something like:
    <CachingRealm BasicRealm="myRealm" CacheCaseSensitive="true"
    Name="wlcsCachingRealm"/>
    <CustomRealm
    ConfigurationData="user.filter=(&(uid=%u)(objectclass=person));
    user.dn=ou=people,dc=beasys,dc=com;
    server.principal=uid=dirmanager,ou=people,dc=beasys,dc=com;
    membership.filter=(&(uniquemember=%M)(objectclass=groupofuniquenames));
    group.filter=(&(cn=%g)(objectclass=groupofuniquenames));
    server.host=somehost.beasys.com;
    group.dn=ou=groups,dc=beasys,dc=com"
    Name="myRealm" Password="your_password_here"
    RealmClassName="weblogic.security.ldaprealmv2.LDAPRealm"/>
    will enable your LDAP server. After this is setup it will be much
    easier to configure via the console. Obviously you'll need to update
    the parameters above for your configuration.
    Weiguo Wang wrote:
    Hi,
    I am trying to integrate Netscape LDAP server (6.0) with portal server7, but
    having lots of trouble doing that.
    I've followed the instructions in the developer guide and completedthe following
    steps:
    1. added a CustomRealm named defaultLDAPRealmForNetscapeDirectoryServerin config.xml
    and modified the entries to fit my environment.
    2. Deployed ldapprofile.jar and customized the env variables.
    After these two steps, nothing happened. Then I did the third step:
    3. added a iPlanet Authenticator to the realm CompatibilityRealm, whichis my
    default realm for the server.
    However, after step 3, I wasn't able to boot weblogic server. Pleasenote I have
    create two users, system and weblogic in my LDAP server.
    I copied the stack trace below. Any suggestions will be greatly appreciated.
    Weiguo
    C:\prog\bea\user_projects\portalDemoDomain>"C:\prog\bea\jdk131_03\bin\java"-hotspot
    -Xms128m -Xmx128m -XX:MaxPermSize=128m -Dcommerce.properties="C:\prog\bea\weblogic700\portal\weblogiccommerce.properties"
    -Dweblogic.Name=portalDemoServer
    -Dbea.home="C:\prog\bea" -Dweblogic.management.username= -Dweblogic.management.p
    assword= -Dweblogic.ProductionModeEnabled=true -Dweblogic.management.discover=fa
    lse -Djava.security.policy=="C:\prog\bea\weblogic700\server\lib\weblogic.policy"
    weblogic.Server
    <Nov 4, 2002 1:18:45 PM EST> <Info> <Security> <090065> <Getting bootidentity
    from user.>
    Enter username to boot WebLogic server:weblogic
    Enter password to boot WebLogic server:
    Starting WebLogic Server...
    <Nov 4, 2002 1:19:06 PM EST> <Notice> <Management> <140005> <Loadingconfiguration
    C:\prog\bea\user_projects\portalDemoDomain\.\config.xml>
    <Nov 4, 2002 1:19:21 PM EST> <Notice> <Security> <090093> <No configurationdata
    was found on server portalDemoServer for realm CompatibilityRealm.>
    <Nov 4, 2002 1:19:21 PM EST> <Notice> <Security> <090082> <Securityinitializing
    using realm CompatibilityRealm.>
    <Nov 4, 2002 1:19:21 PM EST> <Critical> <WebLogicServer> <000364> <Serverfailed
    during initialization. Exception:java.lang.SecurityException: Authenticationfor
    user weblogic denied
    java.lang.SecurityException: Authentication for user weblogic deniedat
    weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    <Nov 4, 2002 1:19:21 PM EST> <Emergency> <WebLogicServer> <000342><Unable to
    in
    itialize the server: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user weblogicdenied
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    Reason: Fatal initialization exception
    Throwable: java.lang.SecurityException: Authentication for user weblogicdenied
    java.lang.SecurityException: Authentication for user weblogic denied
    at weblogic.security.service.SecurityServiceManager.doBootAuthorization(
    SecurityServiceManager.java:1028)
    at weblogic.security.service.SecurityServiceManager.initialize(SecurityS
    erviceManager.java:1166)
    at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:697)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:589)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:277)
    at weblogic.Server.main(Server.java:32)
    scott dunbar bea systems,
    inc.
    [email protected] boulder, co
    303 998 2125 usa

  • Server 3.1.2: Unable to locate search base: -1 Can't contact LDAP server

    Hello all—
    I've been getting repeated errors below in my system.log.  I'm running OS X 10.9.3 with Server version 3.1.2.  I've replaced my actual server name with "my.servername.net" in the log entries. Thanks for any advice!  —michael
    May 30 17:47:03 leo com.apple.launchd[1] (org.openldap.slapd): Throttling respawn: Will start in 7 seconds
    May 30 17:47:04 my.servername.net PasswordService[1345]: int pwsf_GetPublicKey(char *): ldap_search_ext_s cn=authdata for Public Key returned -1
    May 30 17:47:04 leo com.apple.launchd[1] (com.apple.PasswordService[1345]): Exited with code: 1
    May 30 17:47:04 leo com.apple.launchd[1] (com.apple.PasswordService): Throttling respawn: Will start in 10 seconds
    May 30 17:47:06 my.servername.net xscertd-helper[1351]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    May 30 17:47:06 leo com.apple.launchd[1] (com.apple.xscertd-helper[1351]): Exited with code: 1
    May 30 17:47:06 leo com.apple.launchd[1] (com.apple.xscertd-helper): Throttling respawn: Will start in 10 seconds
    May 30 17:47:09 my.servername.net xscertd[335]: Failed sending LookupCRLByCARecordName command to com.apple.xscertd.helper: The operation couldn’t be completed. (com.apple.certificateserver error 42005.)
    May 30 17:47:14 my.servername.net PasswordService[1363]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    May 30 17:47:14 my.servername.net PasswordService[1363]: -[PasswordServerPrefsObject loadXMLData]: Unable to locate passwordserver config record's plist attribute: -1 Can't contact LDAP server
    May 30 17:47:14 my.servername.net PasswordService[1363]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    May 30 17:47:14 my.servername.net PasswordService[1363]: -[PasswordServerPrefsObject saveXMLData]: ldap_modify_ext_s of the passwordserver config record's plist attribute: -1 Can't contact LDAP server
    May 30 17:47:14 leo com.apple.launchd[1] (org.openldap.slapd[1359]): Exited with code: 1
    May 30 17:47:14 leo com.apple.launchd[1] (org.openldap.slapd): Throttling respawn: Will start in 7 seconds
    May 30 17:47:14 my.servername.net PasswordService[1363]: int pwsf_GetPublicKey(char *): ldap_search_ext_s cn=authdata for Public Key returned -1
    May 30 17:47:14 leo com.apple.launchd[1] (com.apple.PasswordService[1363]): Exited with code: 1
    May 30 17:47:14 leo com.apple.launchd[1] (com.apple.PasswordService): Throttling respawn: Will start in 10 seconds
    May 30 17:47:16 my.servername.net xscertd-helper[1365]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    May 30 17:47:16 leo com.apple.launchd[1] (com.apple.xscertd-helper[1365]): Exited with code: 1
    May 30 17:47:16 leo com.apple.launchd[1] (com.apple.xscertd-helper): Throttling respawn: Will start in 10 seconds
    May 30 17:47:20 my.servername.net xscertd[335]: Failed sending LookupCRLByCARecordName command to com.apple.xscertd.helper: The operation couldn’t be completed. (com.apple.certificateserver error 42005.)
    May 30 17:47:24 my.servername.net PasswordService[1375]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    May 30 17:47:24 my.servername.net PasswordService[1375]: -[PasswordServerPrefsObject loadXMLData]: Unable to locate passwordserver config record's plist attribute: -1 Can't contact LDAP server
    May 30 17:47:24 my.servername.net PasswordService[1375]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    May 30 17:47:24 my.servername.net PasswordService[1375]: -[PasswordServerPrefsObject saveXMLData]: ldap_modify_ext_s of the passwordserver config record's plist attribute: -1 Can't contact LDAP server
    May 30 17:47:25 leo com.apple.launchd[1] (org.openldap.slapd[1371]): Exited with code: 1
    May 30 17:47:25 leo com.apple.launchd[1] (org.openldap.slapd): Throttling respawn: Will start in 7 seconds
    May 30 17:47:25 my.servername.net PasswordService[1375]: int pwsf_GetPublicKey(char *): ldap_search_ext_s cn=authdata for Public Key returned -1
    May 30 17:47:25 leo com.apple.launchd[1] (com.apple.PasswordService[1375]): Exited with code: 1
    May 30 17:47:25 leo com.apple.launchd[1] (com.apple.PasswordService): Throttling respawn: Will start in 10 seconds
    May 30 17:47:26 my.servername.net xscertd-helper[1377]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    May 30 17:47:26 leo com.apple.launchd[1] (com.apple.xscertd-helper[1377]): Exited with code: 1
    May 30 17:47:26 leo com.apple.launchd[1] (com.apple.xscertd-helper): Throttling respawn: Will start in 10 seconds
    May 30 17:47:30 my.servername.net xscertd[335]: Failed sending LookupCRLByCARecordName command to com.apple.xscertd.helper: The operation couldn’t be completed. (com.apple.certificateserver error 42005.)

    Unfortunately this problem wasn't solved this way.  After dragging the Server.app to the trash and then retrieving it ("Put Back") and launching it, and re-starting services, my problem still persists.
    Here are relevant system.log file entries. (Note the hostname is "leo"—I've changed the FQDN to leo.myservername.net):
    Jun  6 22:57:31 leo.myservername.net PasswordService[1011]: int pwsf_GetPublicKey(char *): ldap_search_ext_s cn=authdata for Public Key returned -1
    Jun  6 22:57:31 leo com.apple.launchd[1] (com.apple.PasswordService[1011]): Exited with code: 1
    Jun  6 22:57:31 leo com.apple.launchd[1] (com.apple.PasswordService): Throttling respawn: Will start in 10 seconds
    Jun  6 22:57:32 leo.myservername.net xscertd-helper[1014]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    Jun  6 22:57:32 leo com.apple.launchd[1] (com.apple.xscertd-helper[1014]): Exited with code: 1
    Jun  6 22:57:32 leo com.apple.launchd[1] (com.apple.xscertd-helper): Throttling respawn: Will start in 10 seconds
    Jun  6 22:57:34 leo.myservername.net xscertd[333]: Failed sending LookupCRLByCARecordName command to com.apple.xscertd.helper: The operation couldn’t be completed. (com.apple.certificateserver error 42005.)
    Jun  6 22:57:40 leo com.apple.launchd[1] (org.openldap.slapd[1016]): Exited with code: 1
    Jun  6 22:57:40 leo com.apple.launchd[1] (org.openldap.slapd): Throttling respawn: Will start in 7 seconds
    Jun  6 22:57:40 leo.myservername.net com.apple.SecurityServer[22]: Session 100004 created
    Jun  6 22:57:41 leo.myservername.net PasswordService[1024]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    Jun  6 22:57:41 leo.myservername.net PasswordService[1024]: -[PasswordServerPrefsObject loadXMLData]: Unable to locate passwordserver config record's plist attribute: -1 Can't contact LDAP server
    Jun  6 22:57:41 leo.myservername.net PasswordService[1024]: -[PasswordServerPrefsObject getSearchBase]: Unable to locate search base: -1 Can't contact LDAP server
    Jun  6 22:57:41 leo.myservername.net PasswordService[1024]: -[PasswordServerPrefsObject saveXMLData]: ldap_modify_ext_s of the passwordserver config record's plist attribute: -1 Can't contact LDAP server
    Jun  6 22:57:41 leo.myservername.net PasswordService[1024]: int pwsf_GetPublicKey(char *): ldap_search_ext_s cn=authdata for Public Key returned -1
    Jun  6 22:57:41 leo com.apple.launchd[1] (com.apple.PasswordService[1024]): Exited with code: 1
    Jun  6 22:57:41 leo com.apple.launchd[1] (com.apple.PasswordService): Throttling respawn: Will start in 10 seconds
    Jun  6 22:57:42 leo.myservername.net xscertd-helper[1028]: ldap_search_ext_s returned -1 - Can't contact LDAP server when searching for bdb suffix, exiting
    Jun  6 22:57:42 leo com.apple.launchd[1] (com.apple.xscertd-helper[1028]): Exited with code: 1
    Jun  6 22:57:42 leo com.apple.launchd[1] (com.apple.xscertd-helper): Throttling respawn: Will start in 10 seconds
    Jun  6 22:57:45 leo.myservername.net xscertd[333]: Failed sending LookupCRLByCARecordName command to com.apple.xscertd.helper: The operation couldn’t be completed. (com.apple.certificateserver error 42005.)
    Also, for what it's worth, "Open Directory" in the Server.app has no settings within it. Nor will it stay "on." I'm not using OD per se, and am happy to leave it off, but it's possible the errors above are preventing it from running.
    Thanks for any other solutions. —michael

  • Exfolders.exe tool crashes on Exchange 2007 server

    I've downloaded Exfolders.exe and I'm trying to run it on my Exchange 2007 server but it crashes everytime.  I get an APPCRASH with a fault module name of kernel32.dll
    http://gallery.technet.microsoft.com/Exchange-2010-RTM-<//wbr>ExFolders-c76c3649
    I followed all the instructions step by step.
    How do I fix this?

    Hi,
    You didn't see this information?
    ExFolders must be run from an
    Exchange 2010 server - it cannot be run from a workstation as PFDAVAdmin could. It can connect to Exchange 2010 or Exchange 2007, but not older versions.
    PFDavAdmin is the tool to use on Exchange 2007
    http://www.microsoft.com/en-us/download/details.aspx?id=22427
    Martina Miskovic

  • Exchange 2013 Server Migration

    Hello,
    We are in the process of migrating from an Exchange 2003 server to an Exchange 2013 SP1 server. The EXCH2003 server is in a separate domain environment than the new EXCH2013 server. We plan to export all mail from the EXCH2003 server and import to the EXCH2013
    server.
    At this time we are seeing an issue with the new EXCH2013 SP1 server. When we test creating a new profile in Outlook 2010 SP2 on a client machine we receive the following errors:
    1) The action cannot be completed. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.
    - also -
    2) The name cannot be resolved. The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete this action.
    We are able to access OWA both internally and externally and can login under multiple user accounts. Also while logged into OWA, mail flow is working, able to send and receive.
    We installed and configured a new SSL trusted certificate on the Exchange 2013 SP1 server as well.
    At this time our main issue is with Outlook 2010 SP2 and Exchange 2013 SP1 not communicating with each other properly.
    Please let us know what other information is needed to help resolve this issue.
    Thank you,
    Jason Ringholz
    Regards, Jason

    As commented by ED please make sure autodiscover is pointed to exchange2013. 
    Please try to restart the services, restart  "MS exchange active directory topology services" It will restart the dependent services. Please restart "Microsoft Exchange System Attendant" service also and try
    After this try creating a test mailbox in exchange2013 and try to configure the newly created mailbox in outlook2010.
    http://support.sherweb.com/Faqs/Show/manual-configuration-guide-for-outlook-2010-exchange-2013
    Test OutlookAnywhere using
    https://www.testexchangeconnectivity.com/ and check for any error.
    Make sure you can ping exchange2013 server by it's name(Netbiosname and FQDN)
    Thanks,
    MAS
    Please mark as helpful if you find my comment helpful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you.

  • I can't get at my LDAP server using JMQ 1.1.  What's wrong?

    I have jmq 1.1 running on solaris. We have recently installed an ldap server on another box to provide access for jndi. I am trying to run the
    jmqconfig program to add topic by issuing the following command ...
    /opt/SUNWjmq/bin/jmqconfig -a -t t -n "cn=myTopic" -o "name=This is my Test Topic" -o "host=apollo" -o "subnet=5" -i "com.s
    un.jndi.ldap.LdapCtxFactory" -u "ldap://e-rewards.com:389/o=dev.e-rewards.com" -s simple -p "uid=devadm, o=dev.e-rewards.co
    m" -c dev999
    I am getting this message...
    Error: You have problems with access control. Please verify that
    your jmqadmin.policy file is setup properly.
    Can you tell me what I need to do to the jmqadmin.policy file to make this work?

    It looks like there is a CommunicationException while trying
    to talk to the LDAP server. Please check the SocketPermission
    entry in the jmqadmin.policy file to ensure network permission
    to the LDAP server host/port is granted. If the jmqadmin.policy
    file looks OK, I'd suggest to try a simple JNDI example which
    talks to the LDAP server to see if communication to the LDAP
    server is fine by using a similar java.security.policy file
    as jmqadmin.policy (please see JMQ 1.1 QuickStart guide chapter
    4 for more information on security policy files).
    Please note that iMQ 2.0 (formerly named JMQ) has been released

  • How to determine the error code, returned from LDAP server

    I use the next code for connect to LDAP server:
            try{
                ctx = new InitialLdapContext(env, null);
                 //if connection successfull ...
            } catch (NamingException){
                 //if error occured ...
            }Is it possible to determine the numeric error code, returned from server?

    I was just working on using openldap, binding to it and checking for expired passwords and locked accounts and it looks like that an AuthenticationException is thrown in these circumstances and the ctx is null so it is not possible process connection response controls. But you can look at operation attributes if you have password policy enabled and you are looking for these type of errors

  • When sending e-mail messages to a mail-enabled public folder that have been replicated from old Exchange Server 2000/2003/2007, Exchange Server 2010 environment mails are rejected with NDR.

    Hi, I would like to share with you issue that I’ve solved regarding mail-enabled PF that migrated from Exchange 2000/2003/2007 to 2010, I’ve searched & contacted my MVP leader – there’s no official KB regarding this issue right
    now, so I’m posting here in order to share this among others.
    Note: There’s article(s) that talked about PF replication from Exch2000/2003/2007 to 2010 – this is the same issue as well.
    Symptoms
    E-mail messages that been sent to mail-enabled public folder in Exchange Server 2010 environment rejected with the following NDR:
    “#< #5.2.0 smtp;554 5.2.0 STOREDRV.Deliver.Exception:ObjectNotFoundException; Failed to process message due to a permanent exception with message The Active Directory user wasn’t found. ObjectNotFoundException: The Active Directory
    user wasn’t found.> #SMTP#”
    Sometimes Exchange Server 2010 is documented as well Event ID 1020 on the Event Viewer with this information:
    “Log Name: Application
    Source: MSExchange Store Driver
    Event ID: 1020
    Level: Error
    Description:
    The store driver couldn’t deliver the public folder replication message "Hierarchy ([email protected])" because the following error occurred: The Active Directory user wasn't found.”
    Cause
    In an environment where Microsoft Exchange Server 2000 or Microsoft Exchange Server 2003 previously existed, and all those servers have been removed, there is a chance that an Administrative Group (First Administrative Group or another custom Administrative
    Group) remains with a Servers container, but no servers inside it.
    During replication, when the Exchange 2010 Store Driver sees the empty Servers container in Active Directory, it's expecting a System Attendant object inside the container and when it is not found the error occurs.
    Resolution
    To work around the issue, delete the empty Servers container. This can't be done through Exchange System Manager. Use the ADSI Edit tool to remove it using the following steps:
    Warning If you use the ADSI Edit snap-in, the LDP utility, or any other LDAP version 3 client, and you incorrectly modify the attributes of Active Directory objects, you can cause serious problems. These problems may require you to reinstall Microsoft Windows
    2003 Server, Microsoft Windows Server 2008, Microsoft Exchange 2010 Server or both Windows and Exchange. Microsoft cannot guarantee that problems that occur if you incorrectly modify Active Directory object attributes can be solved. Modify these attributes
    at your own risk.
    1.      
    Start the ADSI Edit MMC Snap-in. Click Start, then
    Run, and type adsiedit.msc, and then click OK.
    2.      
    Connect & Expand the Configuration Container [YourServer.DNSDomainName.com], and then expand
    CN=Configuration,DC=DNSDomainName,DC=com.
    3.      
    Expand CN=Services, and then CN=Microsoft Exchange, and then expand
    CN=YourOrganizationName.
    4.      
    You will see an empty Administrative Group. Expand the
    CN=YourAdministrativeGroupName.
    5.      
    Expand CN=Servers.
    6.      
    Verify there are no server objects listed under the
    CN=Servers container.
    7.      
    Right click on the empty CN=Servers container and choose
    Delete.
    8.      
    Verify the modification, and try to send again the E-mail to the mail-enabled public folder.
    Applies to
    Exchange Server 2010, Standard Edition
    Exchange Server 2010, Enterprise Edition
    Netanel Ben-Shushan, MCSA/E, MCTS, MCITP, Windows Expert-IT Pro MVP. IT Consultant & Trainer | Website (Hebrew): http://www.ben-shushan.net | IT Services: http://www.ben-shushan.net/services | Weblog (Hebrew): http://blogs.microsoft.co.il/blogs/netanelb
    | E-mail: [email protected]

    Sounds like you are looking in the wrong Administrative Group container which is why you are seeing your Exchange 2010 servers in there.
    When you install Exchange 2003 only you will see a container named by default as "CN=First Administrative Group" container. But this could be named anything if you changed the Organization Name on the installation when you installed the first
    Exchange 2003 server into the domain/forest. 
    You will notice that when you install Exchange 2010 part of the AD setup is to create a new configuration container and is named by default "CN=First Administrative Group (FYDIBOHF23SPDLT)".
    So it sounds like you are not looking in the right location within ADSIEdit. 
    You may find the following article also helpful for this issue which is the same resolution:
    http://blogs.technet.com/b/sbs/archive/2012/05/17/empty-cn-servers-container-causing-issues-with-public-folders-on-small-business-server-2011.aspx
    I recommend though that you ensure your Exchange 2003 servers are fully uninstalled or no longer present in your environment before you go deleting the Servers container though.. The following Microsoft article will help with this:
    http://technet.microsoft.com/en-gb/library/gg576862(v=exchg.141).aspx

  • What should be done in certmap.conf for 2-way SSL support from a standalone Java application to an SSL enabled LDAP Server

    To support certficate based client authentication using 2-way SSL from a standalone java application which uses JNDI and JSSE1.0.2 to connect to an SSL enabled LDAP Server how do we configure the certmap.conf?Is there any additional setup required at the LDAP Server side apart from enablinf SSL with the option"Required Client Authentication" enabled.The 2 way SSL handshake goes through but the access log file (After configuring the certmap.conf for the issuer DN of the client certficate etc..)shows SSL failed to LDAP DN?But inspite of this access log error the Java client does get an SSL Connection object with which it is able to connect to the LDAP.IS the certmap.conf file being looked up by the LDAP Server at all?

    have you out.flush() and out.close() before you call connection.getInputStream()?

  • Unable to Retrieve Attributes from LDAP Server

    I have a problem. I was wondering if anyone can assist me. I am new to LDAP servers and JNDI. I cannot retrieve any attributes from the users listed in my data entry. Any assistance would be greatly appreciated! Thanks.
    I created an entry in the LDAP server that looks like this:
    �o=somedn�
    |
    �ou=people, o=somedn�
    The �ou=people, o=somedn� entry contains fictitious users. The LDAP server is connected to a MySQL database. When I write Java code to read the attributes of a given user whose fullname (cn) is �Vinny Luigi�, as listed in the database, I receive an error that starts with the following:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Vinny Luigi,ou=people'
    The code I used is based on the Sun JNDI tutorial. Sun�s code is at http://java.sun.com/products/jndi/tutorial/basics/directory/src/GetattrsAll.java. My version of the code is below:
    * @(#)GetattrsAll.java     1.5 00/04/28
    * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
    * Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free,
    * license to use, modify and redistribute this software in source and
    * binary code form, provided that i) this copyright notice and license
    * appear on all copies of the software; and ii) Licensee does not
    * utilize the software in a manner which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any
    * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
    * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
    * HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE
    * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
    * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
    * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
    * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
    * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
    * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
    * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line
    * control of aircraft, air traffic, aircraft navigation or aircraft
    * communications; or in the design, construction, operation or
    * maintenance of any nuclear facility. Licensee represents and warrants
    * that it will not use or redistribute the Software for such purposes.
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    * Demonstrates how to retrieve all attributes of a named object.
    * usage: java GetattrsAll
    class GetattrsAll
         static void printAttrs(Attributes attrs)
              if (attrs == null)
                   System.out.println("No attributes");
              else
                   /* Print each attribute */
                   try
                        for (NamingEnumeration ae = attrs.getAll(); ae.hasMore();)
                             Attribute attr = (Attribute) ae.next();
                             System.out.println("attribute: " + attr.getID());
                             /* print each value */
                             for (NamingEnumeration e = attr.getAll(); e.hasMore(); System.out.println("value: " + e.next()) )
                   } catch (NamingException e) {
                        e.printStackTrace();
         public static void main(String[] args) {
              // Set up the environment for creating the initial context
              Hashtable env = new Hashtable(100);
              env.put(Context.INITIAL_CONTEXT_FACTORY,
                        "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://localhost:10389/o=somedn");
              try {
                   // Create the initial context
                   DirContext ctx = new InitialDirContext(env);
                   // Get all the attributes of named object
                   System.out.println("About to use ctx.getAttributes()");
                   Attributes answer = ctx.getAttributes("cn=Vinny Luigi,ou=people");
                   // Print the answer
                   printAttrs(answer);
                   // Close the context when we're done
                   ctx.close();
              } catch (Exception e) {
                   e.printStackTrace();
    The primary key of the database is id_pk. Below is a copy of the mapping.xml file which maps the LDAP server entry to the database:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapping PUBLIC "-//Penrose/DTD Mapping 1.2//EN" "http://penrose.safehaus.org/dtd/mapping.dtd">
    <mapping>
    <entry dn="o=somedn">
    <oc>organization</oc>
    <oc>top</oc>
    <at name="o" rdn="true">
    <constant>somedn</constant>
    </at>
    <aci>
    <permission>rs</permission>
    </aci>
    </entry>
    <entry dn="ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>organizationalUnit</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="cn">
    <constant>"fullname"</constant>
    </at>
    <at name="ou" rdn="true">
    <constant>people</constant>
    </at>
    <at name="sn">
    <constant>"lastname"</constant>
    </at>
    </entry>
    <entry dn="id_pk=...,ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="Position_">
    <variable>usertable9.Position_</variable>
    </at>
    <at name="id_pk" rdn="true">
    <variable>usertable9.id_pk</variable>
    </at>
    <at name="fullname">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="lastname">
    <variable>usertable9.lastname</variable>
    </at>
    <at name="cn">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="sn">
    <variable>usertable9.lastname</variable>
    </at>
    <source name="usertable9">
    <source-name>usertable9</source-name>
    <field name="Position_">
    <variable>Position_</variable>
    </field>
    <field name="id_pk">
    <variable>id_pk</variable>
    </field>
    <field name="fullname">
    <variable>cn</variable>
    </field>
    <field name="lastname">
    <variable>sn</variable>
    </field>
    </source>
    </entry>
    </mapping>
    Thanks.

    The complete name (Distinguished Name) of the user you're searching is 'cn=Vinny Luigi,ou=people,o=somedn'.
    Regards,
    Ludovic.

  • Select employee id from ldap server

    Hello Everyone,
    I don't know LDAP. Because of sorry. If I say about my question incorrectly, please correct and ask me.
    I use authentication LDAP server in my APEX application. Employees have username, password and employee_id.
    Firstly, employee entry the applicatioın with username, password. So, I find his employee_id by using username. I didn't find example about it.
    How can i do? Any suggestion?
    Thanks.

    Does this peace of code help? It searches the LDAP directory. Specify the variables correctly. Hope this helps.
    DECLARE
    retval PLS_INTEGER;
    my_session DBMS_LDAP.session;
    my_attrs DBMS_LDAP.string_collection;
    my_message DBMS_LDAP.message;
    my_entry DBMS_LDAP.message;
    entry_index PLS_INTEGER;
    my_dn VARCHAR2(256);
    my_attr_name VARCHAR2(256);
    my_ber_elmt DBMS_LDAP.ber_element;
    attr_index PLS_INTEGER;
    i PLS_INTEGER;
    my_vals      DBMS_LDAP.STRING_COLLECTION ;
    ldap_host VARCHAR2(256);
    ldap_port VARCHAR2(256);
    ldap_user VARCHAR2(256);
    ldap_passwd VARCHAR2(256);
    ldap_base VARCHAR2(256);
    BEGIN
    retval := -1;
    -- Please customize the following variables as needed
    ldap_host := 'specify host';
    ldap_port := '389';
    -- In case of update/insert/delete need change ldap_user to other.
         -- ldap_user := 'cn=orcladmin';
         -- ldap_passwd:= 'welcome';
    -- set User and password to NULL for anonymous user.
    ldap_user := 'user@domain';
    ldap_passwd:= 'Password';
    ldap_base := 'CN=Users,DC=specify DC';
    -- end of customizable settings
    -- Start output Header--
    DBMS_OUTPUT.PUT_LINE('+++++++++++++++++++++++++++++++++++++++++++++++++++');
    DBMS_OUTPUT.PUT('> DBMS_LDAP Search Example ');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE(RPAD('> LDAP Host ',25,' ') || ': ' || ldap_host);
    DBMS_OUTPUT.PUT_LINE(RPAD('> LDAP Port ',25,' ') || ': ' || ldap_port);
    -- Choosing exceptions to be raised by DBMS_LDAP library.
    DBMS_LDAP.USE_EXCEPTION := TRUE;
    my_session := DBMS_LDAP.init(ldap_host,ldap_port);
    DBMS_OUTPUT.PUT_LINE (RPAD('> Ldap session ',25,' ') || ': ' ||
    RAWTOHEX(SUBSTR(my_session,1,8)) ||
    '(returned from init)');
    -- bind to the directory
    retval := DBMS_LDAP.simple_bind_s(my_session,
    ldap_user, ldap_passwd);
    DBMS_OUTPUT.PUT_LINE(RPAD('> simple_bind_s Returns ',25,' ') || ': '
    || TO_CHAR(retval));
    -- issue the search
    my_attrs(1) := 'dn'; -- retrieve all attributes
    retval := DBMS_LDAP.search_s(my_session, ldap_base,
    DBMS_LDAP.SCOPE_SUBTREE,
    'objectclass=*',
    my_attrs,
    0,
    my_message);
    DBMS_OUTPUT.PUT_LINE(RPAD('> search_s Returns ',25,' ') || ': '
    || TO_CHAR(retval));
    DBMS_OUTPUT.PUT_LINE (RPAD('> LDAP message ',25,' ') || ': ' ||
    RAWTOHEX(SUBSTR(my_message,1,8)) ||
    '(returned from search_s)');
    -- count the number of entries returned
    retval := DBMS_LDAP.count_entries(my_session, my_message);
    DBMS_OUTPUT.PUT_LINE(RPAD('> Number of Entries ',25,' ') || ': '
    || TO_CHAR(retval));
    DBMS_OUTPUT.PUT_LINE('+++++++++++++++++++++++++++++++++++++++++++++++++++');
    -- End output Heading --
    -- get the first entry
    my_entry := DBMS_LDAP.first_entry(my_session, my_message);
    entry_index := 1;
    -- Loop through each of the entries one by one
    while my_entry IS NOT NULL loop
    -- print the current entry
    my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
    -- DBMS_OUTPUT.PUT_LINE (' entry #' || TO_CHAR(entry_index) ||
    -- ' entry ptr: ' || RAWTOHEX(SUBSTR(my_entry,1,8)));
    DBMS_OUTPUT.PUT_LINE (' dn: ' || my_dn);
    my_attr_name := DBMS_LDAP.first_attribute(my_session,my_entry,
    my_ber_elmt);
    attr_index := 1;
    while my_attr_name IS NOT NULL loop
    my_vals := DBMS_LDAP.get_values (my_session, my_entry,
    my_attr_name);
    if my_vals.COUNT > 0 then
    FOR i in my_vals.FIRST..my_vals.LAST loop
    DBMS_OUTPUT.PUT_LINE(' ' || my_attr_name || ' : ' ||
    SUBSTR(my_vals(i),1,200));
    end loop;
    end if;
    my_attr_name := DBMS_LDAP.next_attribute(my_session,my_entry,
    my_ber_elmt);
    attr_index := attr_index+1;
    end loop;
    my_entry := DBMS_LDAP.next_entry(my_session, my_entry);
    DBMS_OUTPUT.PUT_LINE(' --------------------------------------------------- ');
    entry_index := entry_index+1;
    end loop;
    -- unbind from the directory
    retval := DBMS_LDAP.unbind_s(my_session);
    DBMS_OUTPUT.PUT_LINE(RPAD('unbind_res Returns ',25,' ') || ': ' ||
    TO_CHAR(retval));
    -- Start Output Footer --
    DBMS_OUTPUT.PUT_LINE('Directory operation Successful .. exiting');
    -- Start Output Footer --
    -- Handle Exceptions
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(' Error code : ' || TO_CHAR(SQLCODE));
    DBMS_OUTPUT.PUT_LINE(' Error Message : ' || SQLERRM);
    DBMS_OUTPUT.PUT_LINE(' Exception encountered .. exiting');
    END;
    /

Maybe you are looking for

  • Integrate Google Adsense in Adobe Web Photo Gallery

    Hi, Is there a way to integrate my Google Adsense account into the webpage created by Adobe Bridge Web Photo Gallery? Thanks, Albert

  • Wrong order on cd after burning

    for some reason, the playlist that i have is not burning in the same order onto a cd... the songs have numbers on them and i made sure that i clicked the album order in the playlist.. but it still burns in the wrong order... alphabetically help? plea

  • Can TOC Book Default to Open?

    Is it possible to have a book in your TOC default to being open when the site is accessed? I have several books, but would like the first one to default to an open state while the remaining books default to closed. Thanks, Maggie

  • Catalog optimization is very slow

    LR 3.x or 4.x works fine on my 2009 iMac 3,06 Gz but once a week I accept his proposal to optimize the Catalog : this can take 30 minutes to one hour (or more) and this puts my Mac on his knees while optimization is in progress. Why ??? Any idea ? Th

  • "Open With" in Finder/Mail Causes Time Machine Disk to spin up

    When Leopard builds a list of suitable applications for "Open With" it spins up the Time Machine disk. This is bad for several reasons: 1) it slows down what used to be an almost instantaneous process 2) The list of applications contains some things