Add nodes to XML

My script asks different types of input to the user and I want to store that info in a settings xml file. That way the dialogs can fall back on previously entered data.
I found out how to read an XML file and search for specific values (xpath), but I also want to add new "settings" to the file. Is there an easy way to do this with InDesign javascript? The code in bold is pseudocode that I want to replace by some real code.
    var settingsFile = new File(kSettingsFileName);
    if (settingsFile.open("r")) {
        var settingsXML = new XML(settingsFile.read());
        settingsFile.close();
        var currentSettingElement = settingsXML.xpath (settingName);
        if currentSettingElement does not exist
            create the element and set the value
        else
            currentSettingElement.setChildren(settingValue);

I use app.insertLabel() and app.extractLabel() to store and retrieve settings in a dialog box. It is more convenient than using extra txt or xml file.
If you are interested, take a look at this script.
This function creates default settings if they have not been saved yet.
function GetSettings() {
     var mySettings = eval(app.extractLabel("Kas_PackageForArchive_Settings_ver3.0"));
     if (mySettings == undefined) {
          mySettings = { copyFontsCheckBox:false, copyGraphicsCheckBox:true, updateGraphicsCheckBox:true, includeHiddenLayers:true, ignorePreflightErrorsCheckBox:true, createReportCheckBox:false, createLogCheckBox:true };
     return mySettings;
Read saved settings before creating a dialog:
function CreateDialog() {
     var mySettings = GetSettings();
     var myDialog = new Window('dialog', 'Package for Archive');...
Save chosen settings before closing the dialog after OK button was clicked:
...     var myShowDialog = myDialog.show();
     if (myShowDialog== 1) {
          var myResult = {};
          myResult.copyFontsCheckBox = myCopyFontsCheckBox.value;
          myResult.copyGraphicsCheckBox = myCopyGraphicsCheckBox.value;
          myResult.updateGraphicsCheckBox = myUpdateGraphicsCheckBox.value;
          if (myInDesignVersion == 6) myResult.includeHiddenLayers = myIncludeHiddenLayersCheckBox.value;
          myResult.ignorePreflightErrorsCheckBox = myIgnorePreflightErrorsCheckBox.value;
          myResult.createReportCheckBox = myCreateReportCheckBox.value;
          myResult.createLogCheckBox = myCreateLogCheckBox.value;
          myResult.folder = myFolder;
          app.insertLabel("Kas_PackageForArchive_Settings_ver3.0", myResult.toSource());
     return myResult;
Kasyan

Similar Messages

  • Add node into XML Model

    Hi all,
    i would like to add datas into my xml model but i don't manage to do it.
    Here is the context :
    -I have an xml file which represents a tree
    -When the xml model is loaded, i bound it to a tree
    -Then i add nodes to my tree ( aNode.addNode(new Node ) )
    When adding a node, i would like the node to be represented to my model;
    e.g : before adding a node
    <node name="node1">
         <node name="node1_1"/>
         <node name="node1_2"/>
    </node>
    after the node is added :
    <node name="node1">
         <node name="node1_1"/>
         <node name="node1_2"/>
         <node name="new node"/>
    </node>
    I have tried  xml setProperty:
    oModel.setProperty(myPath,data);
    oModel.setProperty(myPath,data,oContext);
    Can somebody help me to achieve this?
    Thanks,
    best regards,
    Marc

    Thanks for this fast reply, i try it and i come back to you
    Edit :
    Here is my xml file :
    <?xml version="1.0" encoding="utf-8"?>
    <objectSet version="1.2.3.4">
        <aRoot code="testCode" reference="0123456789" description="TestDescription"
            owner="Tester">
            <component name="MyCompo1" type="MyCompo1Type">
                <component name="MyCompo2" type="MyCompo2Type">
                    <property name="myProperty2-1" type="string" value="null" />
                    <property name="myProperty2-2" type="string" value="null" />
                    <property name="myProperty2-3" type="string" value="null" />
                </component>
                <component name="MyCompo3" type="MyCompo3Type">
                    <property name="myProperty3-1" type="string" value="null" />
                </component>
            </component>
        </aRoot>
    </objectSet>
    I made a button with the fellowing function attached :
    aTestFunction: function(oEvent){
            console.log("Test");
            var tree = this.byId("myTree");
            var oModel = tree.getModel();
            var pty = oModel.getProperty("/aRoot/MyCompo1"); // Empty; path is not good
            var pty1 = oModel.getProperty("/aRoot/component");//something but only whitespaces when printing
            console.log(pty);//empty
            console.log(pty1);// a lot of whitespaces (9lines of different sizes)
            pty1.push("node");//Error, pty1.push is not a function
            oModel.setProperty("/aRoot/component",pty1);
    The argument of pty1.push is not good, but the function cannot be even called.
    Another try?

  • How to delete a perticular node from xml file using java code

    Hii All,
    Now i am trying to delete a perticular node from xml file.Like...
    XML file:
    <Licence>
    <SERVER>
    <was id="1">1</was>
    <was id="2">2</was>
    </SERVER>
    </LICENCE>
    I am working in messaging service using JABBER framework with whiteboard facility.
    Here Some commands i have created to add,modify,delete nodes from xml file.They Are
    1.If u want to add a new node then.
    create Licence.SERVER <ss id="3">ddd</ss> lic.xml
    (here u want to add a new node called "ss" under Licence.SERVER.
    And lic.xml is tyhe xml file name where it was saved.
    2.If u want to delete a node(Suppose <was id="1">),then the command should be
    delete Licence.SERVER.was:id='"1" lic.xml
    A problem arises that here it find two was attributes.And it delete the last was attribute,not the requested node.
    PLEASE HELP ME IN SOLVING THIS CODE..
    ------------------------------------

    Looks like you clicked on "Post" before you pasted in the code you were talking about.

  • How to add node

    I have two node RAC. One node has OS issue so we have to reinstall OS and Now I want to add new node.But ORACLE_HOME and ORA_CRS_HOME will be different for second home.
    Is it possible to have ORACLE_HOME differnt on each home?
    Means one the first node ORACLE_HOME is /opt/oracle/product/10.2.0/crs
    and on second node ORACLE_HOME will /export/home/oracle/product/10.2.0/crs
    How to add node in such condition?

    I have followed ML NOTE: 270512.1 and I am able to add clusterware on second Node
    When I have tried to "Add the RAC software to the new node" at time I am getting bellow error
    OUI-10009: There are no new nodes to add to this installation
    I have genrated trace using this command
    ./addNode.sh "CLUSTER_NEW_NODES=bullhead-rac2" -logLevel trace -debug
    Here it is
    Oracle Universal Installer, Version 10.2.0.3.0 Production
    Copyright (C) 1999, 2006, Oracle. All rights reserved.
    [main] [13:54:16:457] [NativeSystem.<init>:259] NullSecurityManager is set for Native System calls
    [main] [13:54:16:464] [Library.getInstance:95] Created instance of Library.
    [main] [13:54:16:465] [Version.isPre10i:189] isPre10i.java: Returning FALSE
    [main] [13:54:16:466] [UnixSystem.getCSSConfigType:2014] configFile=/var/opt/oracle/ocr.loc
    [main] [13:54:16:475] [Utils.getPropertyValue:221] keyName=ocrconfig_loc props.val=/dev/rdsk/c3t1d0s1 propValue=/dev/rdsk/c3t1d0s1
    [main] [13:54:16:476] [Utils.getPropertyValue:292] propName=local_only propValue=FALSE
    [main] [13:54:16:477] [UnixSystem.getCSSConfigType:2058] configType=false
    [main] [13:54:16:481] [Version.isPre10i:189] isPre10i.java: Returning FALSE
    [main] [13:54:16:482] [ClusterInfo.<init>:222] m_olsnodesPath=/oracle/product/10.2.0/crs/bin/olsnodes
    [main] [13:54:16:485] [RuntimeExec.runCommand:74] Calling Runtime.exec() with the command
    [main] [13:54:16:486] [RuntimeExec.runCommand:76] /oracle/product/10.2.0/crs/bin/olsnodes
    [main] [13:54:16:550] [RuntimeExec.runCommand:131] runCommand: Waiting for the process
    [Thread-2] [13:54:16:551] [StreamReader.run:61] In StreamReader.run
    [Thread-3] [13:54:16:551] [StreamReader.run:61] In StreamReader.run
    [Thread-2] [13:54:17:965] [StreamReader.run:65] OUTPUT>catfish-rac1
    [Thread-2] [13:54:17:969] [StreamReader.run:65] OUTPUT>bullhead-rac2
    [main] [13:54:18:62] [RuntimeExec.runCommand:133] runCommand: process returns 0
    [main] [13:54:18:63] [RuntimeExec.runCommand:147] RunTimeExec: output>
    [main] [13:54:18:64] [RuntimeExec.runCommand:150] catfish-rac1
    [main] [13:54:18:64] [RuntimeExec.runCommand:150] bullhead-rac2
    [main] [13:54:18:65] [RuntimeExec.runCommand:155] RunTimeExec: error>
    [main] [13:54:18:66] [RuntimeExec.runCommand:175] Returning from RunTimeExec.runCommand
    [main] [13:54:18:66] [ClusterInfo.getNodeNames:341] Number of nodes=2
    [main] [13:54:18:69] [ClusterInfo.getLocalNodeName:242] cmd=/oracle/product/10.2.0/crs/bin/olsnodes -l
    [main] [13:54:18:69] [RuntimeExec.runCommand:74] Calling Runtime.exec() with the command
    [main] [13:54:18:70] [RuntimeExec.runCommand:76] /oracle/product/10.2.0/crs/bin/olsnodes
    [main] [13:54:18:70] [RuntimeExec.runCommand:76] -l
    [Thread-5] [13:54:18:134] [StreamReader.run:61] In StreamReader.run
    [main] [13:54:18:135] [RuntimeExec.runCommand:131] runCommand: Waiting for the process
    [Thread-4] [13:54:18:134] [StreamReader.run:61] In StreamReader.run
    [Thread-4] [13:54:19:560] [StreamReader.run:65] OUTPUT>catfish-rac1
    [main] [13:54:19:626] [RuntimeExec.runCommand:133] runCommand: process returns 0
    [main] [13:54:19:627] [RuntimeExec.runCommand:147] RunTimeExec: output>
    [main] [13:54:19:628] [RuntimeExec.runCommand:150] catfish-rac1
    [main] [13:54:19:628] [RuntimeExec.runCommand:155] RunTimeExec: error>
    [main] [13:54:19:629] [RuntimeExec.runCommand:175] Returning from RunTimeExec.runCommand
    [main] [13:54:19:630] [ClusterInfo.getLocalNodeName:247] exit value 0
    [main] [13:54:19:631] [ClusterInfo.getLocalNodeName:253] output.length=1
    [main] [13:54:19:631] [ClusterInfo.getLocalNodeName:257] output[0]=catfish-rac1
    Starting Oracle Universal Installer...
    No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
    LD_LIBRARY_PATH environment variable :
    Total args: 25
    Command line argument array elements ...
    Arg:0:../../jdk/jre/bin/java:
    Arg:1:-Doracle.installer.library_loc=../lib/solaris:
    Arg:2:-Doracle.installer.oui_loc=/oracle/product/10.2.0/db_1/oui/bin/..:
    Arg:3:-Doracle.installer.bootstrap=FALSE:
    Arg:4:-Doracle.installer.startup_location=/oracle/product/10.2.0/db_1/oui/bin:
    Arg:5:-Doracle.installer.jre_loc=../../jre:
    Arg:6:-Doracle.installer.nlsEnabled="TRUE":
    Arg:7:-Doracle.installer.prereqConfigLoc= :
    Arg:8:-Doracle.installer.unixVersion=5.10:
    Arg:9:-mx96m:
    Arg:10:-cp:
    Arg:11:/tmp/OraInstall2007-10-09_01-54-01PM:../jlib/OraInstaller.jar:../jlib/oneclick.jar:../jlib/xmlparserv2.jar:../jlib/srvm.jar:../jlib/share.jar:../jlib/
    OraInstallerNet.jar:../jlib/xml.jar:../jlib/orai18n-collation.jar:../jlib/orai18n-mapping.jar:../jlib/emCfg.jar:../jlib/ojmisc.jar:../jlib/InstImages.jar:../
    jlib/InstHelp.jar:../jlib/InstHelp_de.jar:../jlib/InstHelp_es.jar:../jlib/InstHelp_fr.jar:../jlib/InstHelp_it.jar:../jlib/InstHelp_ja.jar:../jlib/InstHelp_ko
    .jar:../jlib/InstHelp_pt_BR.jar:../jlib/InstHelp_zh_CN.jar:../jlib/InstHelp_zh_TW.jar:../jlib/oracle_ice.jar:../jlib/help4.jar:../jlib/help4-nls.jar:../jlib/
    ewt3.jar:../jlib/ewt3-swingaccess.jar:../jlib/ewt3-nls.jar:../jlib/swingaccess.jar:../jlib/classes12.jar::../jlib/OraPrereq.jar:../jlib/jewt4.jar:../jlib/jew
    t4-nls.jar:
    Arg:12:oracle.sysman.oii.oiic.OiicInstaller:
    Arg:13:-scratchPath:
    Arg:14:/tmp/OraInstall2007-10-09_01-54-01PM:
    Arg:15:-sourceType:
    Arg:16:network:
    Arg:17:-timestamp:
    Arg:18:2007-10-09_01-54-01PM:
    Arg:19:-addNode:
    Arg:20:ORACLE_HOME=/oracle/product/10.2.0/db_1:
    Arg:21:CLUSTER_NEW_NODES=bullhead-rac2:
    Arg:22:-logLevel:
    Arg:23:severe:
    Arg:24:-debug:
    Initializing Java Virtual Machine from ../../jdk/jre/bin/java. Please wait...

  • Add node Error

    Hello,
    I am trying to add node to two-node Oracle RAC 11g, but I got
    an error. I follow the steps:
    # export ORACLE_HOME=/u01/app/11.2.0/grid
    # cd $ORACLE_HOME/oui/bin
    # ./addNode.sh -silent "CLUSTER_NEW_NODES={rac3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rac3-vip}"So, Follows the log file:
    INFO: Environment Variables:
    INFO:   ORACLE_HOME = /u01/app/11.2.0/grid
    INFO:   PATH = /u01/app/oracle/product/11.2.0/db_1/bin:/usr/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/b
    in
    INFO:   CLASSPATH =
    INFO: Username:oracle
    INFO: Install area Control created with access level  1
    INFO: Oracle Universal Installer version is 11.2.0.1.0
    INFO: Setting variable 'ORACLE_HOME' to '/u01/app/11.2.0/grid'. Received the value from the command line.
    INFO: Setting variable 'CLUSTER_NEW_NODES' to 'rac3'. Received the value from the command line.
    INFO: Setting variable 'CLUSTER_NEW_VIRTUAL_HOSTNAMES' to 'rac3-vip'. Received the value from the command line.
    INFO: Setting variable 'PREREQ_CONFIG_LOCATION' to ''. Received the value from variable association.
    INFO: Setting variable 'FROM_LOCATION' to '/u01/app/11.2.0/grid/inventory/ContentsXML/comps.xml'. Received the value from a co
    de block.
    INFO: Setting variable 'ROOTSH_LOCATION' to '/u01/app/11.2.0/grid/root.sh'. Received the value from a code block.
    INFO: Setting variable 'ROOTSH_STATUS' to '3'. Received the value from a code block.
    INFO: Setting variable 'ORACLE_HOME' to '/u01/app/11.2.0/grid'. Received the value from the command line.
    INFO: Setting variable 'CLUSTER_NEW_NODES' to 'rac3'. Received the value from the command line.
    INFO: Setting variable 'CLUSTER_NEW_VIRTUAL_HOSTNAMES' to 'rac3-vip'. Received the value from the command line.
    INFO: Setting variable 'PREREQ_CONFIG_LOCATION' to ''. Received the value from variable association.
    INFO: Setting variable 'FROM_LOCATION' to '/u01/app/11.2.0/grid/inventory/ContentsXML/comps.xml'. Received the value from a code block.
    INFO: Setting variable 'ROOTSH_LOCATION' to '/u01/app/11.2.0/grid/root.sh'. Received the value from a code block.
    INFO: Setting variable 'ROOTSH_STATUS' to '3'. Received the value from a code block.
    INFO:
    *** Welcome Page***
    INFO: Setting variable 'ORACLE_HOME_NAME' to 'Ora11g_gridinfrahome1'. Received the value from a code block.
    INFO: SRVM ClusterInfo.IsLocalOnly() called. Return value obtained is 'true'.
    INFO: The CRS clusterware location for 'oracle.crs 10.1.0.2.0' is '/u01/app/11.2.0/grid'.
    INFO: CRS clusterware detected.
    INFO: Vendor clusterware is not detected.
    INFO: Local node 'rac1' is derived from the Oracle home properties.
    INFO: Setting variable 'LOCAL_NODE' to 'rac1'. Received the value from a code block.
    INFO: Setting variable 'EXISTING_REMOTE_NODES' to 'rac2'. Received the value from a code block.
    INFO: Setting variable 'REMOTE_NODES' to 'rac3'. Received the value from a code block.
    INFO: Setting the 'ExistingClusterNodes' property to 'rac1,rac2'.
    INFO: Setting the 'EnableVirtualHostNameEntry' property to 'true'.
    INFO: Setting the 'NewNodes ( CLUSTER_NEW_NODES )' property to 'rac3'. Received the value from the command line.
    INFO: Setting variable 'REMOTE_NODES' to 'rac3'. Received the value from a code block.
    INFO: Setting variable 'CLUSTER_NODES' to 'rac1,rac2,rac3'. Received the value from a code block.
    INFO: Performing tests to see whether nodes rac2,rac3 are available
    INFO: Validating nodes rac2...
    INFO: Checking if nodes are alive...
    INFO: Validating user equivalence...
    INFO: Validating nodes rac3...
    INFO: Checking if nodes are alive...
    INFO: Validating user equivalence...
    INFO: Status of nodes in the cluster:
    Status of node 'rac2':
    Node is okay
    Status of node 'rac3':
    null
    SEVERE: The selected remote nodes 'rac3' are not accessible.
    INFO: User Selected: Yes/OKWhen I try ping to the new node, it is okay.
    So, can you help, please?
    Thank you very much.

    Hello,
    Very good tip. Thank you very much.
    On more question. After addNode.sh, when I peform the /u01/app/11.2.0/grid/root.sh, I got error:
    [root@rac3 ~]# /u01/app/11.2.0/grid/root.sh
    Running Oracle 11g root.sh script...
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/11.2.0/grid
    Enter the full pathname of the local bin directory: [/usr/local/bin]:
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of root.sh script.
    Now product-specific root actions will be performed.
    2011-04-08 14:04:34: Parsing the host name
    2011-04-08 14:04:34: Checking for super user privileges
    2011-04-08 14:04:34: User has super user privileges
    Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    LOCAL ADD MODE
    Creating OCR keys for user 'root', privgrp 'root'..
    Operation successful.
    Adding daemon to inittab
    CRS-4123: Oracle High Availability Services has been started.
    ohasd is starting
    FATAL: Module oracleoks not found.
    FATAL: Module oracleadvm not found.
    FATAL: Module oracleacfs not found.
    acfsroot: ACFS-9121: Failed to detect /dev/asm/.asm_ctl_spec.
    acfsroot: ACFS-9310: ADVM/ACFS installation failed.
    acfsroot: ACFS-9311: not all components were detected after the installation.
    CRS-2672: Attempting to start 'ora.gipcd' on 'rac3'
    CRS-2672: Attempting to start 'ora.mdnsd' on 'rac3'
    CRS-2676: Start of 'ora.gipcd' on 'rac3' succeeded
    CRS-2676: Start of 'ora.mdnsd' on 'rac3' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'rac3'
    CRS-2676: Start of 'ora.gpnpd' on 'rac3' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac3'
    CRS-2676: Start of 'ora.cssdmonitor' on 'rac3' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'rac3'
    CRS-2672: Attempting to start 'ora.diskmon' on 'rac3'
    CRS-2676: Start of 'ora.diskmon' on 'rac3' succeeded
    CRS-2676: Start of 'ora.cssd' on 'rac3' succeeded
    CRS-2672: Attempting to start 'ora.ctssd' on 'rac3'
    CRS-2676: Start of 'ora.ctssd' on 'rac3' succeeded
    DiskGroup DATA creation failed with the following message:
    ORA-15018: diskgroup cannot be created
    ORA-15031: disk specification 'ORCL:DISK5' matches no disks
    ORA-15031: disk specification 'ORCL:DISK4' matches no disks
    ORA-15031: disk specification 'ORCL:DISK3' matches no disks
    ORA-15031: disk specification 'ORCL:DISK2' matches no disks
    ORA-15031: disk specification 'ORCL:DISK1' matches no disks
    Configuration of ASM failed, see logs for details
    Did not succssfully configure and start ASM
    CRS-2500: Cannot stop resource 'ora.crsd' as it is not running
    CRS-4000: Command Stop failed, or completed with errors.
    Command return code of 1 (256) from command: /u01/app/11.2.0/grid/bin/crsctl stop resource ora.crsd -init
    Stop of resource "ora.crsd -init" failed
    Failed to stop CRSD
    CRS-2673: Attempting to stop 'ora.asm' on 'rac3'
    CRS-2677: Stop of 'ora.asm' on 'rac3' succeeded
    CRS-2673: Attempting to stop 'ora.ctssd' on 'rac3'
    CRS-2677: Stop of 'ora.ctssd' on 'rac3' succeeded
    CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac3'
    CRS-2677: Stop of 'ora.cssdmonitor' on 'rac3' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'rac3'
    CRS-2677: Stop of 'ora.cssd' on 'rac3' succeeded
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac3'Can you help about these problems?
    thank you.

  • After del/add Node, there are Agent issues

    Dear Expert
    i have GC12c to monitor Exadata Machine
    i face problem with Grid_home in Node_1
    then we follow proceduer for del/add node from RAC
    now agent in node_1
    Agent Version : 12.1.0.1.0
    OMS Version : (unknown)
    Protocol Version : 12.1.0.1.0
    Agent Home : /u01/GC_home_last/agent_inst
    Agent Binaries : /u01/GC_home_last/core/12.1.0.1.0
    Agent Process ID : xxxxx
    Parent Process ID : xxxxx
    Agent URL : https://xxxxxxxxx
    Repository URL : https://xxxxxx
    Started at : 2012-02-04 23:36:24
    Started by user : oracle
    Last Reload : 2012-02-05 09:13:03
    Last successful upload : (none)
    Last attempted upload : (none)
    Total Megabytes of XML files uploaded so far : 0
    Number of XML files pending upload : 853
    Size of XML files pending upload(MB) : 18.61
    Available disk space on upload filesystem : 68.29%
    Collection Status : Collections enabled
    Last attempted heartbeat to OMS : 2012-02-05 09:14:04
    Last successful heartbeat to OMS : (none)
    How can i establish connection between agent and OMS
    THanks In advance
    Sami

    we have OEM 12c to monitor Exadata
    every thing were good
    we faced problem
    Then we deleted node and add it again to our cluster enviroment.(crs_home deleted)
    The agent which was deployed early on the node that was deleted now is unavailbel/unreachable
    i got below msg from GCEM
    Plugin mismatches between agent and repository. Check plugin:[ The plug-in is oracle.sysman.empa Version in pla inventory : null Version on agent : 12.1.0.1.0 Content type : DISCOVERY Error code : INCOMPATIBILITY_WITH_OMS Error Msg : This plug-in is incompatible with the current version of plug-in deployed on the OMS, The plug-in is oracle.sysman.emfa Version in pla inventory : null Version on agent : 12.1.0.1.0 Content type : DISCOVERY Error code : INCOMPATIBILITY_WITH_OMS Error Msg : This plug-in is incompatible with the current version of plug-in deployed on the OMS]
    from agent Home:
    Agent Version : 12.1.0.1.0
    OMS Version : (unknown)
    Protocol Version : 12.1.0.1.0
    Agent Home : /u01/GC_home_last/agent_inst
    Agent Binaries : /u01/GC_home_last/core/12.1.0.1.0
    Agent Process ID : xxxxx
    Parent Process ID : xxxxx
    Agent URL : https://xxxxxxxxx
    Repository URL : https://xxxxxx
    Started at : 2012-02-04 23:36:24
    Started by user : oracle
    Last Reload : 2012-02-05 09:13:03
    Last successful upload : (none)
    Last attempted upload : (none)
    Total Megabytes of XML files uploaded so far : 0
    Number of XML files pending upload : 853
    Size of XML files pending upload(MB) : 18.61
    Available disk space on upload filesystem : 68.29%
    Collection Status : Collections enabled
    Last attempted heartbeat to OMS : 2012-02-05 09:14:04
    Last successful heartbeat to OMS : (none)

  • Customizations are disabled for the node "ProposedJobVO.xml"

    Hi,
    We are trying to add extensions to a fusion Application. When i have created an Application 'Fusion Customizations Application'.
    In the Role 'Oracle Fusion Applications Administratror Customizations', and in Customizable Archive, Some Business Components are Not customizable while some of them are Customizable.
    getting below error in Log file
    Customizations are disabled for the node "ProposedJobVO.xml" because it is not part of the project contentset.
    Does this mean we cannot modify this VO or we need to do anything else to get these components included in Project Content Set?
    Thanks
    Kaja

    "Customizations are disabled for the node xxxx because it is not part of the project contentset". This warning is logged if you try to open a node for customization in customizaion role IN FA environment from Application Resources->connections->customizable archive ,
    as this node is not a part of project. In order to add it to the project you will have to right click on the node and select customize this will add the node to the virtual content set of project.
    Now this node will be available under project and can be customized.

  • How to add node value using org.w3c.dom.Document?

    Hi ,
    I'm using org.w3c.dom.Document to deal with xml files. I could successfully add nodes , and their attributes. However I could not add a value of the node. (e.g. <myNode>I couldn't add this value</myNode>)
    does anyone know how to deal with this?
    I tried subNode.setNodeValue("the value i can't add"); whereas the subNode is an instance of org.w3c.dom.Node... i know this is interface i of course used the concrete class
    org.apache.crimson.tree.ElementNode
    but when I used the subNode.getNodeValue() i simply got null?
    can u plz help me?
    thanks in advance

    Reading the API documentation for the Node interface might help. At least you wouldn't be surprised when the results are exactly what the documentation says they will be.
    What would really help would be forgetting the idea that an Element can have a value. Text nodes have values, though, so create a Text node and make it the child of the Element node.

  • How to read the content in one node of XML in Java? Pls help

    My dear brothers,
    I am a newbie of XML, I have a exercise which is creating a Tree View from XML file. But the trouble is I do not know how to read the content in one node of XML file. I decide to use the algorithm as following:
    1. Create a GUI form which gives the ability for user to choose a XML file (ok)
    2. Load XML and return the file (ok)
    3. Read the file from node to node to create the node in Tree View (?!)
    Please help me, and if you are enough kind, please give me an small example to easy understand. Thanks in advance.
    Hoang Yen Binh

    I hope this one helps you.
         <ABC Type="ProductBased" ProdName="One" Location="India">
              <CEO>Raj</CEO>
              <Finance>Vikram</Finance>
              <HR>Karthik</HR>
              <Technical>Satish</Technical>
         </ABC>
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Attr;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Node;
    import org.w3c.dom.DOMException;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import java.io.File;
    import java.io.IOException;
    public class XmlReading {
         Document doc;
         Element element;
         public static void main(String[] args) throws Exception{
              XmlReading xr = new XmlReading();
              xr.getXmlParser(args);
         public void getXmlParser(String[] args) {
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   if(args.length != 1) {
                        System.err.println("Argument Required");
              try {
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   doc = builder.parse(new File(args[0]));
              }catch(ParserConfigurationException e1) {
              }catch(SAXException e2) {
              }catch(IOException e3) {
              getAttributes();
         public void getAttributes() {
              // Retrive the entire Document from the Dom Tree
              element = doc.getDocumentElement();
    //          System.out.println(element);
              NamedNodeMap attrs = element.getAttributes();
              // Get number of attributes in the element
         int numAttrs = attrs.getLength();
         // Process each attribute
              for (int i=0; i<numAttrs; i++) {
                   Node node = attrs.item(i);
                   // Get attribute name and value
                   String attrName = node.getNodeName();
                   String attrValue = node.getNodeValue();
                   System.out.println(attrName + ": " + attrValue);
              String s1 = element.getTagName();
              System.out.println(s1);
              // To get all the elements in a DOM Tree
              NodeList nl1 = element.getElementsByTagName("*");
              int i2 = nl1.getLength();
              System.out.println(i2);
              for(int i=0; i<i2; i++) {
                   System.out.println(nl1.item(i) + "\n");
    }

  • Pls Help me with steps to add data from xml file to SAP B1 through B1iSN.

    Pls Help me with steps to add data from xml file to SAP B1 through B1iSN. I  am getting stuck in xsl transformation. not able to understand where the mapping code needs to be added.
    Pls explain me the steps for adding data from xml to B1 quotation step by step.
    thanks and regards
    Priya

    Hi,
    Have you checked this: https://sap.na.pgiconnect.com/p45508295/?launcher=false&fcsContent=true&pbMode=normal ?
    Thanks,
    Gordon

  • How to dynamically add Nodes to JTree?

    How to add nodes to a Jtree by getting the information into a specific file
    For example, in JList:
    DefaultListModel workgroups;
    workgroups = new DefaultListModel();
    List<String> workgroupsList = new ArrayList<String>();
    workgroupsList = ParserUtils.getWorkgroupList(ParserUtils.getConfigPath() + "\\.workgroup.properties");
    if (!workgroupsList.isEmpty()){
         for (String workgroup : workgroupsList){
              workgroups.addElement(workgroup.toString().trim());
    workgroupList = new JList(workgroups); //adds the list workgroupsThe output of this will be a JList displaying the list of workgroups per line. The list could be found in a file name "workgroup.properties"
    Question is, is it possible to adapt this same method in JTree. The information per line will serve as one node in the tree. For example, I have 3 workgroups in the list, there will also be 3 nodes to be found in the tree.
    Any suggestions?
    THanks.

    There's a huge JTree example in the Swing tutorial. It's a bit of a beast to use.

  • Add Node to my Tree

    hi all
    i have a self join table with following column as select statement
    SELECT 1, LEVEL, a.product, ''exit'',a.techno
    FROM bom_products a
    CONNECT BY PRIOR a.techno = a.set_techno
    START WITH a.set_techno IS NULL
    that techno is pk
    and set_techno is fk
    and use
    following code for view my tree:
    DECLARE
         htree ITEM;
         b NUMBER;
    a RECORDGROUP;
    BEGIN
         go_block('BLK_CHART');
    htree := FIND_ITEM('BLK_CHART.T');
    a := FIND_GROUP('a');
    IF NOT ID_NULL(a) THEN
    DELETE_GROUP(a);
    END IF;
    a := CREATE_GROUP_FROM_QUERY('a',
    'SELECT 1, LEVEL, a.product, ''exit'',a.techno
    FROM bom_products a
    CONNECT BY PRIOR a.techno = a.set_techno
    START WITH a.set_techno IS NULL and a.techno='''||:BLK.TECHNO||''''
    b := POPULATE_GROUP(a);
    FTREE.SET_TREE_PROPERTY(htree, FTREE.RECORD_GROUP, a);
    END;
    and no problem,
    my issue is :
    add child to my tree and record to my table
    can any one help me to add node???????????????????

    WRITE THE FOLLOWING SCRIPT IN THE WHEN-BUTTON-PRESSED
    INSERT INTO TABLE VALUES (NEW_DISPLAY_LABEL,NEW_VALUE);
    COMMIT;
    P_PARENT_NODE_VALUE:= ftree.get_tree_node_property('tree4',:system.trigger_node,ftree.node_value);
    P_PARENT_NODE := Ftree.Find_Tree_Node('tree4',P_PARENT_NODE_VALUE,Ftree.FIND_NEXT, Ftree.NODE_value, Ftree.ROOT_NODE, Ftree.ROOT_NODE);
    P_NEW_NODE := ftree.add_tree_node('tree4',P_PARENT_NODE,ftree.parent_offset,ftree.last_child,ftree.expanded_node,NEW_DISPLAY_LABEL,null,NEW_VALUE);
    Message was edited by:
    zakaoullah

  • Add node to a specific node in JTree

    I use the following TreePanel class to add node to the tree. My question is how to add a new node under
    a specific node which has been created before. In other words, how to get the path and identify the node.
    For e.g., I first loaded some raw data files and created the "raw data" node, later I need to load another file
    and create a new node under the "raw data" node. Each node is created by using user object. Any help is greatly appreicated.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    public class TreePanel extends JPanel {
      protected DefaultMutableTreeNode rootNode;
      protected DefaultTreeModel treeModel;
      protected JTree tree;
      public TreePanel() {
        super(new GridLayout(1,0));
        rootNode = new DefaultMutableTreeNode("Experiment");
        treeModel = new DefaultTreeModel(rootNode);
        tree = new JTree(treeModel);
        tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.setShowsRootHandles(true);
        JScrollPane scrollPane = new JScrollPane(tree);
        add(scrollPane);
      public JTree getTree(){
        return tree;
      /* Add child to the currently selected node. */
      public DefaultMutableTreeNode addObject(Object child){
        DefaultMutableTreeNode parentNode = null;
        TreePath parentPath = tree.getSelectionPath();
        if(parentPath == null){
          parentNode = rootNode;
        else{
          parentNode = (DefaultMutableTreeNode)(parentPath.getLastPathComponent());
        return addObject(parentNode, child, true);
      /* Add child */
      public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child){
        return addObject(parent, child, false);
      /* Add child */
      public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, Object child, boolean shouldBeVisible){
        DefaultMutableTreeNode childNode = new DefaultMutableTreeNode(child);
        if(parent == null){parent = rootNode;}
        treeModel.insertNodeInto(childNode, parent, parent.getChildCount());
        if(shouldBeVisible){
          tree.scrollPathToVisible(new TreePath(childNode.getPath()));
        return childNode;
      /* Add child */
      public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent, DefaultMutableTreeNode child){
       if(parent == null){parent = rootNode;}
       treeModel.insertNodeInto(child, parent, parent.getChildCount());
       return child;
    }Thanks in advance!

    public static DefaultMutableTreeNode findNode(DefaultMutableTreeNode from, Object userObject) {
              if (userObject == null && from.getUserObject() == null) {
                   return from;
              } else if (userObject.equals(from.getUserObject())) {
                   return from;
              DefaultMutableTreeNode node = null;
              for (int i = 0; i < from.getChildCount(); i ++) {
                   node = (DefaultMutableTreeNode) from.getChildAt(i);
                   if (userObject == null) {
                        if (userObject == node.getUserObject()) {
                             break;
                   } else {
                        if (userObject.equals(node.getUserObject())) {
                             break;
                   node = null;
              if (node != null) {
                   return node;
              //Node not found
              //dig deeper
              for (int i = 0; i < from.getChildCount(); i ++) {
                   node = (DefaultMutableTreeNode) from.getChildAt(i);
                   if (!node.isLeaf()) {
                        node = findNode(node, userObject);
                        if (node != null) {
                             return node;
              //Not found
              return null;
         }     

  • [svn:bz-trunk] 20693: Add a web.xml. crx that has no MessageBroker and RDSServlet.

    Revision: 20693
    Revision: 20693
    Author:   [email protected]
    Date:     2011-03-08 13:09:18 -0800 (Tue, 08 Mar 2011)
    Log Message:
    Add a web.xml.crx that has no MessageBroker and RDSServlet.  Remove reference of webtier in HttpServiceTest.java.  Not sure which tests are using this class and hopefully we can get rid of it since webtier.jar is about to be gone.  Watch out for any new failtures that might be related.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/WEB-INF/src/dev/httpservice/HttpServiceTest.java
        blazeds/trunk/qa/apps/qa-regress/build.xml
    Added Paths:
        blazeds/trunk/qa/resources/webtier/qa/web.xml.crx

    I am modifying the correct httpd.conf file on the server, it just doesn't seem to work. - If I put the rewrite rules in the <Directory /> the rewrite works but it adds /Library/WebServer/Documents to the URL.
    I also tried putting the rewrite rules in <IfModule mod_rewrite.c> but that did not work either.
    mod_rewrite is enabled and running on the server.
    I will post the rewrite rules again in the code brackets. Sorry for the long post. - If some one can try them out on their Leopard Server to see if they can get them to work, it would be much appreciated. Again, these work on my Leopard Client but I can't get them to work on Server.
    -- The httpd.conf file posted above is just the default conf file found in /private/etc/apache2/
    <code>
    RewriteEngine On
    Options +FollowSymLinks
    RewriteRule ^(.+)/$ http://%{HTTP_HOST}$1 [R=301, L]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.php(.*)\ HTTP
    RewriteRule (.+)\.php(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.asp(.*)\ HTTP
    RewriteRule (.+)\.asp(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.aspx(.*)\ HTTP
    RewriteRule (.+)\.aspx(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.htm.(.)\ HTTP
    RewriteRule (.+)\.htm.(.)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.cfm(.*)\ HTTP
    RewriteRule (.+)\.cfm(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.bak(.*)\ HTTP
    RewriteRule (.+)\.bak(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\.inc(.*)\ HTTP
    RewriteRule (.+)\.inc(.*)$ $1$2 [R, L]]
    RewriteCond %{THE_REQUEST} ^GET\ ([^\?]+)\..(.)\ HTTP
    RewriteRule (.+)\..(.)$ $1$2 [R, L]]
    <code>

  • Failed to add node to cluster

    Hey, I am currently migrating my cluster.
    I removed the server pool master according to the metalink note by doing a failover (stopped the agent on the server pool master)
    Deleted the old master (node2) from the server pool.
    Executed the cleanup script on node2 and switched it off
    Modified the cluster.conf on the remaining node and remove the entries for the old master node2.
    Replaced the old server with new hardware -
    same name - same ip.
    Now I try to add this server to the server pool, but I get a timeout message
    OVM-1006 Register Oracle VM Server (node2) Failed: errcode=00001, errmsg=CDS accquire lock /etc/ovs-agent/db/srv.lock timeout. locker process is 8339
    Where can I look ?
    Christian

    Lemeunier wrote:
    > environment: sles 10 sp3, oes2, cluster services
    >
    > problem: reconfiguring oes to add a node to the cluster is causing the
    > error *failed to add node to cluster*
    >
    > history: I installed a 4 node cluster in a HP C7000 blade. We had to
    > replace the network switch in the blade center by a virtual connect
    > flex-10. This resulted in a loss of network connectivity, so I removed 3
    > of 4 nodes from cluster and eDirectory.
    > This worked fine, replication and time synchronisation was succesfully
    > and all server objects belonging to these 3 servers were deleted.
    >
    > Now the new switch has been configured and network connection
    > reestablished. Reconfiguring eDirectory and other oes2 services
    > succeeds, alle server objects are recreated, eDirectory is in sync, but
    > reconfiguring cluster services does not succeed.
    >
    > What do I have to do, to reconfigure cluster service and add nodes to
    > the cluster?
    >
    > Thank you for all hints.
    >
    > Ursula
    >
    >
    Did you remove the cluster rpms and then reinstall the rpms. I would
    recommend following TID 3131978 and see if that helps.

Maybe you are looking for

  • PM Order, cost and key figures

    I have created and configured a new PM planning plant, cost center, work center, pm types and all that usual of PM requirement, but still I think something is missing in in the ingredient because when I try to creat a PM order and assign a bunch of o

  • Unable to open CR2 file in elements 11

    Everytime I try to open a CR2 file i get an error saying "could not complete your request because the file appears to be from a camera model which is not supported by the installed version of Camera Raw.  Please visit the Camera Raw help documentatio

  • Insert/Delete a page in LiveCycle Designer disabled

    I am working with an 8 page form and am trying to delete the last page on the file, however when I try the 'Delete Page' option is disabled or 'greyed out'. I am using Adobe LiveCycle Designer 8.05.2... and created the form in LiveCycle. It also won'

  • Where is user/library/mail folder in mountain lion?

    Hello, I bought a new macbook pro and now I want to transfer some mail messages received and stored on another computer. I wanted to put them in the Library/Main folder within my user folder, but if I open the User folder, there is no Library folder

  • Win7 and the Urge to Splurge

    I feel a bit like I'm walking into an AA meeting... asking all you fine folks to help me NOT open that bottle of 50YrOld Single Malt Scotch that's sitting on my desk My plan has been to read and ask questions (which I've been doing) and buy component