Read GUID with java

Hi to all, I need some help with java to retrieve the eDirectory GUID. I
know it's a binary data field and I need to decode it to read the value,
but I'm not able to retrieve anything, even if I name the attribute
because it is operational.
This is my code. What am I doing wrong?
import com.novell.ldap.*;
import java.io.UnsupportedEncodingException;
public class GuidReader {
public static void main( String[] args ) {
String loginDN = "cn=admin,o=system";
String password = "MYPASSWORD";
String searchBase = "MYCONTEXT";
String searchFilter = "(cn=MYUSERNAME)";
int searchScope = LDAPConnection.SCOPE_SUB;
LDAPConnection lc = new LDAPConnection();
try {
lc.connect( "MYIPADDRESS", 389 );
try {
lc.bind( LDAPConnection.LDAP_V3, loginDN,
password.getBytes("UTF8"));
} catch (UnsupportedEncodingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
LDAPSearchResults searchResults = lc.search(
searchBase,
searchScope,
searchFilter,
null,
false );
while ( searchResults.hasMore() ) {
LDAPEntry nextEntry = null;
try {
nextEntry = searchResults.next();
} catch(LDAPException e ) {
System.out.println("Error: " + e.toString());
continue;
LDAPAttribute attribute =
nextEntry.getAttribute("objectGuid");
if (attribute == null) System.out.println("not
returned");
attribute = nextEntry.getAttribute("GUID");
if (attribute == null) System.out.println("not
returned");
attribute = nextEntry.getAttribute("cn");
if (attribute == null) System.out.println("not
returned");
else System.out.println("returned");
} catch( LDAPException e ) {
System.out.println("Error " + e.toString() );
If I run it, i get this result:
not returned
not returned
returned
Thank you,
Natan Sanson
nsanson
nsanson's Profile: http://forums.novell.com/member.php?userid=1637
View this thread: http://forums.novell.com/showthread.php?t=410589

So I did it this way:
LDAPAttribute attr = nextEntry.getAttribute( "GUID" );
Enumeration allValues = attr.getByteValues();
if ( allValues != null )
System.out.println( getGUID( allValues ) );
public static String getGUID( Enumeration values )
String returnThis = "";
while ( values.hasMoreElements() )
int offset = 0;
byte Value[] = ( byte[] ) values.nextElement();
while ( offset < Value.length )
int val = Value[offset++] & 0xff;
String s = Integer.toHexString( val );
if ( s.length() == 1 )
s = "0" + s;
returnThis = returnThis + s + " ";
return returnThis;
-jim
On 5/14/2010 11:56 AM, nsanson wrote:
>
> Hi to all, I need some help with java to retrieve the eDirectory GUID. I
> know it's a binary data field and I need to decode it to read the value,
> but I'm not able to retrieve anything, even if I name the attribute
> because it is operational.
>
> This is my code. What am I doing wrong?
>
> import com.novell.ldap.*;
>
> import java.io.UnsupportedEncodingException;
>
>
> public class GuidReader {
> public static void main( String[] args ) {
> String loginDN = "cn=admin,o=system";
> String password = "MYPASSWORD";
> String searchBase = "MYCONTEXT";
> String searchFilter = "(cn=MYUSERNAME)";
> int searchScope = LDAPConnection.SCOPE_SUB;
>
> LDAPConnection lc = new LDAPConnection();
> try {
> lc.connect( "MYIPADDRESS", 389 );
> try {
> lc.bind( LDAPConnection.LDAP_V3, loginDN,
> password.getBytes("UTF8"));
> } catch (UnsupportedEncodingException e1) {
> // TODO Auto-generated catch block
> e1.printStackTrace();
> }
> LDAPSearchResults searchResults = lc.search(
> searchBase,
> searchScope,
> searchFilter,
> null,
> false );
> while ( searchResults.hasMore() ) {
> LDAPEntry nextEntry = null;
> try {
> nextEntry = searchResults.next();
> } catch(LDAPException e ) {
> System.out.println("Error: " + e.toString());
> continue;
> }
> LDAPAttribute attribute =
> nextEntry.getAttribute("objectGuid");
> if (attribute == null) System.out.println("not
> returned");
> attribute = nextEntry.getAttribute("GUID");
> if (attribute == null) System.out.println("not
> returned");
> attribute = nextEntry.getAttribute("cn");
> if (attribute == null) System.out.println("not
> returned");
> else System.out.println("returned");
>
>
> } catch( LDAPException e ) {
> System.out.println("Error " + e.toString() );
> }
> }
>
> }
>
>
> If I run it, i get this result:
>
> not returned
> not returned
> returned
>
> Thank you,
>
> Natan Sanson
>
>

Similar Messages

  • Oracle 9.2.0.2 fails open read only with java exception

    Hi folks!
    I hope you can help me to narrow down this issue.
    I've a database running on windows 2003 64 bits. Oracle version is 9.2.0.2.
    I'm experiencing the following issue:
    When I try to open my database in read only mode, it crashes with ORA-604 and ORA-16000.
    The trace is pointing me to some kind of connection to an SQL Server...., but, to tell truth, I'm not understandig the problem, can anyone help me?
    The error itself is:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]No ResultSet set was produced.
    Thanks!

    I know this is not an tail -f 50 ...., but the last 100 lines are equals to the following:
    "starting up 1 shared server(s) ...
    starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
    ARCH: STARTING ARCH PROCESSES
    ARC0 started with pid=12
    ARC0: Archival started
    ARC1 started with pid=13
    ARC1: Archival started
    Sun Aug 22 21:36:12 2010
    ARCH: STARTING ARCH PROCESSES COMPLETE
    Sun Aug 22 21:36:12 2010
    ARC0: Thread not mounted
    Sun Aug 22 21:36:12 2010
    ARC1: Thread not mounted
    Sun Aug 22 21:36:13 2010
    ALTER DATABASE MOUNT
    Sun Aug 22 21:36:17 2010
    Successful mount of redo thread 1, with mount id 1255534413.
    Sun Aug 22 21:36:17 2010
    Database mounted in Exclusive Mode.
    Completed: ALTER DATABASE MOUNT
    Sun Aug 22 21:36:32 2010
    alter database open read only
    Sun Aug 22 21:36:34 2010
    SMON: enabling cache recovery
    Sun Aug 22 21:36:34 2010
    Database Characterset is WE8ISO8859P1
    Sun Aug 22 21:36:37 2010
    Errors in file c:\oracle\admin\orcl\udump\orcl_ora_32704.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-16000: database open for read-only access"
    Obviously, with the details of the startup.
    One additional detail:
    After that errors, I started the database on restrict mode, and it opens (I fact, this is not surprising, I was expecting that result)
    I'll keep working on this....

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to read and parse a remote XML file with Java

    Hi.
    Using J2SE v1.4.2, I'd like to read and parse a remote file:
    http://foo.com/file.xml
    Is it possible with Java? I'd be extremely grateful if someone could provide me any webpage showing a very simple code.
    Thank you very much.

    How about the following?
         import java.io.InputStream;
         import java.net.URL;
         import javax.xml.parsers.DocumentBuilder;
         import javax.xml.parsers.DocumentBuilderFactory;
         import org.w3c.dom.Document;
         public static void main(String[] args) throws Exception {
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              DocumentBuilder db = dbf.newDocumentBuilder();
              URL url = new URL("http://foo.com/file.xml");
              InputStream inputStream = url.openStream();
              Document document = db.parse(inputStream);
              inputStream.close();
         }-Blaise

  • How to read only files with a certain format from folder with java

    I have this folder on the server and I only want to read files from this folder on the server... I only want to read files with the files format starting with error_ and ending with xml... an example of a file would be..
    error_123.xml
    I want something like this
    if(fileName.startsWith("error_") && fileName.endsWith(".xml")){
    but which java package will I have to use to read the file from the directory...

    Create an implementation of the java.io.FilenameFilter interface to match the pattern you need.
    Create a java.io.File object for the folder.
    Use the File.listFiles(FilenameFilter) method to get an array of File objects for the files in the folder that match the pattern.
    For each file in the array, create a FileInputStream, wrap it in an InputStreamReader, and wrap that in a BufferedReader (assuming you want to read the XML files as character streams).

  • How to connect scanner or printer or barcode reader with java

    hello friends
    How to conncect printer ,scanner or barcode reader with java program directly .
    please send some suggestion .
    Thanks in advance
    Nitin

    922264 wrote:
    Thanks for the feedback. I'm having trouble getting my getText method to return the actual value, but here is my updated code:
    BufferedReader br = new BufferedReader( new StringReader( getText() ) );....
    public void getText(Document doc)
    Element e = doc.getDocumentElement();
         NodeList nodeList = doc.getElementsByTagName("Interface");
         for (int i = 0; i < nodeList.getLength(); i++)
              Node node = nodeList.item(i);
              if (node.getNodeType() == Node.ELEMENT_NODE)
                   Element element = (Element) node;
                   NodeList nodelist = element.getElementsByTagName("Description");
                   Element element1 = (Element) nodelist.item(0);
                   NodeList ndLst = element1.getChildNodes();
                   //System.out.print((ndLst.item(0)).getNodeValue());
         return doc;
    }Here is the compiler error I am getting:
    ImportDesc.java:32: error: method getText in class ImportDesc cannot be applied
    to given types;
    BufferedReader br = new BufferedReader( new StringReader
    ( getText() ) );
    ^
    required: Document
    found: no arguments
    reason: actual and formal argument lists differ in length
    Note: ImportDesc.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    1 errorThoughts?
    Edited by: 922264 on Mar 21, 2012 10:33 AMYour getText method is not returning anything.

  • I want to read and assign value of ADF Table rows  with Java Script

    Hi,
    I want to read and assign value of ADF Table rows with Java Script, but I cant true index of current row , so I assign wrong value to anathor column of ADF Table.
    My Code;
    ADF Table items
    <af:column sortProperty="Adet" sortable="false"
    headerText="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.labels.Adet}"
    binding="#{backing_ucret.column2}" id="column2">
    <af:inputText value="#{row.Adet}"
    required="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.attrDefs.Adet.mandatory}"
    columns="10"
    binding="#{backing_ucret.inputText2}"
    id="inputText2" onchange="getTutar('#{bindings.voHarcamaOdeme1Iterator.rangeStart + bindings.voHarcamaOdeme1Iterator.currentRowIndexInRange + 1}','#{bindings.voHarcamaOdeme1Iterator.estimatedRowCount}','#{row.index}')">
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.RezervasyonWithParams1voHarcamaOdeme1.formats.Adet}"/>
    </af:inputText>
    </af:column>
    MY JAVA SCRIPT CODE
    <f:verbatim>
    <script language="javascript" type="text/javascript">
    function getTutar(rowkey,totalrow,currentRow){
    alert('rowkey--totalRow--currentRow-->'+rowkey+'--'+totalrow+'--'+currentRow);
    if (currentRow==0) {
    rowkey=totalrow-1;
    }else{
    var rw=totalrow-currentRow-1;
    rowkey=rw;
    alert(document.getElementById('form1:table1:'+rowkey+':inputText8').value);
    alert(document.getElementById('form1:table1:'+currentRow+':inputText8').value);
    var birim_ucret=document.getElementById('form1:table1:'+rowkey+':inputText8').value;
    var adet=document.getElementById('form1:table1:'+rowkey+':inputText2').value;
    document.getElementById('form1:table1:'+rowkey+':inputText3').value=birim_ucret*adet;
    document.getElementById('form1:inputText6').value=0;
    var t;
    var toplam=0;
    alert('before Sum');
    for (var i=0;i!=totalrow-1;i++){
    t = document.getElementById('form1:table1:'+i+':inputText3');
    toplam+=t.value*1;
    document.getElementById('form1:inputText6').value=toplam;
    </script>
    </f:verbatim>

    You can achieve the use case you describe with partial page rendering (PPR), a feature of the ADF Faces framework. Here are a few posts that achieve an interactive behavior using PPR. Off the top of my head I do not know of an exact example, but this should be a good starting point:
    http://thepeninsulasedge.com/blog/2006/09/12/adf-faces-aftableselectmany/
    http://thepeninsulasedge.com/blog/2006/08/31/adf-faces-working-with-aftableselectone-and-the-dialog-framework/
    --RiC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Read & Write Shared memory with Java

    Hi,
    I have to read and write from/to shared memory four integers with Java, using Posix package (the shared memory is already created).
    I've looking in google for any examples that attachs, read, and write to shared memory using that package but i couldn't find anything (that's the reason to write in this forum).
    Posix package link
    http://www.bmsi.com/java/posix/docs/Package-posix.html
    Operative System
    Suse 10
    Could anyone help me with any example, please?
    Thank you very much
    Oscar

    Hi, i can't post any code because i have no idea about posix and shared memory.
    I came from web world and my company has send me to space department, two weeks ago, that use Unix as its operative system.
    The first thing i have to do it's what i post but i don't know even how to start doing it, because this is almost the first time i hear about reading and writing shared memory.
    Java is a high level and non-dependent platform (but this kind of things i think are dependent platform, in this case the opearative system) and it's few time since i am working with this operative system.
    That's the trouble i don't know how to start working with this.
    Thanks again

  • Read Excel with macros using Java POI

    Hi,
    I'm very desperate... I have to do following things: read Excel file with macros. I can read xls without macros, but i haven't ideas what to do, so correctly read records with macros in xls.
    I use following method to listen for incoming records and handles them as required.
    public void processRecord(Record record)
    switch (record.getSid())
    // the BOFRecord can represent either the beginning of a sheet or the workbook
    case BOFRecord.sid:
    BOFRecord bof = (BOFRecord) record;
    if (bof.getType() == bof.TYPE_WORKBOOK)
    System.out.println("Encountered workbook");
    // assigned to the class level member
    } else if (bof.getType() == bof.TYPE_WORKSHEET)
    System.out.println("Encountered sheet reference");
    break;
    case BoundSheetRecord.sid:
    BoundSheetRecord bsr = (BoundSheetRecord) record;
    System.out.println("New sheet named: " + bsr.getSheetname());
    break;
    case RowRecord.sid:
    RowRecord rowrec = (RowRecord) record;
    System.out.println("Row found, first column at "
    + rowrec.getFirstCol() + " last column at " + rowrec.getLastCol());
    break;
    case NumberRecord.sid:
    NumberRecord numrec = (NumberRecord) record;
    System.out.println("Cell found with value " + numrec.getValue()
    + " at row " + numrec.getRow() + " and column " + numrec.getColumn());
    break;
    // SSTRecords store a array of unique strings used in Excel.
    case SSTRecord.sid:
    sstrec = (SSTRecord) record;
    for (int k = 0; k < sstrec.getNumUniqueStrings(); k++)
    System.out.println("String table value " + k + " = " + sstrec.getString(k));
    break;
    case LabelSSTRecord.sid:
    LabelSSTRecord lrec = (LabelSSTRecord) record;
    System.out.println("String cell found with value "
    + sstrec.getString(lrec.getSSTIndex()));
    break;
    case FormulaRecord.sid:
    FormulaRecord fre = (FormulaRecord) record;
    System.out.println("Formula: "+ fre.getValue());
    break;
    I don't know, how check, that incoming record is joined with macro and I don't know how handle it.
    Is there possible to create Excel file with macros using POI?
    Please help me...
    Margaret

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • Read "Qualified Range Key Generation" with Java API.

    Hi guru,
    I use MDM 5.5 SP6.
    In MDM Console I read Qualified Range Key Generation it in "ADMIN -> Remote Systems -> Qualified Range".
    I have to get "Qualified Range Key Generation" with Java API.
    It's possible?

    Hi Rocco,
    I am also thinking  of same scenario.I thought it is possible in Java Apis by calling the webservices for MDM.there is a service of "get key mapping" where we can pass this "Qualified key range" as  parameter.In MDM we have to define a look up table for that key ranges .We will access that table through JAVA API and then link it with the key mapping service .
    If u find any solution to apply this ,please share.
    thanks and regards
    Ank

  • How to use of ffmpeg or jffmpeg with java

    I am creating an application in java to convert one video format to other. (eg. avi to wmv) . as JMF does not support all the video formats available today. I read on the net that I can use ffmpeg or jffmpeg together with jmf to process many video formats. but i did not get any example or guide to use ffmpeg with java. Can you plese guide me how to use this libraries with jmf. with some example or simple steps to integrate ffmpeg with jmf.
    I am using java 1.6 and jmf 2.1. eclipse IDE and windows xp professional and redhat linux.

    Can you plese guide me how to use this libraries with jmf. No.
    This is a JMF forum. 3rd party stuff like ffmpeg is not supported here.

  • Provisioning on third party apps with java handlers

    Hello,
    I am trying to configure OID to enable provisioning against third party applications like an J2EE app who use MySQL )
    I want to develop a Java plugin for handling events on OID and propagate on other DBMS.
    I saw on the following page (http://download-uk.oracle.com/docs/cd/B14099_14/idmanage.1012/b14087/prov_plug.htm#BCGJFHEB
    ) a sample of Java code who could help me. The, I tried to apply the Grocery demo with a JAVA plugin but unsuccessfully.
    Thats my configuration issues:
    1 ) In oidadmin
    I have created the following entries:
    cn=ApplicationsCCIP,cn=Products,cn=OracleContext
    cn=Plugins,cn=Training,cn=Applications,cn=Provisioning,cn=Directory Integration Platform,cn=Products,cn=OracleContext
    2) With ldapmodify
    dn: cn=Plugins, cn=Training, cn=Applications, cn=Provisioning,cn=Directory Integration Platform,cn=Products,cn=OracleContext
    changetype: add
    add: orclODIPPluginExecData
    orclODIPPluginExecData: path to jar addressbook-oidplugin-2.1.1.jar
    objectclass:orclODIPPluginContainer
    dn: cn=PRE_DATA_ENTRY_CREATE, cn=Plugins, cn=Training, cn=Applications,cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext cn=Provisioning
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.PreDataPlugin
    orclODIPPluginAddInfo: Pre Data Entry Plugin for CREATE operation
    dn: cn=PRE_DATA_ENTRY_MODIFY, cn=Plugins, cn=Training, cn=Applications,cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.PreDataPlugin
    orclODIPPluginAddInfo: Pre Data Entry Plugin for MODIFY operation
    dn: cn=POST_DATA_ENTRY_CREATE, cn=Plugins, cn=Training, cn=Applications, cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.PostDataPlugin
    orclODIPPluginAddInfo: Post Data Entry Plugin for CREATE and modify operations
    dn: cn=POST_DATA_ENTRY_MODIFY, cn=Plugins, cn=Training, cn=Applications, cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.PostDataPlugin
    orclODIPPluginAddInfo: Post Data Entry Plugin for MODIFY and CREATE operation
    dn: cn=DATA_ACCESS, cn=Plugins, cn=Training, cn=Applications, cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.DataAccessPlugin
    orclODIPPluginAddInfo: Data Access Plugin
    dn: cn=EVENT_DELIVERY_OUT, cn=Plugins, cn=Training, cn=Applications, cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.DeliveryOutEvent
    orclODIPPluginAddInfo: Event Delivery Plugin for Outbound
    dn: cn=EVENT_DELIVERY_IN, cn=Plugins, cn=Training, cn=Applications, cn=Provisioning, cn=Directory Integration Platform, cn=Products, cn=OracleContext
    changetype: add
    objectClass: orclODIPPlugin
    orclStatus: ENABLE
    orclODIPPluginExecName: fr.ccip.training.addressbook.oid.DeliveryInEvent
    orclODIPPluginAddInfo: Event Delivery Plugin for Inbound
    3) I have uploaded the jar in /oas/infra/ldap/jlib
    4 ) With oidprovisioning tool
    oidprovtool operation=create ldap_host=dev-orainfra.ccip.fr ldap_port=389 ldap_user_dn="cn=orcladmin" ldap_user_password=password1 organisation_dn=ccip application_dn="orclapplicationcommonname=Training,cn=ApplicationsCCIP,cn=Products,cn=OracleContext" organization_dn="dc=ccip,dc=fr" event_subscription="USER:ccip:ADD(uname)" event_subscription="USER:ccip:DELETE" event_subscription="GROUP:ccip:MODIFY(cn,uniquemember)" interface_type=JAVA interface_name=PORTAL.WWSEC_OID_SYNC interface_version=3.0 application_type=Addressbook profile_debug=debug
    5) Restart OID
    I have previously uploaded a jar with some plugins
    Thas my code
    import java.io.FileOutputStream;
    import java.io.PrintStream;
    import oracle.idm.provisioning.event.Event;
    import oracle.idm.provisioning.event.EventStatus;
    import oracle.idm.provisioning.plugin.EventDeliveryException;
    import oracle.idm.provisioning.plugin.EventPluginInitException;
    import oracle.idm.provisioning.plugin.IEventsFromOID;
    import oracle.idm.provisioning.plugin.PluginException;
    import oracle.ldap.util.UtilDebug;
    public class OIDToAddressbookEvent implements IEventsFromOID {
    static {
    try {
    UtilDebug.setPrintStream(new PrintStream(new FileOutputStream("/tmp/oidtoaddressbookevent.log")));
    UtilDebug.setDebugMode(UtilDebug.MODE_ALL);
    } catch (Exception e) {
    e.printStackTrace();
    * (non-Javadoc)
    * @see oracle.idm.provisioning.plugin.IEventsFromOID#initialize(java.lang.Object)
    public void initialize(Object _arg0) throws EventPluginInitException {
    // TODO Auto-generated method stub
    * (non-Javadoc)
    * @see oracle.idm.provisioning.plugin.IEventsFromOID#sendEventsToApp(oracle.idm.provisioning.event.Event[])
    public EventStatus[] sendEventsToApp(Event[] _arg0) throws EventDeliveryException {
    UtilDebug.log(UtilDebug.MODE_ALL, "sendEvents", _arg0);
    EventStatus[] events = new EventStatus[1];
    events[0] = new EventStatus(EventStatus.SUCCESS, null, null, null);
    return events;
    * (non-Javadoc)
    * @see oracle.idm.provisioning.plugin.IEventPlugin#terminate(java.lang.Object)
    public void terminate(Object _arg0) throws PluginException {
    // TODO Auto-generated method stub
    public OIDToAddressbookEvent() {
    super();
    // TODO Auto-generated constructor stub
    public class DataAccessPlugin implements IDataAccessPlugin{
    static {
    try {
    UtilDebug.setPrintStream(new PrintStream(new FileOutputStream("/tmp/dataaccessplugin.log")));
    UtilDebug.setDebugMode(UtilDebug.MODE_ALL);
    } catch (Exception e) {
    e.printStackTrace();
    /* (non-Javadoc)
    * @see oracle.idm.provisioning.plugin.IDataAccessPlugin#getAppUserData(oracle.idm.provisioning.plugin.ApplicationContext, oracle.idm.user.IdmUser, java.lang.String[])
    public PropertySet getAppUserData(ApplicationContext arg0, IdmUser arg1, String[] _arg2) throws PluginException {
    return null;
    /* (non-Javadoc)
    * @see oracle.idm.provisioning.plugin.IDataAccessPlugin#process(oracle.idm.provisioning.plugin.ApplicationContext, oracle.idm.user.IdmUser, oracle.ldap.util.ModPropertySet, oracle.ldap.util.ModPropertySet)
    public PluginStatus process(ApplicationContext arg0, IdmUser arg1, ModPropertySet arg2, ModPropertySet arg3) throws PluginException {
    UtilDebug.log(UtilDebug.MODE_ALL,"Processing DAP...",_arg0);
    return new PluginStatus(PluginStatus.SUCCESS,null,null);
    I have already develop event wich implements IEventsPlugin.
    I dont see what s wrong in my configuration
    Thanks in advance for your help
    Alexandre Touret
    Message was edited by:
    [email protected]
    Message was edited by:
    [email protected]

    Ahhh...OK...that makes more sense now. From your first post, it seemed like you wanted to sync the actual app (as in, for instance, backup the actual app and then restore it after an OS reload...as opposed to reinstalling the app after an OS reload). But, now I see that it is the App data that you wish to sync.
    To be 100% clear -- is this a sync function, similar to how the desktop software synchs with your PIM (e.g., Outlook) for organizer data? Or is this a backup function, where the data is backed up for use in a subsequent restore?
    Thanks!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Need help with Java MIDI and VST info

    I am currently a college student for programming and I know programming very well, but for this current task, I am completely stuck. This is not a school project or work, just a personal project I'm working on at the moment to learn more about Java.
    What I am trying to create is a VST (Virtual Studio Synthesizer) using Java for use in music programs such as FL Studio, Sonar, Ableton, and so on. I did alot of Googling and found the following program:
    [http://jvaptools.sourceforge.net/index.html]
    I got it working, but it's not quite what I am looking for (it's more like an on-site editor that you enter code into and then run it). I want to create a VST from scratch and learn what each thing means in the program. I've done some research on MIDI input and output and found the following in the Java documentation:
    [http://java.sun.com/javase/6/docs/api/javax/sound/midi/MidiDevice.html]
    I figured I'm on track of what I'm looking for, but the problem is that the Java documentation simply sucks. It has no examples of code, how the functions work, and how I'm suppose to use them.
    First off, I want to start with the extreme bare basics. Is it even possible to do a VST in JUST Java? I've seen and used examples of obtaining data from a MIDI file and playing it, but that's not what I'm trying to do. Second, how would I take MIDI data from a music program running the VST and enter the data into a text box? Once I'm able to do that, I should be able to work with the data to produce audio output.
    My program I am attempting to make is a guitar synthesizer that I can run in music programs as a VST. If anyone around here knows anything about MIDI and VST plugins, please, post some example code and help point me in the right direction to creating something. I'm not looking to use other people's programs or code, I want to make something myself from scratch but I don't know where to start!

    Programming guide
    [http://java.sun.com/j2se/1.5.0/docs/guide/sound/programmer_guide/contents.html]
    Examples...
    [http://www.jsresources.org/examples/]

  • How to use the Rc4DLL.dll with java (jre1.4 )

    I am not able to use Rc4DLL.dll with java, there are some characters (encrypted using Rc4DLL.dll) that java is not able to identify. So while decrypting in java using Rc4DLL I am not getting the desired output (as some character java tries to decrypt are not supported with java). Could some one give a solution of using Rc4DLL with java jre 1.4

    RC4 cipher is supported by 1.4.
    And surely you can turn a link to the 1.5.0 JCE Reference Guide into a link to the 1.4.2 Reference Guide? I did. Took me 5 seconds to check that. As opposed to wasting a day and a half in forums like you just did.

  • Preparations to learn Web Services with Java

    I have only worked with JSP,JDBC, JavaBeans and Servlets in Tomcat using MVC architecture the past couple years. I have never used Struts framework. I am thinking about taking a Web Services with Java course and was wondering if my background will be enough to keep up with the advance topic of Java web service?

    Yes, at first you should have to worry about understanding the basic concepts, WSDL, and a little bit of XML (it does not make very senso to study far too much because sometimes you won't use all the api you may study).
    The focus point is understanding that you can build a web service infrastructure passing using many different approaches: starting from wsdl, starting from java, based on WSDL, based on REST and things like that.
    JAX-WS is a very powerful toolkit that covers well all the possible approaches you may have.
    Anyway starting from scratch is quite frustrating... it is difficult to find around a good guide that covers all the aspects and make you understand the Big Picture. That's really the focus point.
    There is a very good book about written by Mark Hansen.
    Check out also that there are so many franmeworks around that implements the specification: almost every Corp. implements its own stack.... Sun, Apache, Spring, IBM, JBOSS and so on.
    This is quite misleading at first.
    Metro is very good and very well implemented with netbeans, and it's easier to start with it. anyway it hides you sometimes what's going on underneath.
    I find CXF is a very good framework, and if you love the SPring wayyou should consider give it a chance.
    I have no experience of other frameworks.

Maybe you are looking for