Creating Taxonomy with Java API

Hi all,
  I am trying to add a Taxonomy structure like the collowing with the java API. But i am unable to add the structure, only the first folder is added.
/taxonomy/countries/us
                   /en
                   /fr
I am using the following code:
IClassificationIndex index = (IClassificationIndex)indexService.getIndex(indexName);
index.addTaxonomy("countries/us", new ResourceContext(user)) ;
Any help would be very nice.

I'd also be interested to know how to do this.
I found this code section to sort by date, but couldn't change it to get it to work to sort alphabetically.
private void sortResouceListByDate(IResourceList resourceList) throws Exception {
// create property names to index properties
IPropertyName iPropSort = new PropertyName("http://sapportals.com/xmlns/cm", "modified");
//create a comparator to order the resource list
ResourcePropertyComparator rRPC = new ResourcePropertyComparator(iPropSort, false);
//order the resource list
resourceList.sort(rRPC);
Link where code was found:
https://forums.sdn.sap.com/thread.jspa?forumID=42&threadID=148468&messageID=1670970#1670970
We are using:
Portal 6.0.15.0.0
KM 6.0.15.4.0
Thanks!!

Similar Messages

  • How to sort taxonomy with Java api?  Please Help

    Can someone please help me out?  I understand and can display the contents of a taxonomy. But I need it to be displayed in alphabetical order.  Manual ordering does not exist for taxonomies.  How do you sort a taxonomy in java?
    The following snip of code can get the taxonomy and loop through it but isn't ordered correctly.  Can some kind of comparator be used somehow?  Points will be rewarded!  Please help.
    //Get connection to KMCM path
    RID rid = RID.getRID(strPathToKMCM);
    IResource resource = ResourceFactory.getInstance().getResource(rid, context);
    ICollection collection = (ICollection) resource;
    IResourceList children = collection.getChildren();
    for (int i = 0; i < children.size(); i++){
         IResource ir = children.get(i);

    I'd also be interested to know how to do this.
    I found this code section to sort by date, but couldn't change it to get it to work to sort alphabetically.
    private void sortResouceListByDate(IResourceList resourceList) throws Exception {
    // create property names to index properties
    IPropertyName iPropSort = new PropertyName("http://sapportals.com/xmlns/cm", "modified");
    //create a comparator to order the resource list
    ResourcePropertyComparator rRPC = new ResourcePropertyComparator(iPropSort, false);
    //order the resource list
    resourceList.sort(rRPC);
    Link where code was found:
    https://forums.sdn.sap.com/thread.jspa?forumID=42&threadID=148468&messageID=1670970#1670970
    We are using:
    Portal 6.0.15.0.0
    KM 6.0.15.4.0
    Thanks!!

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

  • Attaching/Detaching libraries with Java API

    Hello,
    In my forms (Forms10g), sometimes, libraries had been attached in lower case although files are in upper case. This causes compilation errors on UNIX systems.
    I'm trying to detach these libraries with Java APIs and then reattach them in upper case.
    But I get an error when I want to save the module.
    Here is my code :
    public class UpperPll {
         public UpperPll (String formName) {
              try
                   FormModule form = FormModule.open("C:/AttachPll/" + formName);
                   System.out.println("Form Name is " + form.getName());
                   JdapiIterator AttachPll = form.getAttachedLibraries();
                   while(AttachPll.hasNext())
                        try
                             JdapiObject jo = (JdapiObject)AttachPll.next();
                             System.out.println(jo.getName());
                             if (jo.getName().toLowerCase().equals(jo.getName()))
                                  AttachedLibrary.find(form,jo.getName().toUpperCase()).detach();
                                  System.out.println(jo.getName().toUpperCase());
                                  new AttachedLibrary(form,jo.getName().toUpperCase());
                        catch (JdapiIllegalStateException jdise)
                             jdise.printStackTrace();
                   form.save("C:/AttachPll/New/" + form.getName() + ".fmb");
                   Jdapi.shutdown();
              catch (JdapiException jde)
                   jde.printStackTrace();
         public static void main (String[] args) {
              try {
                   FileReader r = new FileReader( "C:/AttachPll/listemodule.txt" );
                   BufferedReader br = new BufferedReader( r );
                   try {
                        String module;
                        while ( ( module = br.readLine() ) != null ) {
                             new UpperPll(module);
                   } finally {
                        r.close();
              } catch (FileNotFoundException fnfe) {
                   fnfe.printStackTrace();
              } catch (IOException ioe) {
                   ioe.printStackTrace();
    And here are the errors I get :
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x2FBBDCB
    Function=icobad+0xB
    Library=C:\DevSuiteHome_1\bin\frmcom.dll
    Current Java thread:
         at oracle.forms.jdapi.BaseAPI._jni_save_form(Native Method)
         at oracle.forms.jdapi.FormModule.save(Unknown Source)
         at UpperPll.<init>(UpperPll.java:39)
         at UpperPll.main(UpperPll.java:55)
    Dynamic libraries:
    0x00400000 - 0x0040B000      C:\DevSuiteHome_1\jdk\bin\javaw.exe
    0x7C910000 - 0x7C9C7000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C904000      C:\WINDOWS\system32\kernel32.dll
    0x77DA0000 - 0x77E4C000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E50000 - 0x77EE1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77D10000 - 0x77DA0000      C:\WINDOWS\system32\USER32.dll
    0x77EF0000 - 0x77F37000      C:\WINDOWS\system32\GDI32.dll
    0x77BE0000 - 0x77C38000      C:\WINDOWS\system32\MSVCRT.dll
    0x62DC0000 - 0x62DC9000      C:\WINDOWS\system32\LPK.DLL
    0x753C0000 - 0x7542B000      C:\WINDOWS\system32\USP10.dll
    0x08000000 - 0x08139000      C:\DevSuiteHome_1\jdk\jre\bin\client\jvm.dll
    0x76AE0000 - 0x76B0F000      C:\WINDOWS\system32\WINMM.dll
    0x6BD00000 - 0x6BD0D000      C:\WINDOWS\system32\SYNCOR11.DLL
    0x10000000 - 0x10007000      C:\DevSuiteHome_1\jdk\jre\bin\hpi.dll
    0x00940000 - 0x0094E000      C:\DevSuiteHome_1\jdk\jre\bin\verify.dll
    0x00950000 - 0x00969000      C:\DevSuiteHome_1\jdk\jre\bin\java.dll
    0x00970000 - 0x0097D000      C:\DevSuiteHome_1\jdk\jre\bin\zip.dll
    0x02F60000 - 0x02F6F000      C:\DevSuiteHome_1\BIN\frmjapi.dll
    0x02F70000 - 0x02F8C000      C:\DevSuiteHome_1\bin\frmd2f.dll
    0x663D0000 - 0x66414000      C:\DevSuiteHome_1\bin\CA.dll
    0x66340000 - 0x6636A000      C:\DevSuiteHome_1\bin\mmc.dll
    0x64CA0000 - 0x64CB1000      C:\DevSuiteHome_1\bin\UTL.dll
    0x60730000 - 0x607DC000      C:\DevSuiteHome_1\bin\oracore10.dll
    0x608D0000 - 0x60963000      C:\DevSuiteHome_1\bin\oranls10.dll
    0x62B40000 - 0x62B53000      C:\DevSuiteHome_1\bin\oraunls10.dll
    0x60C40000 - 0x60C47000      C:\DevSuiteHome_1\bin\orauts.dll
    0x719F0000 - 0x71A07000      C:\WINDOWS\system32\WS2_32.dll
    0x719E0000 - 0x719E8000      C:\WINDOWS\system32\WS2HELP.dll
    0x774A0000 - 0x775DD000      C:\WINDOWS\system32\ole32.dll
    0x616B0000 - 0x61891000      C:\DevSuiteHome_1\bin\oraclient10.dll
    0x62B60000 - 0x62B66000      C:\DevSuiteHome_1\bin\oravsn10.dll
    0x60D30000 - 0x60DE8000      C:\DevSuiteHome_1\bin\oracommon10.dll
    0x60300000 - 0x60720000      C:\DevSuiteHome_1\bin\orageneric10.dll
    0x629C0000 - 0x629D2000      C:\DevSuiteHome_1\bin\orasnls10.dll
    0x62B80000 - 0x62C86000      C:\DevSuiteHome_1\bin\oraxml10.dll
    0x02F90000 - 0x02FA1000      C:\WINDOWS\system32\MSVCIRT.dll
    0x607E0000 - 0x608CC000      C:\DevSuiteHome_1\bin\oran10.dll
    0x62000000 - 0x6202C000      C:\DevSuiteHome_1\bin\oranl10.dll
    0x62030000 - 0x62042000      C:\DevSuiteHome_1\bin\oranldap10.dll
    0x62090000 - 0x62184000      C:\DevSuiteHome_1\bin\orannzsbb10.dll
    0x61E10000 - 0x61E52000      C:\DevSuiteHome_1\bin\oraldapclnt10.dll
    0x61F30000 - 0x61F47000      C:\DevSuiteHome_1\bin\orancrypt10.dll
    0x71A10000 - 0x71A1A000      C:\WINDOWS\system32\WSOCK32.dll
    0x76D10000 - 0x76D29000      C:\WINDOWS\system32\iphlpapi.dll
    0x770E0000 - 0x7716C000      C:\WINDOWS\system32\OLEAUT32.dll
    0x621A0000 - 0x621D7000      C:\DevSuiteHome_1\bin\oranro10.dll
    0x621F0000 - 0x621FC000      C:\DevSuiteHome_1\bin\orantcp10.dll
    0x61F70000 - 0x61F76000      C:\DevSuiteHome_1\bin\oranhost10.dll
    0x61F20000 - 0x61F26000      C:\DevSuiteHome_1\bin\orancds10.dll
    0x62210000 - 0x62216000      C:\DevSuiteHome_1\bin\orantns10.dll
    0x60970000 - 0x60C31000      C:\DevSuiteHome_1\bin\orapls10.dll
    0x62500000 - 0x62507000      C:\DevSuiteHome_1\bin\oraslax10.dll
    0x627B0000 - 0x628B3000      C:\DevSuiteHome_1\bin\oraplp10.dll
    0x618B0000 - 0x61905000      C:\DevSuiteHome_1\bin\orahasgen10.dll
    0x622B0000 - 0x622E6000      C:\DevSuiteHome_1\bin\oraocr10.dll
    0x622F0000 - 0x62315000      C:\DevSuiteHome_1\bin\oraocrb10.dll
    0x6FEE0000 - 0x6FF34000      C:\WINDOWS\system32\NETAPI32.dll
    0x76BA0000 - 0x76BAB000      C:\WINDOWS\system32\PSAPI.DLL
    0x62A80000 - 0x62AF6000      C:\DevSuiteHome_1\bin\orasql10.dll
    0x662F0000 - 0x66320000      C:\DevSuiteHome_1\bin\mmi.dll
    0x64F10000 - 0x64F21000      C:\DevSuiteHome_1\bin\UIIM.dll
    0x64CE0000 - 0x64DBD000      C:\DevSuiteHome_1\bin\UIW.dll
    0x64CD0000 - 0x64CD7000      C:\DevSuiteHome_1\bin\UTC.dll
    0x64CC0000 - 0x64CC9000      C:\DevSuiteHome_1\bin\UTJ.dll
    0x72F50000 - 0x72F76000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x58B50000 - 0x58BE7000      C:\WINDOWS\system32\COMCTL32.dll
    0x64ED0000 - 0x64EF6000      C:\DevSuiteHome_1\bin\UIOLE.dll
    0x76340000 - 0x7638A000      C:\WINDOWS\system32\comdlg32.dll
    0x77F40000 - 0x77FB6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x7C9D0000 - 0x7D1F3000      C:\WINDOWS\system32\SHELL32.dll
    0x64AD0000 - 0x64C05000      C:\DevSuiteHome_1\bin\VGS.dll
    0x64E30000 - 0x64E93000      C:\DevSuiteHome_1\bin\UIREM.dll
    0x659A0000 - 0x659EE000      C:\DevSuiteHome_1\bin\ROS.dll
    0x66250000 - 0x6627E000      C:\DevSuiteHome_1\bin\mmw.dll
    0x662A0000 - 0x662B0000      C:\DevSuiteHome_1\bin\mmv.dll
    0x73AA0000 - 0x73AB7000      C:\WINDOWS\system32\AVIFIL32.dll
    0x77BB0000 - 0x77BC5000      C:\WINDOWS\system32\MSACM32.dll
    0x75BA0000 - 0x75BC1000      C:\WINDOWS\system32\MSVFW32.dll
    0x662C0000 - 0x662DF000      C:\DevSuiteHome_1\bin\mms.dll
    0x66810000 - 0x66A2B000      C:\DevSuiteHome_1\bin\DE.dll
    0x627A0000 - 0x627AF000      C:\DevSuiteHome_1\bin\oraplc10.dll
    0x64F50000 - 0x64F66000      C:\DevSuiteHome_1\bin\UICC.dll
    0x64FB0000 - 0x64FDA000      C:\DevSuiteHome_1\bin\UCOL.dll
    0x02FB0000 - 0x030CA000      C:\DevSuiteHome_1\bin\frmcom.dll
    0x66380000 - 0x66389000      C:\DevSuiteHome_1\bin\mma.dll
    0x64FF0000 - 0x65003000      C:\DevSuiteHome_1\bin\UAT.dll
    0x66220000 - 0x6623C000      C:\DevSuiteHome_1\bin\nn.dll
    0x64F70000 - 0x64F94000      C:\DevSuiteHome_1\bin\UIA.dll
    0x64F30000 - 0x64F45000      C:\DevSuiteHome_1\bin\UIDC.dll
    0x030D0000 - 0x03194000      C:\DevSuiteHome_1\bin\frmdig.dll
    0x031A0000 - 0x0324D000      C:\DevSuiteHome_1\bin\frmdug.dll
    0x66210000 - 0x66215000      C:\DevSuiteHome_1\bin\obs.dll
    0x77390000 - 0x77492000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x5B090000 - 0x5B0C8000      C:\WINDOWS\system32\uxtheme.dll
    0x74690000 - 0x746DB000      C:\WINDOWS\system32\MSCTF.dll
    0x76BE0000 - 0x76C0E000      C:\WINDOWS\system32\WINTRUST.dll
    0x779E0000 - 0x77A76000      C:\WINDOWS\system32\CRYPT32.dll
    0x77A80000 - 0x77A92000      C:\WINDOWS\system32\MSASN1.dll
    0x76C40000 - 0x76C68000      C:\WINDOWS\system32\IMAGEHLP.dll
    0x72C70000 - 0x72C79000      C:\WINDOWS\system32\wdmaud.drv
    0x72C60000 - 0x72C68000      C:\WINDOWS\system32\msacm32.drv
    0x77BA0000 - 0x77BA7000      C:\WINDOWS\system32\midimap.dll
    0x5D3F0000 - 0x5D491000      C:\WINDOWS\system32\DBGHELP.dll
    0x77BD0000 - 0x77BD8000      C:\WINDOWS\system32\VERSION.dll
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 35K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 6% used [0x10010000, 0x10017c90, 0x10090000)
    from space 64K, 7% used [0x10090000, 0x10091348, 0x100a0000)
    to space 64K, 0% used [0x100a0000, 0x100a0000, 0x100b0000)
    tenured generation total 1408K, used 122K [0x104f0000, 0x10650000, 0x14010000)
    the space 1408K, 8% used [0x104f0000, 0x1050e930, 0x1050ea00, 0x10650000)
    compacting perm gen total 4096K, used 1642K [0x14010000, 0x14410000, 0x18010000)
    the space 4096K, 40% used [0x14010000, 0x141aaac8, 0x141aac00, 0x14410000)
    Local Time = Wed Apr 12 10:35:49 2006
    Elapsed Time = 5
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode)
    # An error report file has been saved as hs_err_pid3184.log.
    # Please refer to the file for further information.
    Can anyone help me ?
    Message was edited by:
    dbouchier

    We do something very simular. We rename everything to lowercase for the same reasons. I've pasted a snippet of the code we're using at the end of this post.
    To get the full source code of our converter have a look at http://www.oratransplant.nl/2005/05/30/custom-built-forms-migration-assistant/#comment-642
    Here is the code snippet:
    while (attachedLibs.hasNext()) {
    AttachedLibrary attachedLib = (AttachedLibrary)attachedLibs.next();
    String attachedLibLocation = attachedLib.getLibraryLocation();
    out("Found attached library " + attachedLibLocation, logLevel,
    false);
    if (attachedLib.getName().equalsIgnoreCase("obsolete_forms6")) {
    obsoleteAttached = true;
    if (attachedLib.getName().equalsIgnoreCase("webreports")) {
    webReportsAttached = true;
    // converted name of attached lib to lowercase
    if ((!attachedLibLocation.equals(attachedLibLocation.toLowerCase())) &&
    lowerLib) {
    out(attachedLib,
    "Converting filename to lowercase (" + attachedLibLocation.toLowerCase() +
    ")", logLevel + 1, true);
    attachedLibLocation = attachedLibLocation.toLowerCase();
    pllChanged = true;
    // attachedLibLocation = attachedLibLocation.toUpperCase();
    pldText.append(".attach LIBRARY " + attachedLibLocation +
    " END NOCONFIRM\n");
    out("Re-attaching library " + attachedLibLocation, logLevel + 1,
    false);
    }

  • 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

  • Create Named Search with Java API

    Hi,
    is it possible to create or modify a named search with the Java API?
    Best regards,
    Roman

    Hi Olof,
    You can use the below code for searching a value in lookup table:
                   ResultDefinition objResultDefinition = new ResultDefinition(Lookup Table Id);
                   objResultDefinition.addSelectField(Lookup Field ID);
                   StringValue [] objStringValue = new StringValue[1];
                   objStringValue[0] = new StringValue("Value to search");
                   RetrieveRecordsByValueCommand objRetrieveRecordsByValueCommand = new RetrieveRecordsByValueCommand(objConnectionAccessor);
                   objRetrieveRecordsByValueCommand.setSession(strUserSessionID);
                   objRetrieveRecordsByValueCommand.setResultDefinition(objResultDefinition);
                   objRetrieveRecordsByValueCommand.setFieldId(lookup field id);
                   objRetrieveRecordsByValueCommand.setFieldValues(objStringValue);
                   objRetrieveRecordsByValueCommand.execute();
                   RecordResultSet objRecordResultSet = objRetrieveRecordsByValueCommand.getRecords();
    Now using the objRecordResultset in a loop you can get the record id by calling the getRecord(i).getId() method.
    Hope this helps!!
    Cheers,
    Arafat

  • Modifying ang Creating Participants with BPM API (10.3.1)

    Hello,
    I am trying to create and modify participants and their properties with the API in Studio 10.3.1.
    I am using a "DirHumanParticipant" object in a new activity in the "ReassignTeamByParametricValue" screenflow of the demo. First, I am testing the DirHumanParticipant.fetchCurrent method.
    When executing the activity with the predefined user "Rudy", the log shows that DirHumanParticipant.fetchCurrent doesn't return "Rudy" but a "root" user I don't know.
    So, what is it ? What method should I use to get "Rudy" ? What about creating a participant and assigning him roles ?
    + Is it mandatory to get an organizational unit to create a participant ?
    + Is there a difference about participants between executing BPM in Studio vs executing BPM in Webcenter Interaction ?
    Thanks for help,
    Here is my code :
    // Reuse Engine session to the Directory
    DirectorySession session = DirectorySession.currentEngineSession;
    logMessage("ReassignTeamByParametricValue.creationParticipant : session : "+session.organizationName);
    logMessage("ReassignTeamByParametricValue.creationParticipant : session : "+session);
    // Load the Organization Unit to which the participant will belong to
    DirOrganizationalUnit myOU = DirOrganizationalUnit.fetchRoot(session : session);
    logMessage("ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : "+myOU.displayName);
    logMessage("ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : "+myOU);
    // Load the Role that the participant will have assigned,
    // and create a role assignment for it
    DirOrganizationalRole myRole = DirOrganizationalRole.fetch(session : session, id : roleName);
    RoleAssignment[] myAssignments;
    RoleAssignment myAssignment = RoleAssignment.create(role : myRole, parametricValue : paramaterValue, permissions : 255);
    myAssignments[0] = myAssignment;
    logMessage("ReassignTeamByParametricValue.creationParticipant : myAssignments[0] : "+myAssignments[0].roleId +" "+myAssignments[0].parametricValue);
    DirHumanParticipant currentPart = DirHumanParticipant.fetchCurrent(session);
    logMessage("ReassignTeamByParametricValue.creationParticipant : participant : "+currentPart.displayName);
    logMessage("ReassignTeamByParametricValue.creationParticipant : participant : "+currentPart);
    Here is the log :
    ReassignTeamByParametricValue.creationParticipant : session : ExpenseReimbursement
    ReassignTeamByParametricValue.creationParticipant : session : fuegoblock.fdi.DirectorySession@93e4d1
    ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit :
    ReassignTeamByParametricValue.creationParticipant : DirOrganizationalUnit : name: fullName: description:null|IN:-1|ID:|displayName:|internalId:/
    ReassignTeamByParametricValue.creationParticipant : myAssignments[0] : AP Auditor West
    ReassignTeamByParametricValue.creationParticipant : participant :
    ReassignTeamByParametricValue.creationParticipant : participant : firstName:,lastName:,mail:,status:R,tel:null,fax:null,permissions:0|IN:-1|ID:root|displayName:null|internalId:root

    I got the DirHumanParticipant "Rudy" of the demo by hardly coding : myParticipant.displayName == "Rudy".
    I assigned him roles with : myParticipant.rolesAssignment[] = myAssignment;
    (see above)
    Now I get this error when I update the user !
    A component failed while executing activity '/ExpenseReimbursement#Default-1.0/Grab[ReassignRegion]' (BP-method ReassignRegion) over instance '/ExpenseReimbursement#Default-1.0/1/0'.
    Caused by: java.lang.UnsupportedOperationException
         at fuego.directory.provider.UnsupportedParticipantAccessor.updateHumanParticipant(UnsupportedParticipantAccessor.java:184)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at fuego.directory.provider.DirectorySessionImpl$AccessorProxy.invoke(DirectorySessionImpl.java:756)
         at $Proxy15.updateHumanParticipant(Unknown Source)
         at fuego.directory.DirHumanParticipant.update(DirHumanParticipant.java:1752)
         at fuegoblock.fdi.DirHumanParticipant.update(DirHumanParticipant.java:1951)

  • How do I resolve connection error with Java API listener?

    I have created a listener using the new Java API (see How do I implement a listener using new MDM Java API? for background). When I run it, I get this error message
    Mar 19, 2008 3:57:58 PM com.sap.mdm.internal.net.ConnectionImpl finalize
    INFO: Disconnect was not called. Cleaning up connection in finalize.
    This message is triggered whenever I generate a data event that I would otherwise expect to be captured and handled by the listener. I have tried a number of things, including setting the connection to NO_TIMEOUT and trying SimpleConnection versus ConnectionPool, but always with the same result.
    Here is some sample code for the listener:
    public class DataListenerImpl implements DataListener {
         public void recordAdded(RecordEvent evt) {          
              System.out.println("===> Record Added Event");
              System.out.println(evt.getServerName());
         public void recordCheckedIn(RecordEvent evt) {
              System.out.println("===> Record Checked In Event");
              System.out.println(evt.getServerName());          
         public void recordCheckedOut(RecordEvent evt) {
              System.out.println("===> Record Checked Out Event");
              System.out.println(evt.getServerName());               
         public void recordModified(RecordEvent evt) {
              System.out.println("===> Record Modified Event");
              System.out.println(evt.getServerName());
    And here is the code for the Event Dispatcher:
    public void execute(Repository repository) {
         DataListener listener = new DataListenerImpl();
         try {
              EventDispatcherManager edm = EventDispatcherManager.getInstance();
              EventDispatcher ed = edm.getEventDispatcher(repository.getServer().getName());
              ed.addListener(listener);
              ed.registerDataNotifications(SystemProperties.getUserName(), SystemProperties.getPassword(),
                        repository.getIdentifier(), repository.getLoginRegion());
              ed.registerRepositoryNotifications(SystemProperties.getUserName(), SystemProperties.getPassword(),
                        repository.getIdentifier());
              ed.registerGlobalNotifications();
              while (true) {
                   Thread.yield();
                   try {
                        Thread.sleep(1500);
                   } catch (InterruptedException ex) {
                        System.out.println("Interrupted Exception: " + ex.getMessage());
         } catch (ConnectionException e) {
              e.printStackTrace();
         } catch (CommandException e) {
              e.printStackTrace();
    Has anyone else encountered this message? Could it be related to a TCP configuration on the server? Or is this a bug in the Java API?
    As I mentioned in the forum posting linked to above, I have not encountered this problem with the MDM4J API.
    Any help is greatly appreciated.

    I resolved it. We are switching over to SP6, Patch 1 and the listener code works fine with this version of the Java API.
    Just one thing to note, though: make sure that you register data notifications through MetadataManager in your initialization code:
    metadataManager.registerDataNotifications(userSessionContext, repositoryPassword);
    For information on the changes to the SP6 Java API, especially with regard to connecting to MDM with the UserSessionContext, please review Richard LeBlanc's [presentation|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20073a91-3e8b-2a10-52ae-e1b4a10add1c].

  • Solved: INTERNAL_ERROR when creating container with Java on Vista

    I don't know what the root cause is, but I've got a solid test case.
    If I maintain a reference to the Environment used to create my XmlManager, then openContainer will barf up a mysterious INTERNAL_ERROR. Setting my reference to the Environment to null eliminates the problem.
    I'm using 2.3.10 on Vista with java 1.6. Netbeans 6.0 beta 1
    the error:
    com.sleepycat.dbxml.XmlException: Uncaught exception from C++ API, errcode = INTERNAL_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_openContainer__SWIG_2(Native Method)
    at com.sleepycat.dbxml.XmlManager.openContainer(XmlManager.java:525)
    at com.sleepycat.dbxml.XmlManager.openContainer(XmlManager.java:190)
    at restlet.Main.main(Main.java:105)

    Oops, haha. I guess rebooting made this go away (!?); I can't repro today.
    Here's the test case anyway.
    import com.sleepycat.db.DatabaseException;
    import com.sleepycat.db.Environment;
    import com.sleepycat.db.EnvironmentConfig;
    import com.sleepycat.dbxml.XmlContainer;
    import com.sleepycat.dbxml.XmlContainerConfig;
    import com.sleepycat.dbxml.XmlException;
    import com.sleepycat.dbxml.XmlManager;
    import com.sleepycat.dbxml.XmlManagerConfig;
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class Test {
    public static void main(String[] args) {
    Environment myEnv = null;
    XmlManager xmlManager = null;
    XmlContainer myContainer = null;
    File envHome = new File("C:/testEnv");
    String theContainer = "container.dbxml";
    try {
    EnvironmentConfig envConf = new EnvironmentConfig();
    myEnv = new Environment(envHome, envConf);
    XmlManagerConfig xmlManagerConfig = new XmlManagerConfig();
    xmlManager = new XmlManager(myEnv, xmlManagerConfig);
    // myEnv = null; // omit for error
    XmlContainerConfig xmlCC = new XmlContainerConfig();
    myContainer = xmlManager.openContainer(theContainer, xmlCC); // error here
    myContainer.close();
    xmlManager.close();
    } catch (XmlException xml) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, xml);
    } catch (DatabaseException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    } catch (FileNotFoundException fnfe) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, fnfe);
    } finally {
    try {
    if (myContainer != null) {
    myContainer.close();
    if (xmlManager != null) {
    xmlManager.close();
    if (myEnv != null) {
    myEnv.close();
    } catch (DatabaseException ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "eject!", ex);
    }

  • Restoring NamedSearch with Java API

    Hi,
    I tried to restore a NamedSearch with the following code:
        RestoreNamedSearchCommand restoreNamedSearchCommand = new RestoreNamedSearchCommand(context);
        restoreNamedSearchCommand.setSession(session);
        restoreNamedSearchCommand.setTableId(namedSearchTableId);
        restoreNamedSearchCommand.setRecordId(searchRecord.getId());
        restoreNamedSearchCommand.execute();
        Search namedSearch = restoreNamedSearchCommand.getSearch();
    But I always get the following error: Server error (0xffaa0310)
    No matter which NamedSearch I try to read.
    Has anybody encountered that error before and knows what it means?
    Or has someone succesfully restored a NamedSearch via the Java API?
    Many thanks,
    Martin

    Hi Martin,
    Here is a quote from the MDM API JavaDoc:
    A command to restore a named search. A named search is a search criteria that has been saved.
    Note: Not all named search can be restored by the API.
    It seems you may be in one of those occasions where the named search cannot be restored.
    There is, fortunately a workaround.  The following piece of code will add a named search to an MDM Search object, and will always work in returning the correct records when used in a RetrieveLimitedRecordsCommand (or any other command that takes a search object).
    // Step 1: Create a SearchDimension
    SearchDimension sd = new NamedSearchSearchDimension();\
    // Step 2: Create an array of MdmValue and add the NamedSearch ID to the array
    MdmValue [] mdmValues = new MdmValue[1];
    mdmValues[0] = new LookupValue(new RecordId(namedSearchId));
    // Step 3: Create a PicklistSearchConstraint and add the array of lookup values
    PicklistSearchConstraint sc  = new PicklistSearchConstraint(mdmValues);
    // Step 4: (Optional, but advised) Create a SearchParameter
    SearchParameter sp = new SearchParameter(sd, sc);
    // Step 5: If you do not already have a search object, create a new one
    Search search = new Search( mainTableId );
    // Step 6: Add the search parameter to the search
    search.add( sp );
    // Now use the search in a retrieve command
    Hoping this solves your problem,
    Walter

  • Sort  Hierarchy with Java API

    Hi Mdm guru,
    I have to sort the getHierarchy results.
    In the MDM Data Manager is possible "Sort Entire Branch" (in the context menu).
    My question: there is a method in the Java Api for this funtionality?
    Best Regards

    Hi Rocco,
    It depends upon <i>which</i> API you are using.  The API <b>mdm4j</b> has a function
    CatalogData.GetChildren()
    which has a parameter for defining the sort field.  So you can create your own recursive function which drills down through a hierarchy, creating each level sorted.
    The class <b>SortDefinition</b> belongs to the "new" API <b>MDMJavaAPI</b>, but at present I do not see a way of gettting a sorted hierarchy with this API.
    Walter

  • Insert Value(s) in Lookup Flat Multi-valued Table with Java API

    I've been looking in MDM Java API Library Reference Guide, MDM SP4 API JavaDoc, and SDN Forums for information on how to Insert/Update different values in a field in the Main Table of a given repository that belongs to a Lookup Flat Multi-valued Table using the Java API with no success.
    I also haven't been successful in adding this values in the same way that I'll add a single value, using the MDM Java API, in a single-value Lookup Table (a2iFields.Add(new A2iField(FIELD_CODE,FIELD_VALUE)) for each value I want to add, like for example:
    a2iFields.Add(new A2iField("Country","USA")
    a2iFields.Add(new A2iField("Country","Mexico")
    a2iFields.Add(new A2iField("Country","Germany")
    Can anybody point me to the correct documentation that I need to read to fulfill this task? Or, even better, if someone can post a piece of code, I'll be more thankful.
    Thanks for your help.

    HI,
    little code example, where you add existing lookup values based on there record id:
         int USA = 1;
                        int GERMANY = 2;
                        A2iValueArray countryArray = new A2iValueArray();               
                        countryArray.Add(new Value(USA));
                        countryArray.Add(new Value(GERMANY));
                        A2iFields record = new A2iFields();
                        record.Add(new A2iField("Country", new Value(countryArray)));
    Please reward points if helpful.
    Regards,
    Robert

  • Purge a queue with JAVA API

    Hi,
    Is it possible to purge a queue with the JAVA API ?
    I have not found anything ...
    I am also trying to browse archived messages (state 2), the "browseQueue" method does only browse the ready messages (state 0).
    Is it possible to browse archived messages ?? (in java)
    Thanks in advance.

    found it, I had to write
    "ormi://<some-ip>:12401/orabpel" for java.naming.provider.url

  • Bursting with JAVA APIs / MultiThreading / Errors Handling

    We are trying to use the bursting JAVA APIs 10.1.3.3.1 Standalone) to burst huge XML files and generate PDF Files from RTF templates. Here are a list of our issues with this feature:
    1. We have some problems catching the errors when bursting. We have tried to use the "oracle.apps.xdo.common.log.Logger" class, but it is not always reacting like we think it should. Could you please give us an exemple of a clean bursting error catching or a brief description of how we could do it. We have a lot of difficulties to find information about using the JAVA APIs of BIP.
    2. Is it a clean way of catching the bursting errors to use the "oracle.apps.xdo.common.log.Logger" class?
    3. When using the 10.1.3.3.1 DocumentProcessor JAVA API, the process gets killed when the RTF template is not where the control file specified it. Even when using a finally clause containing the document processor, we can't fetch the error from the "oracle.apps.xdo.common.log.Logger" class. We did not find a way to catch this error which make our program crash.
    4. How can we enable multi-threading that is included in the DocumentProcessor JAVA APIs so it can take advantage of the multi-processors environnements?

    1. Check tim d. blog, you can use the bursting listners to get the errors. It's also in the documentation.
    First, on every exception, the Bursting APIs are dumping the error in the Logger. So I can't see how we can use the listeners to catch these. We can check the hasExceptions on the Logger but still, we have some problems with this. When we deploy our application as a MDB (Message driven bean), it seems that once the hasException flag has been raised, if we call the MDB again, it is still up. Is there documentation about that Logger class? Also, I'm worried that we won't be able to call our MDB twice to run simultaneously 2 different bursting process since it seems the Logger is something static, keeping every exception in memory... That's bad.. And show me where you have found documentation about this. All I see in documentation is how to call the DocumentProcessor in a couple of lines. I don't see anything about a clean way to catch errors.
    2. Yes/No/Depends. I think it's fine. If your changing the logger options in your program that could come back to haunt you.
    I guess so, I'm not changing anything and its already haunting me...
    3. When using the 10.1.3.3.1 DocumentProcessor JAVA API, the process gets killed when the RTF template is not where the control file specified it. Even when using a finally clause containing the document processor, we can't fetch the error from the "oracle.apps.xdo.common.log.Logger" class. We did not find a way to catch this error which make our program crash.
    Even worst, when we deploy the component has an MDB, when the error happens, it kills the whole oc4j container... please correct this quick.
    4. How can we enable multi-threading that is included in the DocumentProcessor JAVA APIs so it can take advantage of the multi-processors environnements?
    We got an answer from the dev team which is to add two properties to the document processor, something like:
    enable-multithreading: true
    thread-count: >2
    We did that and what we got is that the process started and it got stuck in a dead lock at the first document processing. How nice! :)
    We got a milestone in March and I'm really worried about all those problems... Not enough documentation, a pretty bad error handling, errors making crash the whole oc4j container, Logger seems not to be handling simultaneous calls/ threads, not even handling two subsequent calls... etc.
    If anyone has the magic answer, it would be pretty welcomed!
    Thanks

  • Process Instance : Update Process Variables with Java API

    Hi,
    I need to set a lot of process variables in a java service that is executed in a process but can't find the way to do that.
    Is it possible to modify the value of a variable from a process instance with the JAVA API ?
    I didn't find this type of function (for example with the ProcessManager API).
    Thanks,
    Will

    Could you place your logic in an executeScript service?
    You can use native Java there.
    I have had good luck getting values in and out of process varaibles with the get... set...
    this is a very simple example.
    import com.adobe.workflow.pat.service.*;
    String allowLogging = patExecContext.getProcessDataStringValue("/process_data/@allowLogging");
    patExecContext.setProcessDataStringValue("/process_data/@errorActivity", "Save Doc XML");
    patExecContext.setProcessDataStringValue("/process_data/@errorMessage", "SystemException");
    if (allowLogging.equalsIgnoreCase("true")) {
    System.out.println("@@@@ Save Doc XML @@@@");
    System.out.println("@@@@ SystemException @@@@");
    }; // END allowLogging

Maybe you are looking for

  • How to move my events and pictures from mobileme

    Hello I just reinstalled the mac osx from scratch and also installed the applications dvd,including iphoto.After syncing with my mobileme account and launching iphoto ,i can see all the event names on the left side bar under the "MOBILEME GALLERY "an

  • Macbook pro monitor not working

    prior my macbook was working flawlessly, no issues. but now its screen is not turning on, not even being picked up. the camera on the laptop works, everything else works perfectly, but the screen does not respond. im out of apple warranty so i apple

  • Print issue in PRD server

    Dear All, In our PRD server all the print is going in the waiting state ,,,how to resolve the issue ...as we are using 3 spool work process but the one spool work process is stopped and remaining 2 are free but not doing any thing ,,,plz give any sug

  • Photos Not Showing in Computer Menu

    Everything seems to work fine with my new ATV (2nd gen) except photos from iPhoto will not display in the Computer menu. I can see all of the folders I set to Home Share via iTunes, but the photos do not display in the folders. My movies and music wo

  • Group by clause based on condition

    tblScore contains score for each problem id     problemID      score 1          1             10 2          2             30 tblSubmission contains problem submissions for each user id     user         problemID      accepted 1     UserA