Retrieving user data from Directory Server using java code

Can anyone send java code to bind to directory server and retrieve the user information from server instance.

To CRabel,
My company have restriction on using the open sources product/code, but i will take a look on netscape ldap sdk as a reference~
To raghu1978 ,
i find a product call Directory Editor 1 2005Q1, I hope it is useful.
thz all~

Similar Messages

  • Add a posixaccount user in posixgroup in sun directory server using java

    Hi
    Anybody now how to add posixaccount user in posixgroup in sun directory server using java code.
    I am able to add normal directory server user in ldap group in java.
    But i am getting any luck to add posixaccount user in posixgroup.
    I know we can set uid value in memberuid attribute but how to add through java program.
    Anybody can paste code for that.
    Thanks.

    To CRabel,
    My company have restriction on using the open sources product/code, but i will take a look on netscape ldap sdk as a reference~
    To raghu1978 ,
    i find a product call Directory Editor 1 2005Q1, I hope it is useful.
    thz all~

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • EVDRE encountered error retrieving the data from web Server

    Hi,
    I know this is the common/generic error message, following is our scenario:
    We installed BPC NW 7.5 on our production box and configured F5 load balancing for two .NET servers.
    We are getting the error "EVDRE encountered error retrieving the data from web Server"when we run the report EVDRE on APSHELL (original Appset). This is the fresh installation:
    The workaround "Clear Local application information". Even this works only sometimes.
    Is there anything else we should have configured on using two .NET servers?
    Please suggest.
    Thanks

    hi Nagesh sorry for the delayed reply..
    We changed some of the parameters at F5 switch like sticky time, timeout..
    And the MDXPARSER connection to one of out application server was failling, thats why we did not had this issue consistently.
    When ever the request goes to that app server fails. It took a lot effort to notice this since we were assuming the F5 switch was only causing the issue.
    Thanks

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How can we make the ms-word data as read-only using java code?

    How can we make the ms-word data as read-only using java code?

    MVSK wrote:
    By using java code i opened a file in ms-word. But the data i want to display as read-only. that means should not change it.I don't think you can do that. Display pdf documents instead.

  • Retrieving data from OBIEE server using ODBC

    Hello.
    I am having difficulty retrieving data from OBIEE 11g using the ODBC connection. My intention is to read OBIEE Server data via a SQL statement issued from an Oracle database using gateways.
    I have read and followed the material here:
    http://download.oracle.com/docs/cd/E14571_01/bi.1111/e16364/odbc_data_source.htm#CACBFCJA
    I have also tried this from Excel 2007, but have not succeeded:
    http://gerardnico.com/wiki/dat/obiee/import_data_from_obiee_to_excel
    I have setup a gateway in Oracle and a database link. Iknow it is connecting because when I change the password to something invalid, I get a message about not being able to connect due to username/password.
    I have taken a query from Answers (the advanced tab) and tried running it from Sql Developer. The nsqserver.log file ends up with the following Notification:
    [nQSError: 13013] Init block, 'DUAL Num (=3)', has more variables than the query select list.
    As an experiment, I am using the SampleApp, and have generated the following query in Answers:
    SELECT s_0, s_1, s_2, s_3 FROM (
    SELECT
    0 s_0,
    "A - Sample Sales"."Products"."P3 LOB" s_1,
    DESCRIPTOR_IDOF("A - Sample Sales"."Products"."P3 LOB") s_2,
    "A - Sample Sales"."Base Facts"."1- Revenue" s_3
    FROM "A - Sample Sales"
    ) djm ORDER BY 1, 2 ASC NULLS LAST
    Is there a way to issue this query from a database client like SQL Developer? I have setup a database link called obiee via gateways to the ODBC connection, and add @obiee after the table name in the above query, but get the nqs error above.
    Thanks for any help. I can provide addl info if such would be useful.
    Ari

    That would explain my difficulty. I went to the link:
    http://download.oracle.com/docs/cd/E14571_01/relnotes.1111/e10132/biee.htm#CHDIFHEE
    that describes the deprecated client. I am confused by the statement there:
    "one of the many widely available third-party ODBC/JDBC tools to satisfy previous NQClient functionality"
    My understanding of ODBC is not very strong, so please bear with me. The statement above is talking about a client tool, but there also needs to be an ODBC driver available for BI Server. I may be a bit confused between driver and client, and what piece nq handles. I don't understand the comment about third-party ODBC when it comes to the driver piece, as that must be coded for BI Server. When I go to create a new DSN, the only driver that makes sense for me to select is:
    Oracle BI Server 11g_OH<id>
    That all works fine to setup a DSN. But I am unable to connect from Excel, etc., using this DSN.
    Put more simply, should I be able to connect to BI Server via ODBC - not using the deprecated BI ODBC client, but using other clients? Is there ODBC connectivity at all in OBIEE 11g?
    Thanks,
    Ari

  • Problems trying to retrieve data from R/3 using Java - RecordSetWrapper

    Hello everyone!
    I am having problems retrieveing a result from r/3 using Connector Framework API. An ABAP consultant has created a ABAP program which returns an employee based on his or her personal number as an input.
    <b>When i run the AbstractPortalComponent i get the following:
    <u>RS2: com.sapportals.connectors.SAPCFConnector.execution.structures.RecordSetWrapper@24648563</u></b>
    My code is as follows:
    package com.sap.test;
    import java.util.ArrayList;
    import java.util.Iterator;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sap.security.api.IUser;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.connector.execution.structures.IStructureFactory;
    import com.sapportals.connector.metadata.functions.IFunction;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class Search extends AbstractPortalComponent{
         String sapSystem = "*****";
         public void doContent(IPortalComponentRequest request, IPortalComponentResponse response){
              IConnection con = null;
              ConnectionProperties conprop = null;
              ConnectionProperties cp = null;
              try{
                   Object connectorService = PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
                   IConnectorGatewayService cgService = (IConnectorGatewayService) connectorService;
                   cp = new ConnectionProperties(request.getLocale(),request.getUser());
                   if(cgService == null){
                        response.write("Error in getting Connector Gateway Service <br>");
                   try{
                        con = cgService.getConnection(sapSystem, cp);
                        IInteraction ix = con.createInteractionEx();
                        IInteractionSpec ixSpec = ix.getInteractionSpec();
                        ixSpec.setPropertyValue("Name", "Test_RFC");
                        RecordFactory rf = ix.getRecordFactory();
                        MappedRecord importParams = rf.createMappedRecord("INPUT");
                        IFunction function = con.getFunctionsMetaData().getFunction("Test_RFC");
                        IStructureFactory structureFactory = ix.retrieveStructureFactory();
                        IRecordSet table = (IRecordSet) structureFactory.getStructure(function.getParameter("I_PA0002").getStructure());
                        importParams.put("PERNR", "123456");
                        MappedRecord output = (MappedRecord) ix.execute(ixSpec,importParams);
                        Object rs = null;
                        try{
                             Object result = output.get("I_PA0002");
                             if(result == null){
                                  rs = new String ("Error");
                                  response.write("RS1: " +rs+ "<BR>");
                             else
                                  if(result instanceof IRecordSet){
                                       rs = (IRecordSet) result;
                                       response.write("RS2: " +rs+ "<BR>");
                                  else{
                                       response.write("RS3: " +rs+ "<BR>");
                        catch(Exception e){
                             response.write("Error " + e.getMessage()+ "<BR>");
                   catch(Exception e){
                        response.write("Connection to SAP system failed <br>");
                   if(con == null){
                        response.write("Connection is null <br>");
                   else{
                        response.write("Connection succsesful<BR>");
              catch(Exception e){
                   response.write("Exception occured<BR>");
              try{
                   con.close();
                   response.write("Connection closed<br>");
              catch(Exception e){
                   response.write("Could NOT close connection<BR>");
    The result should be all data stored on the person which I search for, but instead i get the following result:
    <b>
    RS2: com.sapportals.connectors.SAPCFConnector.execution.structures.RecordSetWrapper@24648563</b>
    I am really stuck and do not know how to solve the problem. I appreciate any help or sample (or just some answers...)
    Thanks in Advance.
    Best Regards,
    Ola Aarthun

    Hi,
    From your code you are just displaying the object rs. You have to handle the display of each record the way you want it(as a table).
    You can find a sample code how to build a table from the result object at the following link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bfb1ba90-0201-0010-5e97-bd6a8f5022dc
    Regards,
    Padmaja

  • Is there a simple way to retrieve the data from a resultset using JavaBean?

    I have a result set from a select * from users where userid = xxx statement. However, at the moment I have had to hard code the remainder of the code to get the data from each column as I need the column name as well as its data.
    I had read somewhere using java beans and reflection it is easier. But i do not know know how.
    Is there a simple way to retrieve the data from a result set ?
    thanks in advance-
    kg

    Well, it is not really simple. But there are Open Source components to simplify it for you. See e.g http://www.must.de/Jacompe.htm - de.must.dataobj.DataObject and its subclasses. Feel free to contact me if you have any questions: [email protected]

  • Is it possible to retrieve Address Book from MS Exchange using Java IMAP

    My JSP is required to display all valid email address to end user.
    Is there any way i can retrieve Name & Email information (Address Book) from M.S Exchange server using Java implementation of IMAP protocal?
    I believe M.S Exchange server is IMAP compatible so i should'nt be required to do any configuration on mail server side ?
    If somebody has recently done this please share the implementation details , thanks,.
    Please also let me know how to attach duke dollars with this thread.

    No, because that Java implementation you refer to is completely oriented towards handling messages. The Exchange address book has nothing to do with that.

  • Is it possible to lock the keyboard of a client from a server using java

    please explain wheterit is possible to lock the keyboard of a client from a server using java

    You want to process code on one machine, and thereby lock the keyboard on another machine? No, that's not possible. It is extremely far from possible.
    Of course, if the client is running software with security holes in it you might hack into it and crash the thing. This will lock up the keyboard pretty good. I hope that's not what you want ...
    Or are you talking about a setup where you already have code running on the client, and some sort of communication between client and server? In that case what you need to know is whether it is possible to lock the keyboard at all. Once you have figured that out, it is trivial to add the communication code to have the server software tell the client software to lock the keyboard.
    So what do you mean with "lock the keyboard"? It's pretty easy to remove/disable all keyboard related listeners in your own application. It's a lot harder (and AFAIK impossible with pure java) to disable alt-tabbing out of the application. And impossible, except from exploiting security holes, to lock the ctrl-alt-delete-combination on windows machine.

  • To fetch data from MS Outlook using JAVA

    Hi,
    I want to know about any api that helps in fetching MS Outlook data using JAVA code. Any help will be appreciated.
    Thanks
    Rohit

    Hi,
    I have to write data to an Excel sheet through servlet. But I'll also look in to resding data from MS Excel. will tell you if I am able to do that.
    Akhilesh Pathodia

  • How to retrieve nVarchat data from Sql Server DB

    How can I retrieve data of NVARCHAR data type from Sql Server 2000.
    Do I have to user ResultSet.getCLOB() or ResultSet.getBLOB() ?
    thx

    I have no idea, but you can find out the classname which is mapped by JDBC at the following ways:
    // Retrieve mapped class name by metadata.
    ResultSetMetaData metaData = resultSet.getMetaData();
    String className = metaData.getColumnClassName("columnname");
    System.out.println(className); // Prints the mapped class name. I.e. java.sql.Blob or java.sql.Clob
    // Or just upcast to object and lookup the instantiated class.
    Object object = resultSet.getObject("columnname");
    String className = object.getClass().getName();
    System.out.println(className); // Prints the mapped class name. I.e. java.sql.Blob or java.sql.Clob

  • I want to extract data from a PDF using Java

    I would prefer to extract data from a PDF and convert it to XML. Is there an API that will convert a PDF to some Adobe format XML? Ideally I would like to add some JAR files to my classpath, similar to PDFBox. I don't want to install a bunch of server side componets or anything like that.
    Thanks!

    Thank you for the reply!
    If I installed the server side components, how would a Java client invoke a service to export data from a PDF? RMI, Web Services?

  • The SQL statement is not valid - when importing data from SQL Server using a query

    Hi there,
    I am trying to import data from SQL to Power Pivot using a SQL query like below:
    SELECT Score.FieldCount, Score.Record.GetAt(0), Score.Record.GetAt(1),  Score.Record.GetAt(2),  Score.Record.GetAt(3),  Score.Record.GetAt(4)
    FROM 
    SELECT * FROM dbo.CLR1(
    dbo.CLR2('c:\FILES\Test.xml'), 
    'SELECT * FROM [dbo].[CXCustomer_Small]') Input
    ) Score
    And when I tried to validate it, it returns
    The SQL statement is not valid. A column name cannot be blank.
    I ran the above SQL statement in Management Studio and it works without problem. Any idea?
    Thanks!
    Chu
    -- Predict everything. http://www.predixionsoftware.com

    Never mind, I figured out - I need to give each column a name.
    -- Predict everything. http://www.predixionsoftware.com

Maybe you are looking for

  • About the MSI Forum Contest...

    My opinion is that this a good step taken by MSI towards their forum members However some of the questions are too difficult to answer and are limited to only few insiders... Just my opinion Markoul

  • Photoshop cs5 and Lightroom 5

    I have Photoshop cs5 and have just bought Lightroom 5.  My Camera Raw plug-in is up to date to version 6.3.  I get a message once I try to edit into Photoshop cs5:  This version of Lightroom may require the Photoshop Camera Raw plug-in version 8.3 fo

  • "...write access was not granted" - shared folder

    Hi When I try to save files (edited) to shared folder on another Mac - I get these errors: "The disk copy of "file name" was changed since you last opened  or saved it. Do you want to save anyway?" - yes "Could not save "file name" because write acce

  • Phone software update Windows 8.1 for lumia 625

    Know me when phone software be updated for nokia Lumia 625 to Windows. 8.1

  • Custom Service in UCM 11g - Can't find proper .jar files

    Hi, I'm trying to migrate some custom services I created in 10gr3 into the new 11g platform. The services contain some custom java methods that I'd compiled for the older version using the server\shared\classes\server.zip package. It seems that the s