Adding nodes to specific positions of JTree

Hi guys, I have a JTree that basically represents a file explorer with all the folders and files in a drive. I want to automatically refresh the tree if there are any new files added to that drive. What my idea was to:
1. Set a timer to check the list of files in that directory every 1 second
2. If there are any changes, I would obtain the path of the file
3. Create a new DefaultMutableTreeNode for that file
4. Add this node into the JTree.
The problem I have right now is that all the debug checks are printing the right stuffs. However, JTree doesn't add the new node if files are placed in a sub folder, or a folder is copied into the directory. The code is not ready to detect file deletion yet.
Here is my code:
public static void refresh(final File dir, final JTree fileTree)
     //Start the timer
     final Timer timer = new Timer(1000, new ActionListener()
          //Get a list of the files
          List<File> listA = new ArrayList<File>(listAllFiles(null, dir, 2));
          public void actionPerformed(ActionEvent ae)
               int c = 0;
               List<File> listB = new ArrayList<File>(listAllFiles(null, dir, 2));
               //Files added
               if (listA.size() < listB.size())
                    File[] files = new File[listB.size() - listA.size()];
                    //Find out which file is it
                    for (int i = 0; i < listB.size(); i++)
                         //File found
                         if (!listA.contains(listB.get(i)))
                              //Get all the new files into an array
                              files[c] = (File) listB.get(i);
                              c++;
                    //Update the list first
                    listA = listB;
                    //Update each file into the file tree
                    for (int i = 0; i < files.length; i++)
                         //Remove user.dir path
                         String filePath = files.getAbsolutePath();
                         String userDir = System.getProperty("user.dir");
                         filePath = filePath.substring(userDir.length() + 1, filePath.length());
                         //Convert path separator to / for splitting
                         if (System.getProperty("os.name").contains("Windows"))
                              filePath = filePath.replaceAll("\\\\", "/");
                         //Convert it to tree path
                         Object root = ((DefaultTreeModel)fileTree.getModel()).getRoot();
                         String str[] = filePath.split("/");
                         Object obj[] = new Object[str.length];
                         obj[0] = root;
                         for (int j = 0; j < str.length - 1; j++)
                              obj[j + 1] = new DefaultMutableTreeNode(str[j]);
                         TreePath path = new TreePath(obj);
                         //New node to be added into the fileTree
                         DefaultMutableTreeNode newNode = new DefaultMutableTreeNode(files[i].getName());
                         DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)path.getLastPathComponent();
                         ((DefaultTreeModel)fileTree.getModel()).insertNodeInto(newNode, parentNode, parentNode.getChildCount());
     timer.start();

bumps..

