Adding a node at an xpath

Hello,
I need to build a DOM Document by adding nodes to it at certain xpaths. For example, I need to add the value "bla" in /myRoor/e1/cfgr/tete/myNode.
What is the best way to do that?
Thanks,
Zohar.

Break the problem into parts:
1. Use XPath to get a reference to that node.
2. Figure out what it means to "add a value" to a node. (If the node is an Element, perhaps you really meant you wanted to add a Text node as a child of that Element, for example.)
3. Do that.
If you have problems with any of these parts, post again. Preferably with example code which you tried and couldn't get to work.

Similar Messages

  • Adding new node to the Clusterware fails with the root.sh script.

    Dear All,
    I had successfully added third node to the existing 2 node cluster. After adding new node I need to run the root.sh scripts, but it was faling with the below error.
    Please help me with the below issue:
    Instantiating scripts for add node (Monday, April 8, 2013 3:23:14 PM EDT)
    . 1% Done.
    Instantiation of add node scripts complete
    Copying to remote nodes (Monday, April 8, 2013 3:23:16 PM EDT)
    ............................................................................................... 96% Done.
    Home copied to new nodes
    Saving inventory on nodes (Monday, April 8, 2013 3:31:40 PM EDT)
    . 100% Done.
    Save inventory complete
    WARNING:
    The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes.
    /u01/app/11.2.0/grid/root.sh #On nodes svphxwgdbprd06
    To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts in each cluster node
    The Cluster Node Addition of /u01/app/11.2.0/grid was successful.
    Root.SH Script Log:
    [root@svphxwgdbprd06 ~]# /u01/app/11.2.0/grid/root.sh
    Performing root user operation for Oracle 11g
    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]:
    The contents of "dbhome" have not changed. No need to overwrite.
    The contents of "oraenv" have not changed. No need to overwrite.
    The contents of "coraenv" have not changed. No need to overwrite.
    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 script.
    Now product-specific root actions will be performed.
    Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
    Creating trace directory
    User ignored Prerequisites during installation
    OLR initialization - successful
    Adding Clusterware entries to inittab
    CRS-2672: Attempting to start 'ora.mdnsd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.mdnsd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.gpnpd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.gpnpd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.cssdmonitor' on 'svphxwgdbprd06'
    CRS-2672: Attempting to start 'ora.gipcd' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.cssdmonitor' on 'svphxwgdbprd06' succeeded
    CRS-2676: Start of 'ora.gipcd' on 'svphxwgdbprd06' succeeded
    CRS-2672: Attempting to start 'ora.cssd' on 'svphxwgdbprd06'
    CRS-2672: Attempting to start 'ora.diskmon' on 'svphxwgdbprd06'
    CRS-2676: Start of 'ora.diskmon' on 'svphxwgdbprd06' succeeded
    CRS-2676: Start of 'ora.cssd' on 'svphxwgdbprd06' succeeded
    ASM created and started successfully.
    Disk Group DATA created successfully.
    clscfg: -install mode specified
    clscfg: EXISTING configuration version 5 detected.
    clscfg: version 5 is 11g Release 2.
    Successfully accumulated necessary OCR keys.
    clscfg: Arguments check out successfully.
    NO KEYS WERE WRITTEN. Supply -force parameter to override.
    -force is destructive and will destroy any previous cluster
    configuration.
    Failed to initialize Oracle Cluster Registry for cluster, rc 105
    Oracle Grid Infrastructure Repository configuration failed at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 6818.

    The document references posted already are very good ones. However, I would say that on personal experience (on Solaris and 10gR2) that the addnode tools gave me nothing but problems. Luckily, I was able to build a parallel cluster (with three nodes) on other hardware and then move the databases across via DataGuard. It was quicker and cleaner (and easier!) that way...
    Good luck!

  • Adding new Node in 10gR2(10.2.0.4) in AIX

    Hi Experts,
    i need your guidence actually we are planning to add new node in our exsisting two node RAC. i need a dacument or refrence links that can guide me in adding new node.
    your help will be very helpfull for me.thanx in advance
    regards,

    Hi,
    you can drive some tests using following docs:
    http://www.smaliz.com/notes/10g-AddNode-RAC-ASM-AIX.pdf
    http://blogs.oracle.com/AlejandroVargas/gems/RAC10gR2AddNode.pdf
    Or refer to the RAC admin books that you can find on http://tahiti.oracle.com/
    HTH,
    Thierry

  • Adding JTree nodes from worker threads

    I'm trying to add a large number of nodes (> 1700) to a JTree, and I'm looking for a way to do this while allowing the user to continue working in the meantime.
    The nodes are retrieved from a database, which may be geographically distant and therefore possibly slow to access. I would like to have the process of processing the result-set and creating the Nodes run separately.
    I have considered processing the result-set in a separate Thread and creating the Nodes before then returning to the EDT to add them to the tree. This would cause the GUI to pause when adding the Nodes to the tree, but does at least separate the DB access out of the EDT.
    I would prefer to update the tree node by node as the result-set is processed, but I'm not sure whether this would incur too much overhead.
    I would appreciate any advice.

    I'm not sure overhead is the problemimport java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.Random;
    public class Test extends JFrame implements Runnable {
      JTree jt = new JTree();
      DefaultTreeModel dtm = (DefaultTreeModel)jt.getModel();
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        new Thread(this).start();
        setSize(500, 500);
        setVisible(true);
      public void run() {
        Random r = new Random();
        DefaultMutableTreeNode root = (DefaultMutableTreeNode)dtm.getRoot();
        for (int i=0; i<1700; i++) {
          DefaultMutableTreeNode item = (DefaultMutableTreeNode)root.getChildAt(r.nextInt(root.getChildCount()));
          while (r.nextInt(5)>0 && item.getChildCount()>0) {
            item = (DefaultMutableTreeNode)item.getChildAt(r.nextInt(item.getChildCount()));
          item.add(new DefaultMutableTreeNode("Node-"+i));
          dtm.nodeStructureChanged(item);
          try { Thread.sleep(500); } catch (Exception e) {}
      public static void main(String[] args) { new Test(); }
    }

  • Error adding new node to treetable automatically

    We implemented a page with a treetable. We don't use a ViewObject/Query to build the tree but a pojo method, because we have a complex data model to display on the tree (dynamic tree level, multiple object types on one tree level, etc.). So we created a pojo method to build the tree -> created a data control for this method/class and dragged the method onto the tree component.
    In a second step we impemented several buttons on the page to delete nodes, set values, change style, etc. which works fine.
    We got stuck extending the page for a function to add a new node. When the tree is displayed for the first time we can add new nodes on every existing node. Adding a node to a new node only works if we decollapse the new node first. We get an error if we create a new node A and then try to add another node on the new node A without decollapsing node A in advance.
    As follows the code and the error stack. Any ideas?
        public void btnAddNode(ActionEvent actionEvent) {
            RichTreeTable tree = (RichTreeTable) this.getTt1();
            RowIterator ri = this.getSelectedNodeRowIterator(tree);
            Key selectedNodeKey = this.getSelectedNodeRowKey(tree);
            if (ri != null && selectedNodeKey != null) {
               Row last = ri.last();
               Key lastRowKey = last.getKey();
               // if the select row is not the last row in the row iterator...
               Row[] found = ri.findByKey(selectedNodeKey, 1);
               if (found != null && found.length == 1) {
                 Row foundRow = found[0];
                 this.insertRow(foundRow, "Modified", "31.06.2013");
             AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
             adfFacesContext.addPartialTarget(tree);        
        private Row insertRow(Row targetRow, String label, String value) {
            RowSet children = (RowSet) targetRow.getAttribute("children");
            Row newRow = children.createRow();
            newRow.setAttribute("nodeLabel", label);
            newRow.setAttribute("nodeValue", value);
            children.insertRow(newRow);
            return newRow;
    <AdfcExceptionHandler> <handleException> ADFc: Bei der Verarbeitung einer Exception hat der Exception Handler der Anwendung eine neue Exception ausgelöst.
    javax.faces.el.EvaluationException: java.lang.NullPointerException
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at oracle.adf.model.bean.DCDataVO.initFKs(DCDataVO.java:625)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:596)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:2058)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2544)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2589)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2566)
    at com.euroscript.tc.view.backing.TreeTable.insertRow(TreeTable.java:369)
    at com.euroscript.tc.view.backing.TreeTable.btnAddNode(TreeTable.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    ... 44 more
    <AdfcExceptionHandler> <handleException> ADFc: Beim Versuch der Verarbeitung dieser Exception war der Exception Handler der Anwendung nicht erfolgreich.
    javax.faces.el.EvaluationException: java.lang.NullPointerException
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at oracle.adf.model.bean.DCDataVO.initFKs(DCDataVO.java:625)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:596)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:2058)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2544)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2589)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2566)
    at com.euroscript.tc.view.backing.TreeTable.insertRow(TreeTable.java:369)
    at com.euroscript.tc.view.backing.TreeTable.btnAddNode(TreeTable.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    ... 44 more
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces-Gültigkeitsdauer empfängt nicht behandelte Exceptions in Phase INVOKE_APPLICATION 5
    javax.faces.el.EvaluationException: java.lang.NullPointerException
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at oracle.adf.model.bean.DCDataVO.initFKs(DCDataVO.java:625)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:596)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:2058)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2544)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2589)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2566)
    at com.euroscript.tc.view.backing.TreeTable.insertRow(TreeTable.java:369)
    at com.euroscript.tc.view.backing.TreeTable.btnAddNode(TreeTable.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    ... 44 more
    <XmlErrorHandler> <handleError> ADF_FACES-60096:Server-Exception während PPR, #1
    javax.servlet.ServletException
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:128)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.lang.NullPointerException
    at oracle.adf.model.bean.DCDataVO.initFKs(DCDataVO.java:625)
    at oracle.adf.model.bean.DCDataVO.createInstance(DCDataVO.java:596)
    at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:2058)
    at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2544)
    at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2589)
    at oracle.jbo.server.ViewRowSetImpl.createRow(ViewRowSetImpl.java:2566)
    at com.euroscript.tc.view.backing.TreeTable.insertRow(TreeTable.java:369)
    at com.euroscript.tc.view.backing.TreeTable.btnAddNode(TreeTable.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1415)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:957)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:427)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    ... 36 more

    You can have machines different in hardware... but they have to use the same software.

  • EP7.0 - Adding server nodes (processes) and managing all the logs

    First, can anyone confirm whether the Template Configuration Tool is used with Portal 7.0 (NW2004s)?  All of the documentation I find is for Portal 6.0.  If you use the Template Configuration Tool, it will match the resources available on your server to the type of J2EE you will be running which is the route I prefer to take.  Otherwise, I'll add the nodes manually with configtool.
    Second, is it a best practice to just stick to one server node (server0) on your DEV system?  I would think that would make analyzing all of those fun logs much easier.
    Third, are there any best practices for managing all of those logs if you start adding additional nodes.  I have server0 on the QA system with 2048MB of Heap.  I plan to add server1, server2 and server3 ... all with 2048MB of Heap.  But then the number of logs is 4 times for everything.  The Portal Tuning guide suggests turning off unnecessary logging which I will do but our developers want a convenient way to do research and we don't want them overwhelmed with logs. 
    We are setting up Solution Manager Diagnostics now so I haven't seen it's functionality.  Will it make log anaysis more streamlined and easier to find relevant data even if you have 4 server nodes?

    Hi Richard,
    A1: NO!!! do not use the Template Configuration Tool on NW7.0 as it sets properties that are not valid or optimal anymore.
    A2: I don't know if there is a best practice about it but I do know that it is best practice to have atleast 2 servernodes per instance because this helps you top optimize your resources when 1 servernode is in Full Garbage Collection the other still can use the CPU to process (Presented on SAP Insider Infra & Admin in Orlando 2008).
    A3: Regarding the logging This is just how it is made... every servernode logs for itsself...
    Use NetWeaver Administrator (/nwa) to auto consoldate the loggin info. It's slow but eventualy it does the job. You can give developers an NWA read-only role (shipped by default) to look at the logs.
    A4: SMD makes central monitoring and diagnostic possible for your complete landscape.
    You can configure a central NWA on the SMD host. The solution as proposed by A3 is already helping you to manage your issue (consolidating logs of multiple servernodes.. >2 )
    Good Luck!
    Benjamin Houttuin

  • Runtime error when am adding a node to oop alv

    i am adding a node to alv tree using oop am passing a work area and when i execute it is going for a dump and it says UC_OBJECTS_NOT_CONVERTIBLE
    and the below where it is bold and italic it is where the dump is occuring
    METHOD ADD_NODE.
      FIELD-SYMBOLS: <TAB1> TYPE standard TABLE,
                     <wa> type any.
      assign mt_outtab->* to <tab1>.
    insert line in outtab
      DATA: L_INDEX TYPE SY-TABIX.
      if is_outtab_line is initial.
      create initial line
        data l_dref_wa type ref to data.
        create data l_dref_wa like line of <tab1>.
        assign l_dref_wa->* to <wa>.
        l_index = 0.
        append <wa> to <Tab1>.
      else.
      <i><b>  APPEND IS_OUTTAB_LINE TO <TAB1>.</b></i>  endif.
      L_INDEX = SY-TABIX.
    add node to model
      CALL METHOD ME->ADD_MODEL_NODE
                  EXPORTING
                     I_RELAT_NODE_KEY  = I_RELAT_NODE_KEY
                     I_RELATIONSHIP    = I_RELATIONSHIP
                     IS_NODE_LAYOUT    = IS_NODE_LAYOUT
                     IT_ITEM_LAYOUT    = IT_ITEM_LAYOUT
                     I_NODE_TEXT       = I_NODE_TEXT
                     I_INDEX_OUTTAB    = L_INDEX
                  IMPORTING
                     E_NEW_NODE_KEY    = E_NEW_NODE_KEY.
    ENDMETHOD.

    Hi Mohsin,
    Check the program : BCALV_TREE_MOVE_NODE_TEST
    Regards,
    Basha
    Rewards points if it helps you.

  • Need to Set Node Attribute using XPath

    Hi,
    I have an XMLType coloum, I Need to Set/Update/Remove Root Node Attribute using XPath query.
    Regards,
    Rajesh

    Here you go:
           Node nameNode =
                    (Node) XPathFactory.newInstance().newXPath().evaluate(
                            "/root/name", doc, XPathConstants.NODE);
            nameNode.setTextContent("bob");

  • Problem with adding a Node in a Scene from a Node initialization

    Hi all! I am trying to create a custom Button, then I create a class that extends Rectangle, then this class add a Text on the button... but the Text is never shown!
    import javafx.scene.Cursor;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.LinearGradient;
    import javafx.scene.paint.Stop;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.scene.input.MouseEvent;
    public class Button extends Rectangle {
        public var text: String;
        postinit {
            cursor = Cursor.HAND;
            width = 90;
            height = 25;
            arcWidth = 15;
            arcHeight = 15;
            effect = DropShadow {radius: 6};
            fill = LinearGradient {
                startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                stops: [
                    Stop {offset: 0.0, color: Color.WHITE}
                    Stop {offset: 1.0, color: Color.LIGHTGRAY}
            insert Text {
                x: this.x + 5, y: this.y + 5
                content: text
                font: Font {size: 13}
            } into scene.content;
            onMouseEntered = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.2, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
            onMouseExited = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
            onMousePressed = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.LIGHTGRAY}
                        Stop {offset: 1.0, color: Color.WHITE}
            onMouseReleased = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
    }If I print scene.content from this class, there is no nodes in the scene! If I print content from the scene, the output show only the button, but not the Text...
    Can somebody tell me why this doesn't works?

    Based on your code, do you even need to extend or create a CustomNode? I believe you can accomplish your desired result by adding a stylesheet to your scene and then specify a styleClass for a basic button.
    Here are a few snippets:
    The scene:
    scene: Scene {
                    stylesheets: uiCSS
                    content: [ //your button ]               ]
                }The button:
    Button{ styleClass: "myButton"}The css:
    .myButton:hover{
       -fx-text-fill: linear (0%,0%) to (0%,100%)
            stops (0%, rgb(220, 220, 220)) (25%, rgb(190, 190, 190))(50%, rgb(190, 190, 190))(100%, rgb(220, 220, 220));
    .myButton:pressed{
      -fx-text-fill: linear (0%,0%) to (0%,100%)
            stops (0%, rgb(100, 100, 100)) (25%, rgb(100, 100, 100))(50%, rgb(100, 100, 100))(100%, rgb(100,100, 100));
    }You can modify the look and feel of any JavaFX control in this manner. An important resource to access is the caspian.css which can be found in the JDK library in the javafx-ui-controls.jar under the com.sun.javafx.scene.control.skin.caspian. You can essentially copy and paste any of the controls css into your css file and modify as desired. This allows you to skin your components without having to change any of the behavior which becomes a big hassle.
    Hope this helps.

  • Severe Error while adding a node to clusterware

    Hi all,
    I've successfully implemented RAC 11gR2 on two nodes, node1 and node2( Windows Server 2008 Enterprise R2). Now I'm trying to add a third node to it. But when I tried to implement it using the below steps:
    1. Installed the same OS as of the existing RAC (Windows Server Enterprise 2008 R2).
    2. Successfully executed cluvfy stage -post hwos -n node1,node2,node3
    3. Successfully executed cluvfy stage -pre nodeadd -n node3
    3. When I tried to execute "CLUSTER_NEW_NODES={node3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node3-vip}", I got the following error message:
    "Number of new nodes being added are not equal to the number of new virtual nodes"
    Please help me solve this issue.
    Regards
    ORA_QUEST
    Edited by: ORA_QUEST on Aug 4, 2011 12:31 PM
    Edited by: ORA_QUEST on Aug 4, 2011 1:56 PM

    The following link has the similar error that you are facing and its solution,
    http://martincarstenbach.wordpress.com/2009/10/12/build-your-own-rac-system-part-iv-extending-grid-infrastructure/
    For better response, post in RAC thread,
    Real Application Clusters

  • XMLSearch / case in-sensitive search in a text node value with XPATH

    Hi everyone,
    I was aggregating some XML files and queries for a search
    engine. It is pretty easy with coldfusion XML functions BUT ....
    I was looking around XMLSearch to do a simple text search
    into nodes and I am stuck with it.
    with something like that :
    selectedElements = XmlSearch(myxmldoc,
    '(/directory/user[contains(.,"#form.firstName#")])');
    Without loop all the XML elements, I cannot put firstName
    text nodes to lower-case, do a simple search into the directory and
    get user entries.
    Is it possible to do with XPATH something like that :
    selectedElements = XmlSearch(myxmldoc,
    '(/directory/user[contains(lower-case(.),lower-case("#form.firstName#"))])');
    Thanks for your help.

    When Do you think coldfusion will implement Xpath functions
    as
    http://www.w3schools.com/xpath/xpath_functions.asp
    ????

  • Extract Node Values using XPATH

    This may be a repeat question.
    No offence meant
    I am using XPATH to extract values from the nodes.
    I need to extract the value of i:RequestedBy Node using XPATH
    <?xml version="1.0" encoding="UTF-8"?>
    <i:Interest>
    <i:Status>0</i:Status>
    <i:Generation>2</i:Generation>
    <i:Details xsi:type="i:vanilla.details.stock">
       <i:RequestedBy>AA.MM</i:RequestedBy>
    The above XML is of type Document
    Document msgDoc;
    XPath xpath = XPathFactory.newInstance().newXPath();
    XPathExpression expr;
    Object result=null;
         try {
                  expr = xpath.compile("i:Interest/i:Details/i:RequestedBy/text()");
                  result = expr.evaluate(msgDoc, XPathConstants.NODESET);
               NodeList nodes = (NodeList) result;
                for (int i = 0; i < nodes.getLength(); i++) {
                 System.out.println(nodes.item(i).getNodeValue());
         } catch (XPathExpressionException e1) {
         e1.printStackTrace();
                             I am getting null/
    Is my XPATH correct?

    I don't know if your XPath is correct or not. Your XML is not well-formed because the namespace declarations are missing. And I don't see where you set the namespace context for your XPath object; that is quite likely why it doesn't do what you want.

  • Inconsistent results for adding child node in a JTree

    I have a JTree where I add child nodes when a user clicks on the node or handle. When the user clicks on the node, through implementing TreeSelectionListener interface, I add a node, the tree expands, and I see the newly added node. However, when the user clicks on the handle, through implementing the TreeExpansionListener, the tree does not expand and I do not see the newly added node. The problem is repeatable by compiling the code below.
    Why is there this difference? Aren't all the methods implemented through the TreeSelectionListener and TreeExpansionListener in the SWT thread?
    public class TestFrame extends JFrame implements TreeSelectionListener, TreeExpansionListener {
         public TestFrame() {
              String[] alphabets = {
                        "a", "b", "c", "d", "e", "f", "g",
                        "h", "i", "j", "k", "l", "m", "n",
                        "o", "p", "q", "r", "s", "t", "u",
                        "v", "w", "x", "y", "z"
              DefaultMutableTreeNode top = new DefaultMutableTreeNode("CEDICT");
              for(int i=0; i < alphabets.length; i++) {
                   DefaultMutableTreeNode node =
                        new DefaultMutableTreeNode(alphabets) {
                        public boolean isLeaf() { return false; }
                   top.add(node);
              JTree tree = new JTree(top);
              tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
              tree.addTreeSelectionListener(this);
              tree.addTreeExpansionListener(this);
              tree.setShowsRootHandles(true);
              JScrollPane treePane = new JScrollPane(tree);
              treePane.setHorizontalScrollBarPolicy(
                        JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
              treePane.setVerticalScrollBarPolicy(
                        JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
              treePane.setSize(new Dimension(200,400));
              treePane.setPreferredSize(new Dimension(200,400));
              getContentPane().setLayout(new BorderLayout());
              getContentPane().add(treePane, BorderLayout.CENTER);
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              int inset = 50;
    setBounds(inset, inset,
    screenSize.width - inset*2,
    screenSize.height - inset*2);
              setLocationRelativeTo(null);
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              pack();
              show();
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        JFrame.setDefaultLookAndFeelDecorated(true);
                        TestFrame frame = new TestFrame();
         public void valueChanged(TreeSelectionEvent e) {
              JTree tree = (JTree)e.getSource();
              DefaultMutableTreeNode node =
                   (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
              System.out.println(node);
              Date date = new Date();
              node.add(new DefaultMutableTreeNode(date.toString()));
         public void treeCollapsed(TreeExpansionEvent event) {
              JTree tree = (JTree)event.getSource();
              TreePath path = event.getPath();
              DefaultMutableTreeNode node =
                   (DefaultMutableTreeNode) path.getLastPathComponent();
              System.out.println(node);
              Date date = new Date();
              node.add(new DefaultMutableTreeNode(date.toString()));
              tree.invalidate(); //does not help to show newly added child
         public void treeExpanded(TreeExpansionEvent event) {
              JTree tree = (JTree)event.getSource();
              TreePath path = event.getPath();
              DefaultMutableTreeNode node =
                   (DefaultMutableTreeNode) path.getLastPathComponent();
              System.out.println(node);
              Date date = new Date();
              node.add(new DefaultMutableTreeNode(date.toString()));
              tree.invalidate(); //does not help to show newly added child

    I couldn't figure out why inserting a node in the valueChanged(...) method works. In all three methods no listeners are notified about the change, so you would think all three would fail.
    For a JTree using the DefaultTreeModel the nodesWereInserted(...) method needs to be called. For example, if I change your last three methods to this
    public void valueChanged(TreeSelectionEvent e) {
       insertNode((JTree) e.getSource(),
                  (MutableTreeNode) e.getPath().getLastPathComponent());
    public void treeCollapsed(TreeExpansionEvent event) {
       insertNode((JTree) event.getSource(),
                  (MutableTreeNode) event.getPath().getLastPathComponent());
    public void treeExpanded(final TreeExpansionEvent event) {
       insertNode((JTree) event.getSource(),
                  (MutableTreeNode) event.getPath().getLastPathComponent());
    public void insertNode(JTree tree, MutableTreeNode parent) {
        Date date = new Date();
        MutableTreeNode child = new DefaultMutableTreeNode(date.toString());
        int index = parent.getChildCount();
        parent.insert(child,index);
        ((DefaultTreeModel) tree.getModel())
                .nodesWereInserted(parent,new int[]{index});
    }then it works as you desire. You can (and should) of course use the DefaultTreeModel's own insert method.
    DefaultTreeModel#insertNodeInto(MutableTreeNode,MutableTreeNode, int)

  • Selecting nodes using an XPath expression

    Assuming that I have a DOM Document object containing a valid XML file, what is the quickest way to select a subset of nodes from the document using an XPath expression. I would like the results in either a NodeList object or another Document object.
    Microsoft has a way to do this using a single method named 'selectNodes'. Why is querying an XML document so hard to do using java? Am I missing something?

    In case you're using Xalan take a look at org.apache.xpath.XPathAPI. The function selectNodeList(...) probably does what you want.
    Good luck.

  • Extracting node value from XPath Expression in OSB Conditional Branch

    HI All
    While using conditional branch in OSB,i only get an XPath Expression editor to set a variable used to test a condition.
    Now let's say my request is
    <Body>
    <exam:PersonSearchReq xmlns:exam="http://www.example.org">
    <exam:RequestorSSO>James</exam:RequestorSSO>
    </exam:PersonSearchReq>
    </Body>
    I write my XPath expression as :
    ./exam:PersonSearchReq/exam:RequestorSSO/text()
    Now if I test this using the tester application , insted of getting node value 'James' ,i get the entire node element ,i.e
    <exam:RequestorSSO xmlns:exam="http://www.example.org">James</exam:RequestorSSO>
    Please suggest how can i extract the text value.
    Regards,
    Chinmay

    Hi Guys
    Actually it turns out that you need to populate In-Variable to function is correctly.As soon as i entere 'body' in it,it worked fine.
    Thanks
    Chinmay

Maybe you are looking for

  • Need help.. can someone look at code..

    and tell me what is happening, or rather not happening and why.... This is a neat clock that shows current time and zulu time with a disclaimer popup..... Would like to get it working to put on my site but can not figure it out. It is made up of two

  • SSL/TLS ciphers of an SMA (M-series) appliance

    So SMA does not include sslconfig CLI command. We cannot reonfigure SSL/TLS ciphers as we do for ESA (C-series) appliances. Once I got instructions from TAC support telling, that I must download config file from SMA, edit those cipher parameters manu

  • Sorting a table which is used as a reference

    Hi, I am not 100% sure that i have all the terminology correct here so please excuse me if i am calling "things" by there wrong name. I have a table which has a list of racing car numbers which are not in any particular order. !http://img571.imagesha

  • Java's Runtime.exec() method

    When you shell out to java's Runtime.exec() method, are the process name and arguments the same for the child process that is spawned. We see duplicated processes about the time when our logs tell us this command was run. However, we cannot seem to r

  • MBP in clamshell with iMac G5?

    Hi all, Just acquired a MBP (late 2011) 15" and was wondering whether I could use it in "clamshell" mode, with my iMac G5 with iSight as an external monitor? If it's possible, what's involved and what cable(s) will be needed? Thanks in advance for yo