How to get LDAP sub-error code using JNDI (MD5 or any other SASL mechanism)

Hi All,
My objective is to find out if a user name exists in LDAP/Active Directory. I understand that there are specific sub error codes, like below:
· 525 - user not found
· 52e - invalid credentials
· 530 - not permitted to logon at this time
· 532 - password expired
· 533 - account disabled
· 701 - account expired
· 773 - user must reset password
· 775 - account locked.
When I tried with "simple" authentication, I am able to get exact reason code from which I can understand what went wrong.
Here's the code snippet:
     Hashtable<String, Object> env = new Hashtable<String, Object>();
          env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
*     env.put(Context.SECURITY_AUTHENTICATION,"simple");*
          env.put(Context.SECURITY_PRINCIPAL, "myUser");
          env.put(Context.SECURITY_CREDENTIALS, "mySecret");
          env.put(Context.PROVIDER_URL, "ldap://10.10.10.10:389/");
          env.put("com.sun.jndi.ldap.trace.ber", System.err); //debug trace
          DirContext ctx = null;
     try {
               ctx = new InitialLdapContext(env, null);
          } catch (javax.naming.AuthenticationException ae) {
               System.out.println("Message: "+ae.getMessage());
               ae.printStackTrace();
Output:
[LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error, *data 525*, vece_
From above output it's clear that the sub error code is 525, that means User Not Found
If I want to achieve the same thing with Digest-MD5 algorithm, I am always getting sub error code as 0 from which I am not at all able to understand what went wrong.
Here's my code snippet:
             Hashtable<String, Object> env = new Hashtable<String, Object>();
          env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
        *     env.put(Context.SECURITY_AUTHENTICATION,"Digest-MD5");*
          env.put(Context.SECURITY_PRINCIPAL, "myUser");
          env.put(Context.SECURITY_CREDENTIALS, "mySecret");
          env.put(Context.PROVIDER_URL, "ldap://10.10.10.10:389/");
          env.put("com.sun.jndi.ldap.trace.ber", System.err); //debug trace
          DirContext ctx = null;
                 try {
               ctx = new InitialLdapContext(env, null);
          } catch (javax.naming.AuthenticationException ae) {
               System.out.println("Message: "+ae.getMessage());
               ae.printStackTrace();
Output:
[LDAP: error code 49 - 8009030C: LdapErr: DSID-0C09043E, comment: AcceptSecurityContext error, *data 0*, vece_
From the above sub error code 0, it's very difficult to understand what went wrong with the credentails.
Can any one help me out to find out what I am missing? Any help in this regard is highly appreciated.
Please let me know if there's any other way to check if the user exists in  LDAP/Active Directory.
Thanks a lot,
Siva.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Thank you,
As i was trying to obtain the input to UI from an xml file by which the axis converts to java objects and inturn have to get the reply as xml file . The error was in the jar files ,when i loaded the jar files another time my code started working.

Similar Messages

  • Can any one tell me how to get rid of error code ox80010108

    can any one tell me how to get rid of error code ox80010108 when i put a dvd in my hp touchsmart 520 thanks

    Hello @charly6,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that you are getting the error 0x80010108 when you insert your CD into your Optical Drive on your HP Touchsmart 520 Desktop PC. The error you are receiving is related to Windows Essentials and I suggest that you download and install the latest version from the Windows Essentials website. I believe that Windows Essentials was aware of this error and have corrected it in their updates.
    Please re-post if you require additional support. Thank you for posting on the HP Forums. Have a great day!
    Please click the "Thumbs Up" on the bottom right of this post to say thank you if you appreciate the support I provide!
    Also be sure to mark my post as “Accept as Solution" if you feel my post solved your issue, it will help others who face the same challenge find the same solution.
    Dunidar
    I work on behalf of HP
    Find out a bit more about me by checking out my profile!
    "Customers don’t expect you to be perfect. They do expect you to fix things when they go wrong." ~ Donald Porter

  • How to get End System error code?

    I am trying to access IBM MQ queue from my proxy service which is invoking a business service using OSB Service Callout Action.
    Suppose the queue that I am trying to access is not available, OSB is always returning "OSB Service Callout action received an error response" error.
    But, I want the Error code and message which are returned by IBM MQ.
    Pls. help me to get the IBM error code & message.
    I am usiing IBM MQ v7 and OSB 11g
    Thanks,
    Hari

    Can you check the Fault Detail and log the $fault and check.
    Edited by: Prabu on Oct 15, 2012 2:46 PM

  • TS1372 Doesn't work. I've tried all steps twice. I'm still getting the "1430 Error Data is corrupted" message. Any other ideas?

    The last time I synchronized my iPod Classic, everything looked normal. I could see all my new songs were copied down to my iPod. When I used my iPod after that, it showed no movies or music files. I tried synchronizing it again, iTunes showed a "Restore your iPod" message, I did. When I plugged it back again, iTunes said my iPod was 'damaged'. After searching for online help, I only got the http://support.apple.com/kb/TS1372?viewlocale=en_US&locale=en_US steps to restore it. I tried all steps possible twice.
    I bought my iPod two months ago (late December, 2012) I own a MacBook Pro, and my operating system is Mac OS X 10.6.8, I downloaded the latest version of iTunes as well. Please help. I'm desperate.

    The last time I synchronized my iPod Classic, everything looked normal. I could see all my new songs were copied down to my iPod. When I used my iPod after that, it showed no movies or music files. I tried synchronizing it again, iTunes showed a "Restore your iPod" message, I did. When I plugged it back again, iTunes said my iPod was 'damaged'. After searching for online help, I only got the http://support.apple.com/kb/TS1372?viewlocale=en_US&locale=en_US steps to restore it. I tried all steps possible twice.
    I bought my iPod two months ago (late December, 2012) I own a MacBook Pro, and my operating system is Mac OS X 10.6.8, I downloaded the latest version of iTunes as well. Please help. I'm desperate.

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • I have recently restored everything on my iMac after getting a new hard drive. When i try to use Elements, i get the following error code   ERROR  150:30. Any ideas?

    I have recently restored everything on my iMac after getting a new hard drive. When i try to use Elements, i get the following error code   ERROR  150:30. Any ideas?

    Did you use migration assistant to copy over programs, documents, and settings? You can't do that with PSE. Elements is not a tidy package in accordance with the apple developer guidelines. The installer strews stuff all of your hard drive in place the migration assistant isn't programmed to look and you can never hope to find all h the bits. You must always install PSE from scratch on a new machine. By attempting to copy it you have made a lot of trouble for yourself.
    You will need to download and run this:
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    and then you can go around and manually remove what you can reach. Look in applications, your hard drive>library>application support>adobe, your username>library>preferences. In the user library also delete any saved application states for PSE.
    Then you can reinstall from scratch.

  • How can I get past installation error code 1935?

    Hi, I am unable to download Adobe Pro successfully - I keep getting error code 1935. Thanks for any assistance!

    Hi John,
    I would suggest taking a backup of the registry before trying the steps below.
    We cannot provide support for any issues that may occur due to editing the registry, so we would recommend to do a full registry backup before making any changes.
    An unsuccessful install of prior Windows Updates OR Custom MSI packages could have left over faulty registry keys under HKEY_LOCAL_MACHINE\COMPONENTS.
    http://support.microsoft.com/kb/970652
    This problem may occur if any of the following values exist in the Windows registry:
    HKEY_LOCAL_MACHINE\COMPONENTS\PendingXmlIdentifier
    HKEY_LOCAL_MACHINE\COMPONENTS\NextQueueEntryIndex
    HKEY_LOCAL_MACHINE\COMPONENTS\AdvancedInstallersNeedResolving
    I've found the following two entries under the Registry hive "HKEY_LOCAL_MACHINE\COMPONENTS\" - "PendingXmlIdentifier" and "AdvancedInstallersNeedResolving."
    Some users were able to install the patch successfully after running the Microsoft fixit (http://go.microsoft.com/?linkid=9643523) followed by a reboot.
    Regards,
    Rave

  • How to get the last error for while loop?

    How to get the last error for while loop? I just want transfer the last error for while loop, but the program use the shift register shift all error every cycle.

    What do you mean by "get" and "transfer"?
    If the shift register is not what you want, use a plan tunnel instead.
    Typically, programmers are interested in the first, not last, error.
    Can you show us your code so we have a better idea what you are trying to?
    LabVIEW Champion . Do more with less code and in less time .

  • Every time i launch garageband i get this message "Error code 28773 was returned by the Audio driver."

    HI. I just got a new macbook pro 15".
    every time i launch garageband i get this message
    "Error code 28773 was returned by the Audio driver."
    when i hit record, the shaded area in GB starts to advance, but it doesn't record any sound, and when i hit the space bar, the recorded area disappears.
    anyone know how to fix this?
    I have installed BOOM, but i think that's the only extra sound software i have.]
    PLEASE HELP!
    thanks,
    mojoman22

    Please read this whole message carefully, especially the warnings, before doing anything.
    1. The changes to your configuration suggested here should be considered provisional; they may not solve your problem, or they may remove functionality that you find useful. If a third-party system modification that you want to keep is causing the problem, seek help from its developer.
    2. WARNING: Back up all data now if you haven’t already done so. Before proceeding, you must be sure you can restore your system to its present state, even if it becomes unbootable. If you’re not sure you can do that, STOP — DON’T CHANGE ANYTHING. If you’re dissatisfied with the results of the procedure suggested below, restore from your backup. I will not be responsible for the consequences, and I will not be able to help, if you ignore this warning.
    3. You should either remove or update the following system modification(s), if an update is available from the developer:
    Parallels
    and definitely remove at least the following:
    Boom
    † MacKeeper
    † VirusBarrier
    4. Whatever you remove must be removed completely, and (unless otherwise specified in this message) the only way to do that is to use the uninstallation tool, if any, provided by the third-party developers, or to follow their instructions. If the software has been incompletely removed, you may have to re-download or even reinstall it in order to finish the job. I can't be more specific, because I don't install such things myself. Please do your own research.
    Here are some general guidelines to get you started. Suppose you want to remove something called “BrickYourMac.” First, consult the product's Help menu, if there is one, for instructions. Finding none there, look on the developer's website, say www.brickyourmac.com. (That may not be the actual name of the site; if necessary, search the web for the product name.) If you don’t find anything on the website or in your search, email the developer. While you're waiting for a response, download BrickYourMac.dmg and open it. There may be an application in there such as “Uninstall BrickYourMac.” If not, open “BrickYourMac.pkg” and look for an Uninstall button.
    Again, please don't ask me to do this research for you. You can do it better than I can, because I haven't installed the product and I may not even know what it is.
    If you can’t remove software in any other way, you’ll have to erase your boot volume and perform a clean reinstallation of OS X. Never install any third-party software unless you're sure you know how to uninstall it; otherwise you may create problems that are very hard to solve.
    WARNING: Trying to remove complex system modifications by hunting for files by name often will not work and may make the problem worse. The same goes for "utilities" that purport to remove software.
    5. I recommend that you never reinstall the modifications marked with a dagger (†) above, if any. If your problem is resolved after uninstalling all the above modifications and rebooting, but you still want to use some of those not marked with a dagger, you can experiment with putting them back, one at a time, testing carefully after each step. Keep in mind that system modifications may be incompatible with each other or with future OS X updates, so it may not be clear which one is at fault.
    6. If you still have problems after making the suggested changes and rebooting, post again. Remember: if you don’t like the results of this procedure, you can undo it by restoring from the last backup you made before you started.
    Remove the "MacKeeper" crapware as follows.
    Note: These instructions apply to the version of the product that I downloaded and tested in early 2012. I can't be sure that they apply to other versions, nor do I intend to repeat the test.
    IMPORTANT: "MacKeeper" has what the developer calls an “encryption” feature. In my tests, I didn't try to verify what this feature really does. If you used it to “encrypt” any of your files, “decrypt” them before you uninstall, or (preferably) restore the files from backups made before they were “encrypted.” As the developer is not trustworthy, you should assume that the "decrypted" files are corrupt unless proven otherwise.
    In the Finder, select Go ▹ Applications from the menu bar, or press the key combination shift-command-A. The "MacKeeper" application is in the folder that opens. Quit it if it's running, then drag it to the Trash. A dialog will pop up asking why you want to uninstall it. You don't have to provide that information. Enter anything you like in the text box, then click the Uninstall button. All the functional components of the software will be deleted. That's the only useful feature of "MacKeeper:" it deletes itself. Reboot.
    Do not try to uninstall by dragging the MacKeeper icon in the Dock or the LaunchPad to the Trash.
    Here are some general suggestions. If you want your computer to be usable, don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” “extenders,” “cleaners,” “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, this kind of material is useless, or worse than useless.
    The more actively promoted the product, the more likely it is to be garbage. The most extreme example is the “MacKeeper” scam.
    The only software you should install is that which directly enables you to do the things you use a computer for — such as creating, communicating, and playing — and does not modify the way other software works. Never install any third-party software unless you know how to uninstall it.

  • Hi- I applied the iTunes up to my Windows 7 86bit PC last Wednesday and iTunes will not load due to a Runtime error r6034Access to C Runtime Library Incorrectly. Then I get an windows error code 1114. I have tried rollling back and reinstalling but no joy

    Hi- I applied the iTunes up to my Windows 7 86bit PC last Wednesday and iTunes will not load due to a Runtime error r6034Access to C Runtime Library Incorrectly. Then I get an windows error code 1114. I have tried rollling back and reinstalling but no joy

    Hi Keen itunes User,
    Thanks for using Apple Support Communities.  This article has steps you can take for the error you're seeing:
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    Cheers,
    - Ari

  • How to get vendor and company code based on logistic invoice document

    how to get vendor and company code based on logistic invoice document in abap/4?

    Hello Kumar
    When you call BAPI_INCOMINGINVOICE_GETDETAIL using
    INVOICENUMBER = <number of invoice>
    FISCALYEAR = <fiscal year>
    the returned HEADERDATA contains what you are looking for:
    HEADERDATA-COMP_CODE
    HEADERDATA-DIFF_INF
    Regards
      Uwe

  • How to get resultset from oracle procedure use ejb3

    how to get resultset from oracle procedure use ejb3
    i know oracle procedure should like this
    Create or replace PROCEDURE resultset_test(
    aaa IN NUMBER,
    bbb OUT sys_refcursor) ....
    but what s the ejb3 scripts looks like? please give me an example or link~
    ths

    - there are no EJB3 scripts, only compiled application code
    - the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
    Now you should know what to Google to get your "example script": "java jdbc oracle procedure"

  • TS1424 I am trying to download an update for Aetna Mobile for iPhone and get an Apple error code (-50); what do I do?

    What do I do when I try to download an iPhone update for Aetna Mobile and I get an Apple error code (-50)?

    Hello ckii
    If you are getting the Error (-50), the look at the troubleshooting steps outlined in the article below that specifically deals with that error code.
    iTunes Store: "Error (-50)" when downloading purchased content
    http://support.apple.com/kb/TS1583
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • HT1725 i keep getting a a error code (err = -50) & (err = -19) when i try to continue the download, what does that mean?

    i keep getting a a error code (err = -50) & (err = -19) when i try to continue the download, what does that mean?

    same problem here, err = -19 showed all time that i try to download the LP booklet, all musics downloaded fine, did you solve this? how? thank you

  • I keep getting a 205 error code on my windows 7 laptop

    I keep getting a 205 error code on my windows 7 laptop

    that means your downloads are corrupted.
    try a different (wired) connection and/or a different browser and/or a download manager.  or use a different dl site.
    for help with the later, what program/suite are you trying to install and from what link?

Maybe you are looking for

  • How to setup email account on mail app?

    I currently have an ".edu" account that I usually log-in through a browser. I usually place my email username in mail.office365.com then redirects me to adfs."school here".edu Then I usually do the actual login username and password for the organizat

  • Burning a CD or DVD ROM to read on home DVD player

    hello, I wish to burn on a CD or a DVD a downloaded video I purchased on the iTune Store in order to watch the movie on a home DVD player. 1-As the file format is .m4v, do I have first to change it to .avi or other? 2-how do I burn the CD or DVD? tha

  • MDM 7.1 SP03 Java API - setRetrieveResultCounts & taxonomy aliases = error

    We just upgraded our test MDM system to 7.1 SP03 so we could use the new methods in the Java API to get result counts. However, we've run into a problem with the result counts when taxonomy aliases are being used. The following code works when there

  • Apexlib tabular form with lov gining ora-00900

    Hi, When I add a tabular form with 3 items and chagne two of them to a LOV display item I get the following error: ORA-00900: invalid SQL statement Debug: 1: begin 2: --------------------------------------------- 3: -- Get metadata of page 4: -------

  • How to unlock my Apple ID account

    I forgot the answers to my security question and now my Apple ID is locked and i want to know how to unlock it. Can someone help me!