Similar Messages

  • How can I view the newly added node in a JTree

    Hi! I have a problem with my project. I set up a JTree. At first it has a node that contains FARInfo object. When I click this node, the other program in the package will pop up a form to let user input and submit, then it will add a new node into the other node. The new node will contain FilledInfo object. But I cannot view this newly added node. The source code related with the 2 different object is as following:
    tree.addTreeSelectionListener( new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent e4)
    DefaultMutableTreeNode node = ( DefaultMutableTreeNode )
    (tree.getLastSelectedPathComponent ());
    Object nodeInfo = node.getUserObject();
    if (node.isLeaf())
    if ( nodeInfo instanceof FARInfo )
    FARInfo category = (FARInfo) nodeInfo;
    displayURL ( category.categoryURL );
    displayForm ( category.farFormName );
    if ( DEBUG )
    System.out.print ( category.categoryURL + ":\n" );
    else if ( nodeInfo instanceof FilledInfo )
         FilledInfo category2 = ( FilledInfo ) nodeInfo;      
         displayFilledForm ( category2.num );
    }else
    return;
    My question is: how to deal with the nodes containing 2 different objects: FARInfo and FilledInfo? FilledInfo is created by the other program in the package. Thanks for your help!

    I used insertNodeInto() to inser a new node into the tree, and it can be displayed. But when I used addTreeSelectionListener() to click on the newly added node, it cann not reaspond the click. Following is my original addTreeSelectionListener(). You see, if you click a node of FARInfo, then it will open a form, and after user filled in and submit it, a new node will be added into the Jtree. If you click a node of FilledInfo, then the user should view the content of this new node. But now, it seems that the sencond click cannot work. Thanks for your help.
    tree.addTreeSelectionListener( new TreeSelectionListener()
    public void valueChanged(TreeSelectionEvent e4)
    DefaultMutableTreeNode node = ( DefaultMutableTreeNode )
    (tree.getLastSelectedPathComponent ());
    Object nodeInfo = node.getUserObject();
    if (node.isLeaf())
    if ( nodeInfo instanceof FARInfo )
    FARInfo category = (FARInfo) nodeInfo;
    displayURL ( category.categoryURL );
    displayForm ( category.farFormName );
    if ( DEBUG )
    System.out.print ( category.categoryURL + ":\n" );
    else if ( nodeInfo instanceof FilledInfo )
    FilledInfo category2 = ( FilledInfo ) nodeInfo;
    displayFilledForm ( category2.num );
    }else
    return;

  • Add attribute to a XML node at a specific position

    I have this XML :
    var myNode:XML = <node attribute="123"/>
    I know how to add an attribute to the node :
    myNode.@otherAttribute = "abc";
    But this adds the attribute to the end. What if I want to add it as the first attribute ? I would like to have :
    <node otherAttribute="abc" attribute="123"/>
    I know it is possible to add a child node to a specific position with insertChildAfter() or insertChildBefore() but I don't know if it's possible for an attribute.

    there's no native method for this, maybe you should create some functions for this. just like
    private function setAttribute(node:XML, name:String, value:String, index:int = -1):void
        var attrs:XMLList = node.attributes().copy(),
            l:int = attrs.length();
        if(index == -1 || index > l - 1)
            node.@[name] = value;
        else
            delete node.@*;
            var idx:int = 0;
            for (var i:int = 0; i < l + 1; i++)
                if(i == index)
                    node.@[name] = value;
                else
                    var attr:XML = attrs[idx];
                    node.@[attr.name()] = attr.toString();
                    idx++;
    and use it like this:
    setAttribute(myNode, "otherAttribute", "abc", 0);

  • How to add a button in the view at a specific position

    Hi Gurus,
    We have a requirement :
    To add a button or image at a specific position in the view which is like an indicator showing different color
    based on another field .
    Example :
    Adding a button next to a drop down flield and changing the color of the button based on the name of the color choosen in the drop down .
    or Adding an image which can be changed based on the dropdown value or the value entered in the input field .
    Thanks ,
    Naval Bhatt.

    Hi,
    Create an Attribute ZINDICATOR , in the same context node in which the dropdown(picklist) attribute,exists.
    Let it be a CHAR 1 field.
    Implement GET_P and GET_ method.
    Pull this field beside the dropdown fields in view configuration.
    Now the code =>
    Implement the Get_P_ZINDICATOR for this attribute as explained by Robert
    Implement  Get_ZINDICATOR method as follows
      DATA:
         lr_current   TYPE REF TO if_bol_bo_property_access,
         lr_entity TYPE REF TO cl_crm_bol_entity,
         coll      TYPE REF TO if_bol_entity_col.
      lr_current ?= collection_wrapper->get_current( ).
    IF lr_current IS NOT BOUND.
       value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
       RETURN.
    ELSE.
       dref = lr_current->get_property( 'ZINDICATOR' ) .
    ENDIF.
    IF dref IS NOT BOUND.
        value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
        RETURN.
    ENDIF.
    TRY.
        value = if_bsp_model_util~convert_to_string( data_ref       = dref
                                                                                attribute_path = attribute_path
          IF value IS INITIAL.
            value = cl_thtmlb_util=>get_icon_url( 'check_empty.gif' ).
    *      ELSEIF  value EQ 'R'
    *        value = cl_thtmlb_util=>get_icon_url( 'check_overdue_status.gif' ). " gives RED LIGHT
          ELSEIF  value EQ 'Y' .
            value = cl_thtmlb_util=>get_icon_url( 'check_due_status.gif' ). " gives YELLOW light
          ELSEIF  value EQ 'G'.
            value = cl_thtmlb_util=>get_icon_url( 'check_nodue_status.gif' ). " gives GREEN light
          ENDIF.
    CATCH cx_bsp_conv_illegal_ref.
          CLEAR value.
          RETURN.
    CATCH cx_root.
          CLEAR value.
          RETURN.
    ENDTRY.
    Generally check_overdue_status.gif and other images are std. and are present in all skins.
    You need more colors then you have to add those images in the MIME repository in the images folder of the SAP SKIN folder.
    You must implement the eventhandler for Dropdown field. For this in the GET_P method of dropdown, use
    CASE iv_property
      WHEN  if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'COLOUR_SELECTED'.
    ENDCASE.
    and then implement the event handler EH_ONCOLOUR_SELECTED.
    In this event handler, you must set the ZINDICATOR value as ' ' , 'R','G','Y' etc depending upon what is selected in dropdown.
    This ensures that a server roundtrip is triggered and so the GET method of indicator field is called as soon as dropdown value
    is selected.
    Hope this helps.
    Thanks & Regards
    Suchita

  • Dynamically adding nodes without a TreeModel

    Hi,
    I am adding nodes dynamically after the tree is visible. It's adding
    the first child node I create and it is showing it. When I add a second
    node, it doesn't show the that. And when I debug the code I found that
    the node was added to the tree but it is not visible. I tried by
    expanding and collapsing the tree manually, but it didn't work.
    I am not using any TreeModel as such. So, how do I make the change
    visible??? I am even calling the repaint() method of JTree, what could
    be the problem and is it better if I create my own TreeModel class and
    use it???
    Thank you,
    Srikanth...

    you can post the code for start.
    try to get the model and fire
    fireTreeStructureChanged(that will collapse all)
    or try to fire fireTreeNodesInserted
    for my point of view
    implamenting the TreeModel is always better and simple

  • How to  Place the Cursor at Specific Position with-in a Char Field ?

    Forms 4.5 ver.
    Sun Solaris / Citrix env.
    Char Field - Length 65434
    How Can I Place the Cursor at "Specific Location"
    with in a Field ?
    with GO_ITEM('field Name') I can place the Cursor at Specific Field.
    But, How Can I achieve to Place the Cursor at Specific
    Position within that Field ?
    I know, the starting position, length of string I want to hightlight with the Cursor.
    tried using :
    go_item('substr(field_name,position,length)') ;
    but didn't work !
    Is it possible ?
    Thanks, Peri

    The only cursor postion behavior that can be controled is the item property "Keep Position".
    The following is the text from the on-line help for item property "Keep Position"
    KEEP_POSITION Specifies whether the Keep Position property should be True or False. When Keep Position is True, the cursor returns to the same position it was in when it left the text item. When Keep Position is False, the cursor returns to the default position in the text item. Valid values are PROPERTY_TRUE and PROPERTY_FALSE.

  • Wrting data to a file in specific positions

    Hi, i have written a program that reads from one text file, grabs certain data and I will write that data out to a new fie. I am successfully doing the write, but how do I tell it to write the different data in specific positions in that new file. Right now it just writes the data int he order that I have it coded, but that is not necessarily the order i want the data written in. for example i want texta to start in position 25, while textc will be written first and textb will start in pos 150.
    writer.write(texta);
    writer.write(textb);
    writer.write(textc);

    Are these "positions" you are talking about line numbers or some sort of byte offset?
    if they are line numbers and you don't have a ton-load of data in that file, then I would advocate reading the file into some sort of collection, ordering the collection the way you want, and writing the data back.
    If they are byte offsets (or something similar) then you'll likely need to look at RandomAccessFile.
    Good Luck
    Lee

  • How to dislay a frame when i clck on the node or leaf on the JTree

    Hi All,
    Iam doing project on swing. In that iam doing with JTree. The Jtree is displaying on the left side of the splitpane .My problem is if i click on the nodes or leaf in the JTree one panel should be open in on the right side of the spltpane. Iam pasting the code.please can any body knows the solution please send me.
    regards
    sonali
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.BorderFactory;
    import javax.swing.border.*;
    import java.awt.event.*;
    import javax.swing.tree.*;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.event.TreeSelectionListener;
    import javax.swing.event.TreeSelectionEvent;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import java.net.URL;
    import javax.swing.*;
    import java.io.IOException;
    import javax.swing.JEditorPane;
    import javax.swing.JScrollPane;
    import javax.swing.JSplitPane;
    import javax.swing.JFrame;
    import Test.Test1;
    public class JFrame1 extends javax.swing.JFrame {
    JScrollPane sp;
    JPanel topPanel;
    JPanel leftPanel;
    JPanel bottomPanel;
    JPanel rightPanel;
    Border b ;
    JTree tree;
    DefaultTreeModel treeModel;
         public JFrame1(){
              getContentPane().setLayout(null);
              setSize(405,305);
              setVisible(false);
              JPanel1.setLayout(null);
              getContentPane().add(JPanel1);
              JPanel1.setLayout(new GridLayout(1, 1));
              JPanel1.setBounds(0,0,405,305);
              JPanel1.add(JSplitPane1);
              JSplitPane1.setBounds(0,5,405,305);
              JSplitPane1.setContinuousLayout(false);
              topPanel = new JPanel();
              leftPanel = new JPanel();
              bottomPanel = new JPanel();
              topPanel.setLayout(new FlowLayout());
              leftPanel.setLayout(null);
              b = new EtchedBorder();
              leftPanel.setBorder(b);
              leftPanel.setBounds(0,0,300,305);
              bottomPanel.setLayout(new FlowLayout());
              rightPanel = new JPanel();
              rightPanel.setBounds(108, 0, 300, 305);
              JSplitPane1.setRightComponent(rightPanel);
              JSplitPane1.setLeftComponent(leftPanel);
              rightPanel.setLayout(null);
              topPanel.setBounds(0,0,305,25);
              b = new EtchedBorder(0);
              topPanel.setBorder(b);
              bottomPanel.setBounds(0,26,300,280);
              b = new BevelBorder(1, Color.black,Color.black);
              bottomPanel.setBorder(b);
              rightPanel.add(topPanel);
              rightPanel.add(bottomPanel);
              JSplitPane1.setDividerLocation(120);
              DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
    DefaultMutableTreeNode subroot = new DefaultMutableTreeNode("SubRoot");
    DefaultMutableTreeNode leaf1 = new DefaultMutableTreeNode("Leaf 1");
    DefaultMutableTreeNode leaf2 = new DefaultMutableTreeNode("Leaf 2");
    DefaultMutableTreeNode leaf3 = new DefaultMutableTreeNode("Leaf 3");
    DefaultMutableTreeNode subroot1 = new DefaultMutableTreeNode("SubRoot1");
    DefaultMutableTreeNode leaf11 = new DefaultMutableTreeNode("Leaf 11");
    DefaultMutableTreeNode leaf21 = new DefaultMutableTreeNode("Leaf 21");
    DefaultMutableTreeNode leaf31 = new DefaultMutableTreeNode("Leaf 31 skfjdsf sfjfdsl fslfkjdsfl sflkjaflksdfdslfjds lfsdlkfjdslk sdsdlkfjdsla fflkdasjfdslkjal");
    DefaultMutableTreeNode subroot2 = new DefaultMutableTreeNode("SubRoot2");
    DefaultMutableTreeNode leaf12 = new DefaultMutableTreeNode("Leaf 12");
    DefaultMutableTreeNode leaf22 = new DefaultMutableTreeNode("Leaf 22");
    DefaultMutableTreeNode leaf32 = new DefaultMutableTreeNode("Leaf 32");
    treeModel = new DefaultTreeModel(root);
    tree = new JTree(treeModel);
    treeModel.insertNodeInto(subroot, root, 0);
    treeModel.insertNodeInto(leaf1, subroot, 0);
    treeModel.insertNodeInto(leaf2, root, 1);
    treeModel.insertNodeInto(leaf3, root, 2);
    treeModel.insertNodeInto(subroot1, root, 3);
    treeModel.insertNodeInto(leaf11, subroot1, 0);
    treeModel.insertNodeInto(leaf21, subroot1, 1);
    treeModel.insertNodeInto(leaf31, subroot1, 2);
    treeModel.insertNodeInto(subroot2, root, 3);
    treeModel.insertNodeInto(leaf12, subroot2, 0);
    treeModel.insertNodeInto(leaf22, subroot2, 1);
    treeModel.insertNodeInto(leaf32, subroot2, 2);
    sp = new JScrollPane();
    sp.setBounds(0,0,300,305);
    sp.getViewport().add(tree);
    sp.setViewportBorder(BorderFactory.createRaisedBevelBorder());
    leftPanel.add(sp,BorderLayout.CENTER);
    //          SymPropertyChange lSymPropertyChange = new SymPropertyChange();
    //          JSplitPane1.addPropertyChangeListener(lSymPropertyChange);
              SymWindow aSymWindow = new SymWindow();
              this.addWindowListener(aSymWindow);
              SymComponent aSymComponent = new SymComponent();
              this.addComponentListener(aSymComponent);
         public JFrame1(String sTitle)
              this();
              setTitle(sTitle);
         public void setVisible(boolean b)
              if (b)
                   setLocation(50, 50);
              super.setVisible(b);
         static public void main(String args[])
              (new JFrame1()).setVisible(true);
         public void addNotify()
              Dimension size = getSize();
              super.addNotify();
              if (frameSizeAdjusted)
                   return;
              frameSizeAdjusted = false;
              Insets insets = getInsets();
              javax.swing.JMenuBar menuBar = getRootPane().getJMenuBar();
              int menuBarHeight = 0;
              if (menuBar != null)
                   menuBarHeight = menuBar.getPreferredSize().height;
              setSize(insets.left + insets.right + size.width, insets.top + insets.bottom + size.height + menuBarHeight);
         boolean frameSizeAdjusted = false;
         javax.swing.JPanel JPanel1 = new javax.swing.JPanel();
         javax.swing.JSplitPane JSplitPane1 = new javax.swing.JSplitPane();
         /*class SymPropertyChange implements java.beans.PropertyChangeListener{
              public void propertyChange(java.beans.PropertyChangeEvent event){
                   Object object = event.getSource();
                   if (object == JSplitPane1)
                        JSplitPane1_propertyChange(event);
    /*     void JSplitPane1_propertyChange(java.beans.PropertyChangeEvent event){
         System.out.println("!");
         sp.setSize((int)JSplitPane1.getLeftComponent().getBounds().getWidth()-2,(int)JSplitPane1.getLeftComponent().getBounds().getHeight()-2 );
         sp.repaint();
         tree.repaint();
         class SymWindow extends java.awt.event.WindowAdapter{
              public void windowActivated(java.awt.event.WindowEvent event){
                   Object object = event.getSource();
                   if (object == JFrame1.this)
                        JFrame1_windowActivated(event);
              public void windowIconified(java.awt.event.WindowEvent event){
                   Object object = event.getSource();
                   if (object == JFrame1.this)
                        JFrame1_windowIconified(event);
         void JFrame1_windowIconified(java.awt.event.WindowEvent event){
         void JFrame1_windowActivated(java.awt.event.WindowEvent event){
         class SymComponent extends java.awt.event.ComponentAdapter{
              public void componentShown(java.awt.event.ComponentEvent event){
                   Object object = event.getSource();
                   if (object == JFrame1.this)
                        JFrame1_componentShown(event);
              public void componentResized(java.awt.event.ComponentEvent event){
                   Object object = event.getSource();
                   if (object == JFrame1.this)
                        JFrame1_componentResized(event);
         void JFrame1_componentResized(java.awt.event.ComponentEvent event){
         System.out.println("!!");
              JPanel1.setSize(this.getContentPane().getMaximumSize());
              JSplitPane1.setSize((int)JPanel1.getMaximumSize().getWidth()-5,(int)JPanel1.getMaximumSize().getHeight()-5 );
              topPanel.setBounds(0, 0, rightPanel.getWidth()-3, 25);
              bottomPanel.setBounds(0,26,rightPanel.getWidth()-3,rightPanel.getHeight()-28);
              sp.setSize((int)leftPanel.getMaximumSize().getWidth(),(int)leftPanel.getMaximumSize().getHeight());
         sp.setAutoscrolls(true);
         //sp.setSize((int)JSplitPane1.getLeftComponent().getBounds().getWidth()-2,(int)JSplitPane1.getLeftComponent().getBounds().getHeight()-2 );
         sp.repaint();
         //sp.setSize((int)leftPanel.getSize().getWidth(),(int)leftPanel.getSize().getHeight() );
         void JFrame1_componentShown(java.awt.event.ComponentEvent event){
         System.out.println("!!!");
              JPanel1.setSize(this.getContentPane().getMaximumSize());
              JSplitPane1.setSize((int)JPanel1.getMaximumSize().getWidth()-5,(int)JPanel1.getMaximumSize().getHeight()-5 );
              topPanel.setBounds(0, 0, rightPanel.getWidth()-3, 25);
         sp.setSize((int)JSplitPane1.getLeftComponent().getBounds().getWidth()-2,(int)JSplitPane1.getLeftComponent().getBounds().getHeight()-2 );
         sp.repaint();
              bottomPanel.setBounds(0,26,rightPanel.getWidth()-3,rightPanel.getHeight()-28);
    }

    hi sculz,
    i develped the tree, and tree selection listener also the 4 th point i didnt able to do . here is the code belo what i did.
    iam not able to add the JSplit pane also.
    import java.io.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class Tree08 extends JFrame{
    Hashtable theHashtable = new Hashtable();
    int frameWidth = 300;
    int frameHeight = 305;
    int numberRows = 19;
    JTree tree;
    JPanel treePanel;
    String plafClassName =
    "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
    For future reference, the three plaf implementations
    are:
    com.sun.java.swing.plaf.metal.MetalLookAndFeel
    com.sun.java.swing.plaf.motif.MotifLookAndFeel
    com.sun.java.swing.plaf.windows.WindowsLookAndFeel
    JLabel display;
    public static void main(String args[]) {
    new Tree08();
    public Tree08 () {
    theHashtable.put("Cabbage","Good in slaw");
    theHashtable.put("Squash","The yellow variety");
    theHashtable.put("Onion","Not too hot");
    theHashtable.put("Squirrel","Likes to store nuts");
    theHashtable.put("Rabbit","Runs fast");
    theHashtable.put("Fox","Crazy like a ...");
    theHashtable.put("Horse","Fun to ride");
    theHashtable.put("Pig","Lives in mud");
    theHashtable.put("Cow","Gives us milk");
    theHashtable.put("Peach","From Georgia");
    theHashtable.put("Grape","Saueeze into wine");
    theHashtable.put("Apple","Red delicious");
    theHashtable.put("Orange","Very juicy");
    DefaultMutableTreeNode[] theTreeNodes = new
    DefaultMutableTreeNode[numberRows];
    theTreeNodes[0] = new DefaultMutableTreeNode("Sample
    Tree");
    theTreeNodes[1] = new
    DefaultMutableTreeNode("Vegetables");
    theTreeNodes[2] = new
    DefaultMutableTreeNode("Cabbage");
    theTreeNodes[3] = new
    DefaultMutableTreeNode("Squash");
    theTreeNodes[4] = new
    DefaultMutableTreeNode("Onion");
    theTreeNodes[5] = new
    DefaultMutableTreeNode("Animals");
    theTreeNodes[6] = new
    DefaultMutableTreeNode("Forrest");
    theTreeNodes[7] = new
    DefaultMutableTreeNode("Squirrel");
    theTreeNodes[8] = new
    DefaultMutableTreeNode("Rabbit");
    theTreeNodes[9] = new DefaultMutableTreeNode("Fox");
    theTreeNodes[10] = new
    DefaultMutableTreeNode("Farm");
    theTreeNodes[11] = new
    DefaultMutableTreeNode("Horse");
    theTreeNodes[12] = new DefaultMutableTreeNode("Pig");
    theTreeNodes[13] = new DefaultMutableTreeNode("Cow");
    theTreeNodes[14] = new
    DefaultMutableTreeNode("Fruit");
    theTreeNodes[15] = new
    DefaultMutableTreeNode("Peach");
    theTreeNodes[16] = new
    DefaultMutableTreeNode("Grape");
    theTreeNodes[17] = new
    DefaultMutableTreeNode("Apple");
    theTreeNodes[18] = new
    DefaultMutableTreeNode("Orange");
    theTreeNodes[0].add(theTreeNodes[1]);
    theTreeNodes[1].add(theTreeNodes[2]);
    theTreeNodes[1].add(theTreeNodes[3]);
    theTreeNodes[1].add(theTreeNodes[4]);
    theTreeNodes[0].add(theTreeNodes[5]);
    theTreeNodes[5].add(theTreeNodes[6]);
    theTreeNodes[6].add(theTreeNodes[7]);
    theTreeNodes[6].add(theTreeNodes[8]);
    theTreeNodes[6].add(theTreeNodes[9]);
    theTreeNodes[5].add(theTreeNodes[10]);
    theTreeNodes[10].add(theTreeNodes[11]);
    theTreeNodes[10].add(theTreeNodes[12]);
    theTreeNodes[10].add(theTreeNodes[13]);
    theTreeNodes[0].add(theTreeNodes[14]);
    theTreeNodes[14].add(theTreeNodes[15]);
    theTreeNodes[14].add(theTreeNodes[16]);
    theTreeNodes[14].add(theTreeNodes[17]);
    theTreeNodes[14].add(theTreeNodes[18]);
    treePanel = new TreePanel(theTreeNodes[0]);
    tree.addTreeSelectionListener(new MyTreeListener());
    Container content = getContentPane();
    content.add(treePanel,BorderLayout.CENTER);
    display = new JLabel("Display Selection Here");
    content.add(display,BorderLayout.SOUTH);
    setSize(frameWidth, frameHeight);
    setTitle("Copyright 1998, R.G.Baldwin");
    setVisible(true);
    this.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);}
    class MyTreeListener implements TreeSelectionListener{
    public void valueChanged(TreeSelectionEvent e) {
    DefaultMutableTreeNode theNode =
    (DefaultMutableTreeNode)
    (e.getPath().getLastPathComponent());
    if (theNode.isLeaf()) {
    display.setText((String)theHashtable.get(
    theNode.getUserObject()));
    class TreePanel extends JPanel {
    public TreePanel(TreeNode root){
    setLayout(new BorderLayout());
    tree = new JTree(root);
    JScrollPane sp = new JScrollPane(tree);
    add(sp, BorderLayout.CENTER);
    try{
    UIManager.setLookAndFeel(plafClassName);
    }catch(Exception ex){System.out.println(ex);}
    SwingUtilities.updateComponentTreeUI(this);
    for(int cnt = 0; cnt < numberRows; cnt++){
    tree.expandRow(cnt);
    regards
    sonali

  • Adding node back into cluster after removal...

    Hi,
    I removed a cluster node using "scconf -r -h <node>" (carried out all the other usual removal steps before getting this command to work).
    Because this is a pair+1 cluster and the node i was trying to remove was physically attached to the quroum device (scsi), I had to create a dummy node before the removal command above would work.
    I reinstalled solaris, SC3.1u4 framwork, patches etc. and then tried to run scsinstall again on the node (reintroduced the node to the cluster again first using scconf -a -T node=<node>).
    However! during the scsinstall i got the following problem:
    Updating file ("ntp.conf.cluster") on node n20-2-sup ... done
    Updating file ("hosts") on node n20-2-sup ... done
    Updating file ("ntp.conf.cluster") on node n20-3-sup ... done
    Updating file ("hosts") on node n20-3-sup ... done
    scrconf: RPC: Unknown host
    scinstall:  Failed communications with "bogusnode"
    scinstall: scinstall did NOT complete successfully!
    Press Enter to continue:
    Was not sure what to do at this point, but since the other clusternodes could now see my 'new' node again, i removed the dummy node, rebooted the new node and said a little prayer...
    Now, my node will not boot as part of the cluster:
    Rebooting with command: boot
    Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000004cfa3e691,0:a File and args:
    SunOS Release 5.10 Version Generic_127111-06 64-bit
    Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    Hostname: n20-1-sup
    /usr/cluster/bin/scdidadm: Could not load DID instance list.
    Cannot open /etc/cluster/ccr/did_instances.
    Booting as part of a cluster
    NOTICE: CMM: Node n20-1-sup (nodeid = 1) with votecount = 0 added.
    NOTICE: CMM: Node n20-2-sup (nodeid = 2) with votecount = 2 added.
    NOTICE: CMM: Node n20-3-sup (nodeid = 3) with votecount = 1 added.
    NOTICE: CMM: Node bogusnode (nodeid = 4) with votecount = 0 added.
    NOTICE: clcomm: Adapter qfe5 constructed
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 being constructed
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 being constructed
    NOTICE: clcomm: Adapter qfe1 constructed
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 being constructed
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 being constructed
    NOTICE: CMM: Node n20-1-sup: attempting to join cluster.
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 being initiated
    NOTICE: CMM: Node n20-2-sup (nodeid: 2, incarnation #: 1205318308) has become reachable.
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 online
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 being initiated
    NOTICE: CMM: Node n20-3-sup (nodeid: 3, incarnation #: 1205265086) has become reachable.
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 online
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 being initiated
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 online
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 being initiated
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 online
    NOTICE: CMM: Cluster has reached quorum.
    NOTICE: CMM: Node n20-1-sup (nodeid = 1) is up; new incarnation number = 1205346037.
    NOTICE: CMM: Node n20-2-sup (nodeid = 2) is up; new incarnation number = 1205318308.
    NOTICE: CMM: Node n20-3-sup (nodeid = 3) is up; new incarnation number = 1205265086.
    NOTICE: CMM: Cluster members: n20-1-sup n20-2-sup n20-3-sup.
    NOTICE: CMM: node reconfiguration #18 completed.
    NOTICE: CMM: Node n20-1-sup: joined cluster.
    NOTICE: CMM: Node (nodeid = 4) with votecount = 0 removed.
    NOTICE: CMM: Cluster members: n20-1-sup n20-2-sup n20-3-sup.
    NOTICE: CMM: node reconfiguration #19 completed.
    WARNING: clcomm: per node IP config clprivnet0:-1 (349): 172.16.193.1 failed with 19
    WARNING: clcomm: per node IP config clprivnet0:-1 (349): 172.16.193.1 failed with 19
    cladm: CLCLUSTER_ENABLE: No such device
    UNRECOVERABLE ERROR: Sun Cluster boot: Could not initialize cluster framework
    Please reboot in non cluster mode(boot -x) and Repair
    syncing file systems... done
    WARNING: CMM: Node being shut down.
    Program terminated
    {1} ok
    Any ideas how i can recover this situation without having to reinstall the node again?
    (have a flash with OS, sc3.1u4 framework etc... so not the end of the world but...)
    Thanks a mil if you can help here!
    - headwrecked

    Hi - got sorted with this problem...
    basically just removed (scinstall -r) the sc3.1u4 software from the node which was not booting, and then re-installed the software (this time the dummy node had been removed so it did not try to contact this node and the scinstall completed without any errors)
    I think the only problem with the procedure i used to remove and readd the node was that i forgot to remove the dummy node before re-adding the actaul cluster node again...
    If anyone can confirm this to be the case then great - if not... well its working now so this thread can be closed.
    root@n20-1-sup # /usr/cluster/bin/scinstall -r
    Verifying that no unexpected global mounts remain in /etc/vfstab ... done
    Verifying that no device services still reference this node ... done
    Archiving the following to /var/cluster/uninstall/uninstall.1036/archive:
    /etc/cluster ...
    /etc/path_to_inst ...
    /etc/vfstab ...
    /etc/nsswitch.conf ...
    Updating vfstab ... done
    The /etc/vfstab file was updated successfully.
    The original entry for /global/.devices/node@1 has been commented out.
    And, a new entry has been added for /globaldevices.
    Mounting /dev/dsk/c3t0d0s6 on /globaldevices ... done
    Attempting to contact the cluster ...
    Trying "n20-2-sup" ... okay
    Trying "n20-3-sup" ... okay
    Attempting to unconfigure n20-1-sup from the cluster ... failed
    Please consider the following warnings:
    scrconf: Failed to remove node (n20-1-sup).
    scrconf: All two-node clusters must have at least one shared quorum device.
    Additional housekeeping may be required to unconfigure
    n20-1-sup from the active cluster.
    Removing the "cluster" switch from "hosts" in /etc/nsswitch.conf ... done
    Removing the "cluster" switch from "netmasks" in /etc/nsswitch.conf ... done
    ** Removing Sun Cluster framework packages **
    Removing SUNWkscspmu.done
    Removing SUNWkscspm..done
    Removing SUNWksc.....done
    Removing SUNWjscspmu.done
    Removing SUNWjscspm..done
    Removing SUNWjscman..done
    Removing SUNWjsc.....done
    Removing SUNWhscspmu.done
    Removing SUNWhscspm..done
    Removing SUNWhsc.....done
    Removing SUNWfscspmu.done
    Removing SUNWfscspm..done
    Removing SUNWfsc.....done
    Removing SUNWescspmu.done
    Removing SUNWescspm..done
    Removing SUNWesc.....done
    Removing SUNWdscspmu.done
    Removing SUNWdscspm..done
    Removing SUNWdsc.....done
    Removing SUNWcscspmu.done
    Removing SUNWcscspm..done
    Removing SUNWcsc.....done
    Removing SUNWscrsm...done
    Removing SUNWscspmr..done
    Removing SUNWscspmu..done
    Removing SUNWscspm...done
    Removing SUNWscva....done
    Removing SUNWscmasau.done
    Removing SUNWscmasar.done
    Removing SUNWmdmu....done
    Removing SUNWmdmr....done
    Removing SUNWscvm....done
    Removing SUNWscsam...done
    Removing SUNWscsal...done
    Removing SUNWscman...done
    Removing SUNWscgds...done
    Removing SUNWscdev...done
    Removing SUNWscnmu...done
    Removing SUNWscnmr...done
    Removing SUNWscscku..done
    Removing SUNWscsckr..done
    Removing SUNWscu.....done
    Removing SUNWscr.....done
    Removing the following:
    /etc/cluster ...
    /dev/did ...
    /devices/pseudo/did@0:* ...
    The /etc/inet/ntp.conf file has not been updated.
    You may want to remove it or update it after uninstall has completed.
    The /var/cluster directory has not been removed.
    Among other things, this directory contains
    uninstall logs and the uninstall archive.
    You may remove this directory once you are satisfied
    that the logs and archive are no longer needed.
    Log file - /var/cluster/uninstall/uninstall.1036/log
    root@n20-1-sup #
    Ran the scinstall again:
    >>> Confirmation <<<
    Your responses indicate the following options to scinstall:
    scinstall -ik \
    -C N20_Cluster \
    -N n20-2-sup \
    -M patchdir=/var/cluster/patches \
    -A trtype=dlpi,name=qfe1 -A trtype=dlpi,name=qfe5 \
    -m endpoint=:qfe1,endpoint=switch1 \
    -m endpoint=:qfe5,endpoint=switch2
    Are these the options you want to use (yes/no) [yes]?
    Do you want to continue with the install (yes/no) [yes]?
    Checking device to use for global devices file system ... done
    Installing patches ... failed
    scinstall: Problems detected during extraction or installation of patches.
    Adding node "n20-1-sup" to the cluster configuration ... skipped
    Skipped node "n20-1-sup" - already configured
    Adding adapter "qfe1" to the cluster configuration ... skipped
    Skipped adapter "qfe1" - already configured
    Adding adapter "qfe5" to the cluster configuration ... skipped
    Skipped adapter "qfe5" - already configured
    Adding cable to the cluster configuration ... skipped
    Skipped cable - already configured
    Adding cable to the cluster configuration ... skipped
    Skipped cable - already configured
    Copying the config from "n20-2-sup" ... done
    Copying the postconfig file from "n20-2-sup" if it exists ... done
    Copying the Common Agent Container keys from "n20-2-sup" ... done
    Setting the node ID for "n20-1-sup" ... done (id=1)
    Verifying the major number for the "did" driver with "n20-2-sup" ... done
    Checking for global devices global file system ... done
    Updating vfstab ... done
    Verifying that NTP is configured ... done
    Initializing NTP configuration ... done
    Updating nsswitch.conf ...
    done
    Adding clusternode entries to /etc/inet/hosts ... done
    Configuring IP Multipathing groups in "/etc/hostname.<adapter>" files
    IP Multipathing already configured in "/etc/hostname.qfe2".
    Verifying that power management is NOT configured ... done
    Ensure that the EEPROM parameter "local-mac-address?" is set to "true" ... done
    Ensure network routing is disabled ... done
    Updating file ("ntp.conf.cluster") on node n20-2-sup ... done
    Updating file ("hosts") on node n20-2-sup ... done
    Updating file ("ntp.conf.cluster") on node n20-3-sup ... done
    Updating file ("hosts") on node n20-3-sup ... done
    Log file - /var/cluster/logs/install/scinstall.log.938
    Rebooting ...
    Mar 13 13:59:13 n20-1-sup reboot: rebooted by root
    Terminated
    root@n20-1-sup # syncing file systems... done
    rebooting...
    R
    LOM event: +103d+20h44m26s host reset
    screen not found.
    keyboard not found.
    Keyboard not present. Using lom-console for input and output.
    Sun Netra T4 (2 X UltraSPARC-III+) , No Keyboard
    Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved.
    OpenBoot 4.10.1, 4096 MB memory installed, Serial #52960491.
    Ethernet address 0:3:ba:28:1c:eb, Host ID: 83281ceb.
    Initializing 15MB Rebooting with command: boot
    Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000004cfa3e691,0:a File and args:
    SunOS Release 5.10 Version Generic_127111-06 64-bit
    Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved.
    Use is subject to license terms.
    Hostname: n20-1-sup
    Configuring devices.
    devfsadm: minor_init failed for module /usr/lib/devfsadm/linkmod/SUNW_scmd_link.so
    Loading smf(5) service descriptions: 24/24
    /usr/cluster/bin/scdidadm: Could not load DID instance list.
    Cannot open /etc/cluster/ccr/did_instances.
    Booting as part of a cluster
    NOTICE: CMM: Node n20-1-sup (nodeid = 1) with votecount = 0 added.
    NOTICE: CMM: Node n20-2-sup (nodeid = 2) with votecount = 2 added.
    NOTICE: CMM: Node n20-3-sup (nodeid = 3) with votecount = 1 added.
    NOTICE: clcomm: Adapter qfe5 constructed
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 being constructed
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 being constructed
    NOTICE: clcomm: Adapter qfe1 constructed
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 being constructed
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 being constructed
    NOTICE: CMM: Node n20-1-sup: attempting to join cluster.
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 being initiated
    NOTICE: CMM: Node n20-2-sup (nodeid: 2, incarnation #: 1205318308) has become reachable.
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-2-sup:qfe1 online
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 being initiated
    NOTICE: CMM: Node n20-3-sup (nodeid: 3, incarnation #: 1205265086) has become reachable.
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-3-sup:qfe5 online
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 being initiated
    NOTICE: clcomm: Path n20-1-sup:qfe5 - n20-2-sup:qfe5 online
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 being initiated
    NOTICE: clcomm: Path n20-1-sup:qfe1 - n20-3-sup:qfe1 online
    NOTICE: CMM: Cluster has reached quorum.
    NOTICE: CMM: Node n20-1-sup (nodeid = 1) is up; new incarnation number = 1205416931.
    NOTICE: CMM: Node n20-2-sup (nodeid = 2) is up; new incarnation number = 1205318308.
    NOTICE: CMM: Node n20-3-sup (nodeid = 3) is up; new incarnation number = 1205265086.
    NOTICE: CMM: Cluster members: n20-1-sup n20-2-sup n20-3-sup.
    NOTICE: CMM: node reconfiguration #23 completed.
    NOTICE: CMM: Node n20-1-sup: joined cluster.
    ip: joining multicasts failed (18) on clprivnet0 - will use link layer broadcasts for multicast
    NOTICE: CMM: Votecount changed from 0 to 1 for node n20-1-sup.
    NOTICE: CMM: Cluster members: n20-1-sup n20-2-sup n20-3-sup.
    NOTICE: CMM: node reconfiguration #24 completed.
    Mar 13 14:02:23 in.ndpd[351]: solicit_event: giving up on qfe1
    Mar 13 14:02:23 in.ndpd[351]: solicit_event: giving up on qfe5
    did subpath /dev/rdsk/c1t3d0s2 created for instance 2.
    did subpath /dev/rdsk/c2t3d0s2 created for instance 12.
    did subpath /dev/rdsk/c1t3d1s2 created for instance 3.
    did subpath /dev/rdsk/c1t3d2s2 created for instance 6.
    did subpath /dev/rdsk/c1t3d3s2 created for instance 7.
    did subpath /dev/rdsk/c1t3d4s2 created for instance 8.
    did subpath /dev/rdsk/c1t3d5s2 created for instance 9.
    did subpath /dev/rdsk/c1t3d6s2 created for instance 10.
    did subpath /dev/rdsk/c1t3d7s2 created for instance 11.
    did subpath /dev/rdsk/c2t3d1s2 created for instance 13.
    did subpath /dev/rdsk/c2t3d2s2 created for instance 14.
    did subpath /dev/rdsk/c2t3d3s2 created for instance 15.
    did subpath /dev/rdsk/c2t3d4s2 created for instance 16.
    did subpath /dev/rdsk/c2t3d5s2 created for instance 17.
    did subpath /dev/rdsk/c2t3d6s2 created for instance 18.
    did subpath /dev/rdsk/c2t3d7s2 created for instance 19.
    did instance 20 created.
    did subpath n20-1-sup:/dev/rdsk/c0t6d0 created for instance 20.
    did instance 21 created.
    did subpath n20-1-sup:/dev/rdsk/c3t0d0 created for instance 21.
    did instance 22 created.
    did subpath n20-1-sup:/dev/rdsk/c3t1d0 created for instance 22.
    Configuring DID devices
    t_optmgmt: System error: Cannot assign requested address
    obtaining access to all attached disks
    n20-1-sup console login:

  • Can't start EM after adding node to cluster

    Hi, I don't know if i choose the right forum. I have a problem with OEM after adding node to the cluster: It gives me an error:
    [oracle@nodedc3 bin]$ emctl start dbconsole
    Can't do setuid (cannot exec sperl)I think i can be a permissions issue like it was in my second thread. Thanks

    Hi, i have this package installed:
    [root@nodedc3 ~]# yum install perl-suidperl
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.mirror.linuxwerk.com
    * extras: ftp.plusline.de
    * updates: mirror.optimate-server.de
    Setting up Install Process
    Package 4:perl-suidperl-5.8.8-40.el5_9.x86_64 already installed and latest version
    Nothing to doOEM on other nodes works perfectlly. Thanks

  • Adding nodes to cluster in 10g r2 10.1.0.3

    I apologize if this is a repeat but my browser crashed before I could watch my post. I am asking a hypothetical question regarding adding nodes to the cluster. I am trying to get a feel for how much risk is involved in the operation and if there is any chance we could corrupt the current configuration?
    I was reading the article from Murali Vallath and notice that he made it a point to say that you should make a full cold backup before you perfrom step 6...
    Step 6: Add New Instance(s)
    DBCA has all the required options to add additional instances to the cluster.
    Requirements:
    Make a full cold backup of the database before commencing the upgrade process.
    Is there risk of corrupting the database during this step?
    We are running 10.2.0.3 on linux Itanium on RHEL4 and we are running a 2 node cluster. We are using OCFS2 for the OCR and Voting devices and we are using ASM and also ASMLIB for our shared storage option. We also are running EMC Powerpath on our hosts.
    Any tips or heads up would be greatly appreciated.
    Thanks.

    Duplicate post :- adding nodes to cluster in 10g r2 10.1.0.3

  • Tree control's nodes and ites position

    Hello,
    Is there a way to get tree's nodes and items position,or
    get it by ElementVisualizationMode and Hit event ?
    Thanks,
    Assaf

    Hi
    Using the new features, and I think I have found a bug that I was wondering if anyone else can comment on.
    GetNodeLeft(BSTR key) ... perfect
    GetNodeTop(BSTR Key) ... perfect
    GetNodeHeight(BSTR Key) ... perfect
    BUT
    GetNodeWidth(BSTR Key) ... returns weird values, except for the first item in the tree.
    The function then returns what seems to be:
    (Control Width - (Height * Absolute Position))
    The deeper one goes into the tree, the smaller the width becomes ...
    Surely this is a bug ....

  • Update ProductTrees_Lines - specific position

    Hi everybody,
    I want to update a specific position in ProductTrees_Lines with B1if scenario. For example I have a product tree for masteritem with 3 entries.
    masteritem
    1. detail item1, 2 pcs
    2. detail item2, 3 pcs
    3. detail item3, 4 pcs
    Now I want to update position 2 with 100 pcs.
    So my update structure for B1 object call (object id 66) looks like this:
    <QueryParams>
         <Code>masteritem</Code>
    </QueryParams>
    <ProductTrees>
         <row />
    </ProductTrees>
    <ProductTrees_Lines>
         <row/>
         <row>
              <ItemCode>detail item2</ItemCode>
              <Quantity>100.0</Quantity>
         </row>
         <row/>
    </ProductTrees_Lines>
    In fact I need to list the <row>-tags proper to the positions. Isn´t there a easier way by using something like <childnum> (which is the name of the field in the database describing the position of the productTree_line), so I don´t have to list all <row>-tags (reducing the xml I need to write)?
    Using <childnum> leads to an error. And I can´t find a adequate field in the object description for object id 66.
    Any suggestions?
    Best regards
    Benjamin

    Hello Benjamin,
    no, unfortunately not (I do not know). the Object help from b1iF says:
    <BOM>
        <!--DB Table Name: -->
        <BO>
            <!--multiple such elements are allowed-->
            <AdmInfo>
                <Object>long</Object>
                <Version>long</Version>
            </AdmInfo>
            <QueryParams>
                <TreeCode>string</TreeCode>
            </QueryParams>
            <ProductTrees>
                <row>
                    <!--multiple such elements are allowed-->
                    <TreeCode>string</TreeCode>
                    <TreeType>string</TreeType>
                    <Quantity>double</Quantity>
                    <DistributionRule>string</DistributionRule>
                    <Project>string</Project>
                    <DistributionRule2>string</DistributionRule2>
                    <DistributionRule3>string</DistributionRule3>
                    <DistributionRule4>string</DistributionRule4>
                    <DistributionRule5>string</DistributionRule5>
                    <PriceList>long</PriceList>
                    <Warehouse>string</Warehouse>
                </row>
            </ProductTrees>
            <ProductTrees_Lines>
                <row>
                    <!--multiple such elements are allowed-->
                    <ItemCode>string</ItemCode>
                    <Quantity>double</Quantity>
                    <Warehouse>string</Warehouse>
                    <Price>double</Price>
                    <Currency>string</Currency>
                    <IssueMethod>string</IssueMethod>
                    <Comment>string</Comment>
                    <ParentItem>string</ParentItem>
                    <PriceList>long</PriceList>
                    <DistributionRule>string</DistributionRule>
                    <Project>string</Project>
                    <DistributionRule2>string</DistributionRule2>
                    <DistributionRule3>string</DistributionRule3>
                    <DistributionRule4>string</DistributionRule4>
                    <DistributionRule5>string</DistributionRule5>
                    <WipAccount>string</WipAccount>
                    <ItemType>long</ItemType>
                    <LineText>string</LineText>
                    <AdditionalQuantity>double</AdditionalQuantity>
                </row>
            </ProductTrees_Lines>
        </BO>
    </BOM>
    theres no LineNum or other primary key

  • Not able to start DB after adding node

    Hi all,
    I have successfully added node RAC3 in 11gR2 RAC in RHEL5 Platfiorm
    while starting DB I am getting the below error
    [root@rac1 bin]# ./srvctl status database -d dev
    Instance dev1 is not running on node rac1
    Instance dev2 is not running on node rac2
    Instance dev3 is not running on node rac3
    [root@rac1 bin]# ./srvctl start database -d dev
    PRCR-1079 : Failed to start resource ora.dev.db
    ORA-29760: instance_number parameter not specified
    CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
    CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policy
    [root@rac1 bin]# ./srvctl status database -d dev
    Instance dev1 is running on node rac1
    Instance dev2 is running on node rac2
    Instance dev3 is not running on node rac3
    [root@rac1 bin]#
    [root@rac1 bin]# ./srvctl start database -d dev
    PRCR-1079 : Failed to start resource ora.dev.db
    ORA-29760: instance_number parameter not specified
    CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
    CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policyPlease suggest me...

    I m getting the below :
    [grid@rac3 ~]$ srvctl start database -d dev
    PRCR-1079 : Failed to start resource ora.dev.db
    ORA-01078: failure in processing system parameters
    CRS-2674: Start of 'ora.dev.db' on 'rac2' failed
    ORA-01078: failure in processing system parameters
    CRS-2674: Start of 'ora.dev.db' on 'rac3' failed
    ORA-01078: failure in processing system parameters
    CRS-2674: Start of 'ora.dev.db' on 'rac1' failed
    CRS-2632: There are no more servers to try to place resource 'ora.dev.db' on that would satisfy its placement policy
    [grid@rac3 ~]$ srvctl status database -d dev
    Instance dev1 is not running on node rac1
    Instance dev2 is not running on node rac2
    Instance dev3 is not running on node rac3
    [grid@rac3 ~]$ Parameter file
    [oracle@rac3 dbs]$ cat init_dev2.ora
    dev3.__db_cache_size=272629760
    dev2.__db_cache_size=272629760
    dev1.__db_cache_size=281018368
    dev3.__java_pool_size=4194304
    dev2.__java_pool_size=4194304
    dev1.__java_pool_size=4194304
    dev3.__large_pool_size=4194304
    dev2.__large_pool_size=4194304
    dev1.__large_pool_size=4194304
    dev1.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
    dev2.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
    dev3.__oracle_base='/raczone/11.2.0'#ORACLE_BASE set from environment
    dev3.__pga_aggregate_target=343932928
    dev2.__pga_aggregate_target=343932928
    dev1.__pga_aggregate_target=343932928
    dev3.__sga_target=507510784
    dev2.__sga_target=507510784
    dev1.__sga_target=507510784
    dev3.__shared_io_pool_size=0
    dev2.__shared_io_pool_size=0
    dev1.__shared_io_pool_size=0
    dev3.__shared_pool_size=218103808
    dev2.__shared_pool_size=218103808
    dev1.__shared_pool_size=209715200
    dev3.__streams_pool_size=0
    dev2.__streams_pool_size=0
    dev1.__streams_pool_size=0
    *.audit_file_dest='/raczone/11.2.0/admin/dev/adump'
    *.audit_trail='db'
    *.cluster_database=true
    *.compatible='11.2.0.0.0'
    *.control_files='+DATA1/dev/controlfile/current.260.786380999','+FRA/dev/controlfile/current.256.786380999'
    *.db_block_size=8192
    *.db_create_file_dest='+DATA1'
    *.db_domain=''
    *.db_name='dev'
    *.db_recovery_file_dest='+FRA'
    *.db_recovery_file_dest_size=4039114752
    *.diagnostic_dest='/raczone/11.2.0'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=devXDB)'
    dev1.instance_number=1
    dev2.instance_number=2
    dev3.instance_number=3
    *.log_archive_format='%t_%s_%r.dbf'
    *.memory_target=848297984
    *.open_cursors=300
    *.processes=150
    *.remote_listener='scan-cluster.raczone.com:1521'
    *.remote_login_passwordfile='exclusive'
    dev3.thread=3
    dev1.thread=1
    dev2.thread=1
    dev3.undo_tablespace='UNDOTBS3'
    dev2.undo_tablespace='UNDOTBS2'
    dev1.undo_tablespace='UNDOTBS1'
    [oracle@rac3 dbs]$

  • [AS][CS3] duplicate page items in a specific position on another doc

    Hello,
    I need to copy or duplicate page items of the active page of doc 1 in a specific position of the active page of doc 2.
    I can duplicate the page items of doc 1 into the doc 2 (with the code below) but can't find a way to duplicate them in a specific position: they are always duplicated in the same position on the active page of doc 2.
    The current working code (simplified) is:
    tell application "Adobe InDesign CS3"
    tell document 1
    tell layout window 1
    set pageitemlist to every page item of active page
    end tell
    end tell
    duplicate pageitemlist to the active page of layout window 1 of document 2
    end tell
    Thanks for your help!

    -- This works in CS4:
    tell application "Adobe InDesign CS4"
    tell document 1
    tell page 2
    set d to duplicate page item "textframe1" -- the text frame labeled "textframe1"
    -- FYI, d has a class of list:
    -- "text frame id 328 of page id 237 of spread id 232 of document "Untitled-2" of application "Adobe InDesign CS4""
    end tell
    move d to page 4 -- moves to 0,0 on pg4
    end tell
    end tell

Maybe you are looking for

  • Place a carriage return in the field separator of an iChart

    In the Data Mapping of an iChart, the Field Separator is a good tool to obviously separate data.  The problem I see is the two fields and the separator are on one line.  How can I place a carriage return to place the two fields on separator lines?

  • External monitor quivers on L440, not on Acer

    Hi there, My external monitor quivers when connected to my new Lenovo ThinkPad L440. I does not do it when connected to my 4 year old Acer laptop, is seems perfectly fine there. In both cases connected with the same VGA cable. It's a constant, tiny f

  • Time and date keep changing

    It started happening a week or so ago. Every time I boot the time is changed. I set the date from the bios but arch shows the time wrong. Also because of this I sometimes get problems during bootup because the partition looks like it was last mounted

  • Control's property pages at runtime???

    I am currently implementing an ActiveX control with Measurement Studio for Visual Basic. Everything is going fine, but I have one general problem which I cannot solve. The control should show the own property pages at runtime mode. Whit one OLE contr

  • Web browser log in for wifi? how to

    I am required to log in through a web browser to use internet in my apt. How do I do this on my ATV after connecting to the network? Found the network and connected fine, now it needs to log in, but I am not sure how.