JTree problem displaying nodes

I have created a GUI, in which part of it allows the user to view files in a selected folder in a JTree format.
The tree only shows selected files with certain extensions (such as ".txt", ".doc", etc.. see code below)
I'll try to show what it looks like, for example:
- RootFolder
    - SomeOpenFolder
        - someFile
        - anotherFile
    + SomeClosedFolder
    - File_in_RootFolder
    - Another_file_in_RootFolder Anyhow, when I shipped it to my boss he occasionally cannot view the full file names..
for example:
- RootFolder
    - SomeOp....
        - some....
        - anothe...
    + SomeClo...
    - File_in_R...
    - Another_fil...I have the JTree inside a JScrollPane with horizontalScrollBarPolicy set to "AS_NEEDED"
I have run several tests, with both LONG and SHORT names... and it all works just fine for me
For example:
- RootFolder
    - SomeOpenFolder
        - someFile
        - anotherFile_With_A_VERY_VERY_VERY_VERY_LOOOOOOOOOOOOOOOOOOOONG_NAME
    + SomeClosedFolder_With_A_VERY_VERY_VERY_VERY_LOOOONG_NAME
    - File_in_RootFolder
    - Another_file_in_RootFolder And i am able to scroll left&right to view the full name within the scroll panel.
But for some reason, on my Bosses computer sometimes it has the full name,
and other times it cuts the name short with "FolderNa..."
Is anyone aware of why such a problem could happen?
Here is my code setting up the tree.
public void setMyTree(String myFolder)
File rootFile = new File(myFolder);
        JTree targetTree = new JTree(TreeSetup(rootFile, InputIncludeFilter()));
        targetTree.getSelectionModel().setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
        targetTree.setCellRenderer(new TreeCellRenderer() {
              public Component getTreeCellRendererComponent(JTree tree, Object value,
                            boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
                  JLabel label = new JLabel(value.toString());
                  TreePath p = tree.getPathForRow(row);
                  if(p != null){
                      File node = getInputFile(p);                    
                  if (selected) {
                         label.setOpaque(true);
                         label.setBackground(tree.getBackground().darker());
                      return label;
              private File getInputFile(TreePath path) {
                  StringBuffer fName = new StringBuffer();
                    boolean isroot = true;
                    for (Object s : path.getPath()) {
                              fName.append(s + File.separator);                          
                  return new File(getUserDomain()+File.separator +
                             fName.toString().substring(0, fName.toString().length() - 1));
}Any ideas? Do would it help to see my method "InputIncludeFilter()"

DefaultTreeCellRenderer extends from JLabel, so whatever you are doing to the JLabel you create you can do to the DefaultTreeCellRenderer too.
This would be more like it:
       targetTree.setCellRenderer(new DefaultTreeCellRenderer() {
              public Component getTreeCellRendererComponent(JTree tree, Object value,
                            boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
                 super.getTreeCellRendererComponent(tree,value,selected,expanded,leaf,row,hasFocus);
                  TreePath p = tree.getPathForRow(row);
                  if(p != null){
                      File node = getInputFile(p);                    
                  if (selected) {
                         this.setOpaque(true);
                         this.setBackground(tree.getBackground().darker());
                      return this;
              }

Similar Messages

  • JTree first displayed node

    Hi,
    I was looking at JTree API and I find a difference between viewable and displayed nodes: a viewable node is a child of an expanded node, and a displayed node is a viewable one that is indeed displayed in the screen (it falls in the tree visible area).
    Now I want to know the first displayed node in the tree, but I don't see how to obtain it.
    Any help would be appreciated.

    Thanks, tjacobs.
    I tried it but it is difficult to determine it this way.
    I have a JScrollPane; then I try this:
    int x = 50;
    int y = getVerticalScrollBar().getValue() + 5;
    TreePath firstPath = _tree.getPathForLocation(x, y);x = 50 is an attempt to know where the child is; as long as the tree gets expanded, it is greater, but I don't know at which level the tree is expanded in that location.
    Any ideas?

  • JTree: Problems updating the nodes size

    Hi,
    I'm trying to update the content of a JTree and I wonder how it
    really works, since the paint() method doesn't seem to call the
    renderer.
    My situation: Imagine a JPanel splited in two by a JSplitPane. In
    the left is the tree. Each node in the tree shows two panels, one
    aligned to the left, and another to the right. I need that the panel
    containing the two use all the available space in the left part of the
    Split panel.
    My solution: I pass the left JPanel to the tree renderer, so that
    it can get the width from it (inside the
    getTreeCellRendererComponent()) to build the return JPanel with the
    correct size. My logic is that since each time you move the JSplitPane
    the JTree paint() method is invoked the renderer can return the
    correct JPanel with the correct size that will be painted then in the
    screen.
    My problem: Doens't work. When I render the tree, the renderer is
    invoked, but it doesn't change its size (I can change the color based on the width, but not the node size). Only when I collapse & expand a node, it correctly takes into account the .setPreferredSize() and returns the JPanel with the correct size.
    The only way I found to update the tree involves to catch the
    JSplitPane event and call updateUI() in the tree, something that, I
    think, it's certainly not the correct way to do it.
    Any explanation of why this doesn't work would be really great. Any
    pointer to a web resource explaining in deep how Swing components work (specially the JTree) would be a godsend.
    Thanks,
    - Juancho

    My situation: Imagine a JPanel splited in two by a JSplitPane. Got it.
    In the left is the tree. In the left side of the JSplitPane is a JTree.
    Each node in the tree shows two panels,Maybe... on the right side of the JSplitPane are two Panels in which the data depends on which node is selected in the JTree???
    Maybe... you have a custom TreeCellRenderer which displays a pair of panels in place of the standard JLabel???
    one aligned to the left, and another to the right. To the left of what??? To the right of what???
    I need that the panel containing the two use all the available
    space in the left part of the Split panel.Panel containing the two what??? I thought the left part of the SplitPanel contained a JTree???

  • Problems generating nodes in a JTree

    Hi Folks,
    I'm having difficulty in generating a JTree. The code follows. Basically, my application creates objects in a hierarchical fashion. The application creates objects of the classes Source, Requirement, DesignElement, ImplementationElement and TestSpecification.
    Objects of each class have a parent relationship with the next, i.e., Source acts as parent to Requirement, Requirement to DesignElement etc. The Source, Requirement etc. classes each have a method for adding a child object, where the object is added to a Vector. Each parent may have more than one child.
    The method generateTree() gets called first, which in turn calls addNodes(). addNodes() is supposed to add parent nodes and their children recursively. An example would be as follows;
    root
    |
    --- S1 - Source 1
    |
    --- S2 - Source 2
    | |
    | --- R1 - Requirement 1
    | |
    | --- D1 - Design 1
    |
    --- S3 - Source 3
    etc.
    Providing that I only add Source and Requirement objects, the tree is generated correctly. If I try to add a Design Element or below,
    either the node doesn't show, or I loss other nodes.
    I've really been tearing my hair out over this and would really appreciate any advice over where I'm going wrong!
    Martin :-(
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.util.Vector;
    * Provides services for regenerating the tree when artifacts are added or removed.
    public class TreeServices {
      private static Vector sourceList, childArtifacts;
      private static JTree tree;
      private static DefaultMutableTreeNode newNode;
       * Cycles through each source artifact, adding them as a node to the tree and calling
       * addNodes() to add subsequent generations of children to the tree.
      public static JTree generateTree(JTree tree, ArtifactDatabase database) {
        sourceList = database.getSourceList();
        DefaultMutableTreeNode top = new DefaultMutableTreeNode("Project");
        tree = new JTree(top);
        DefaultMutableTreeNode node = null;
        for (int i = 0; i < sourceList.size(); i++) {
          node = new DefaultMutableTreeNode(sourceList.elementAt(i));
          top.add(node);
          addNodes((TraceabilityArtifact)sourceList.elementAt(i), node);
        return tree;
       * Adds children nodes to the tree recursively.
      private static void addNodes(TraceabilityArtifact art, DefaultMutableTreeNode node) {
        childArtifacts = art.getChildArtifacts();
        if (!childArtifacts.isEmpty()) {
          for (int i = 0; i < childArtifacts.size(); i++) {
            newNode = new DefaultMutableTreeNode(childArtifacts.elementAt(i));
            node.add(newNode);
            if (!(((TraceabilityArtifact)childArtifacts.elementAt(i)).getChildArtifacts()).isEmpty()) {
              addNodes((TraceabilityArtifact)childArtifacts.elementAt(i), newNode);
    }

    U need to call reload() method on ur TreeModel.
    ((DefaultTreeModel)tree.getModel()).reload()
    i u wanna reload complete tree
    or
    ((DefaultTreeModel)tree.getModel()).reload(TreeNode node) if u wanna reload a particular treenode
    hope this works
    Enjoy !!
    Raj

  • How to not display nodes in a tree if Oracle roles are NOT used?

    How to not display nodes in a tree if Oracle roles are NOT used?
    We don't use Oracle DB roles to grant users access to Forms from the menu. We use a template and role system of our own. Basically a few tables with templates and roles.
    We want to convert our normal Forms menu to a tree menu and one of our key requirements is that when the tree is populated ONLY nodes with programs (i.e. forms) he has been granted to execute is shown.
    Since we don't use Oracle Roles how to do this in a tree?
    I created a function to show/hide LEAF nodes, BUT problem is that there are sub-menu nodes showing even if the leaf-nodes under it has not being displayed. My function has suppressed it.
    My tree query is like this:
    SELECT
         t.status, LEVEL, t.label, t.icon, t.node VALUE
    FROM
         tma_tree_menu t
    WHERE
    tma_authenticate_sys_chk_role(USER, t.node) = 1
    CONNECT BY
         PRIOR t.node = t.master
    START WITH
         t.MASTER IS NULL
    ORDER SIBLINGS BY
    t.position
    The tma_authenticate_sys_chk_role will return 1 only if the user has access to the form under that node.
    I tried the FTree functions in Forms but even that has nothing.
    Any help would be greatly appreciated.
    Edited by: Channa on Mar 17, 2010 6:49 AM

    Would you share the source code? I guess what I need is how exactly you retreive the user credentials from the DB table and set that boolean variable.
    and then how to condition it in UIX?

  • Problem displaying CLOB in text file

    Hello All,
    I have a problem displaying the content from the database in notepad. When I click on a link on my jsf screen, I retrieve the data and display it in notepad.
    I have my text content stored in the database with CLOB datatype. When I look in the database the data looks in the following format:
    ---------STARTS FROM NEXT LINE-------------
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.
    Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.
    Sincerely,
    ABC
    ----------ENDS IN THE PREVIOUS LINE------------
    Now when I display this content onto the notepad, all the spaces and new line characters are lost, and the entire display looks awkward. This is how it looks:
    The firm, known for its keen oversight of products, has been the subject of complaints from firms who have had apps blocked from the store. Some developers have complained that the company's rules seem inconsistent.[]Some have found apps blocked after seemingly minor updates, or for having content deemed inappropriate by them. In light of this, and after careful consideration, I believe it is unnecessary to sign this measure at this time.[]Sincerely,[]ABC
    All the new line characters are lost and it just puts some junk character in place of a new line.
    When I copy the same text onto textpad, everything is alright and it displays exactly the way it is present in the database. I am also open to display the content in html, but in HTML it doesn't even display me the junk character in place of new line. It is just one single string without any line separators.
    I am using the following code to put the content into the text.
    public String writeMessage(){
       OutputStream outStream = null;
       HttpServletResponse response = getServletResponseFromFacesContext();
       Reader data = null;
       Writer writer = null;
       try{
          response.reset();
          response.setContentType("text/plain; charset=UTF-8");
          response.setHeader("Content-Disposition","attachment; filename="+id+"_Message.txt");
          outStream = response.getOutputStream();
          QueryRemote remote = serviceLocator.getQueriessEJB();
          data = remote.retrieveGovernorsVetoMessage(billId);
          writer = new BufferedWriter(new OutputStreamWriter( outStream, "UTF-8" ) );
          int charsRead;
          char[] cbuf = new char[1024];
          while ((charsRead = data.read(cbuf)) != -1) {
             System.out.println(charsRead);
          writer.write(cbuf, 0, charsRead);
          writer.flush();
       }catch(Exception ex){
          ex.printStackTrace();
       }finally{
          //Close outStream, data, writer
          facesContext.responseComplete();
       return null;
    }Any help or hints on resolving this issue would be highly appreciated.
    Thanks.

    The data is imported from a third party application to my database. It doesn't display any newline characters when I view the data.
    But when I do a regular expression search on text pad, I could see that my clob contains \n as the new line character. Is there a way to replace \n with \n\r while writing the data.
    Thanks.

  • Problem in NODE 1 after reboot

    Hi,
    Oracle Version:11gR2
    Operating System:Cent Os
    Hi we have some problem in node 1 after sudden reboot of both the nodes when the servers are up the database in node 2 started automatically but in node 1 we started manually.
    But inthe CRSCTL command it is showing that node 1 database is down as show below.
    [root@rac1 bin]# ./crsctl stat res -t
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS
    Local Resources
    ora.ASM_DATA.dg
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.ASM_FRA.dg
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.OCR_VOTE.dg
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.asm
                   ONLINE  ONLINE       rac1                     Started
                   ONLINE  ONLINE       rac2                     Started
    ora.eons
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.gsd
                   OFFLINE OFFLINE      rac1
                   OFFLINE OFFLINE      rac2
    ora.net1.network
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.ons
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.registry.acfs
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    Cluster Resources
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       rac2
    ora.LISTENER_SCAN2.lsnr
          1        ONLINE  ONLINE       rac1
    ora.LISTENER_SCAN3.lsnr
          1        ONLINE  ONLINE       rac1
    ora.oc4j
          1        OFFLINE OFFLINE
    ora.qfundrac.db
          1        OFFLINE OFFLINE
          2        ONLINE  ONLINE       rac2                     Open
    ora.rac1.vip
          1        ONLINE  ONLINE       rac1
    ora.rac2.vip
          1        ONLINE  ONLINE       rac2
    ora.scan1.vip
          1        ONLINE  ONLINE       rac2
    ora.scan2.vip
          1        ONLINE  ONLINE       rac1
    ora.scan3.vip
          1        ONLINE  ONLINE       rac1but for the below command it is showing both the nodes are up
    SQL> select inst_id,status,instance_role,active_state from gv$instance;
       INST_ID STATUS       INSTANCE_ROLE      ACTIVE_ST
             1 OPEN         PRIMARY_INSTANCE   NORMAL
             2 OPEN         PRIMARY_INSTANCE   NORMALhere is the output for cluvfy .
    [grid@rac1 bin]$ ./cluvfy stage -post crsinst -n rac1,rac2 -verbose
    Performing post-checks for cluster services setup
    Checking node reachability...
    Check: Node reachability from node "rac1"
      Destination Node                      Reachable?
      rac2                                  yes
      rac1                                  yes
    Result: Node reachability check passed from node "rac1"
    Checking user equivalence...
    Check: User equivalence for user "grid"
      Node Name                             Comment
      rac2                                  passed
      rac1                                  passed
    Result: User equivalence check passed for user "grid"
    Checking time zone consistency...
    Time zone consistency check passed.
    Checking Cluster manager integrity...
    Checking CSS daemon...
      Node Name                             Status
      rac2                                  running
      rac1                                  running
    Oracle Cluster Synchronization Services appear to be online.
    Cluster manager integrity check passed
    UDev attributes check for OCR locations started...
    Result: UDev attributes check passed for OCR locations
    UDev attributes check for Voting Disk locations started...
    Result: UDev attributes check passed for Voting Disk locations
    Check default user file creation mask
      Node Name     Available                 Required                  Comment
      rac2          0022                      0022                      passed
      rac1          0022                      0022                      passed
    Result: Default user file creation mask check passed
    Checking cluster integrity...
      Node Name
      rac1
      rac2
    Cluster integrity check passed
    Checking OCR integrity...
    Checking the absence of a non-clustered configuration...
    All nodes free of non-clustered, local-only configurations
    ASM Running check passed. ASM is running on all cluster nodes
    Checking OCR config file "/etc/oracle/ocr.loc"...
    OCR config file "/etc/oracle/ocr.loc" check successful
    Disk group for ocr location "+OCR_VOTE" available on all the nodes
    Checking size of the OCR location "+OCR_VOTE" ...
    Size check for OCR location "+OCR_VOTE" successful...
    Size check for OCR location "+OCR_VOTE" successful...
    WARNING:
    This check does not verify the integrity of the OCR contents. Execute 'ocrcheck' as a privileged user to verify the contents of OCR.
    OCR integrity check passed
    Checking CRS integrity...
    The Oracle clusterware is healthy on node "rac2"
    The Oracle clusterware is healthy on node "rac1"
    CRS integrity check passed
    Checking node application existence...
    Checking existence of VIP node application
      Node Name     Required                  Status                    Comment
      rac2          yes                       online                    passed
      rac1          yes                       online                    passed
    Result: Check passed.
    Checking existence of ONS node application
      Node Name     Required                  Status                    Comment
      rac2          no                        online                    passed
      rac1          no                        online                    passed
    Result: Check passed.
    Checking existence of GSD node application
      Node Name     Required                  Status                    Comment
      rac2          no                        does not exist            ignored
      rac1          no                        does not exist            ignored
    Result: Check ignored.
    Checking existence of EONS node application
      Node Name     Required                  Status                    Comment
      rac2          no                        online                    passed
      rac1          no                        online                    passed
    Result: Check passed.
    Checking existence of NETWORK node application
      Node Name     Required                  Status                    Comment
      rac2          no                        online                    passed
      rac1          no                        online                    passed
    Result: Check passed.
    Checking Single Client Access Name (SCAN)...
      SCAN VIP name     Node          Running?      ListenerName  Port          Running?
      qfund-rac.qfund.net  rac2          true          LISTENER      1521          true
    Checking name resolution setup for "qfund-rac.qfund.net"...
      SCAN Name     IP Address                Status                    Comment
      qfund-rac.qfund.net  192.168.8.118             passed
      qfund-rac.qfund.net  192.168.8.119             passed
      qfund-rac.qfund.net  192.168.8.117             passed
    Verification of SCAN VIP and Listener setup passed
    OCR detected on ASM. Running ACFS Integrity checks...
    Starting check to see if ASM is running on all cluster nodes...
    ASM Running check passed. ASM is running on all cluster nodes
    Starting Disk Groups check to see if at least one Disk Group configured...
    Disk Group Check passed. At least one Disk Group configured
    Task ACFS Integrity check passed
    Checking Oracle Cluster Voting Disk configuration...
    Oracle Cluster Voting Disk configuration check passed
    Checking to make sure user "grid" is not in "root" group
      Node Name     Status                    Comment
      rac2          does not exist            passed
      rac1          does not exist            passed
    Result: User "grid" is not part of "root" group. Check passed
    Checking if Clusterware is installed on all nodes...
    Check of Clusterware install passed
    Checking if CTSS Resource is running on all nodes...
    Check: CTSS Resource running on all nodes
      Node Name                             Status
      rac2                                  passed
      rac1                                  passed
    Result: CTSS resource check passed
    Querying CTSS for time offset on all nodes...
    Result: Query of CTSS for time offset passed
    Check CTSS state started...
    Check: CTSS state
      Node Name                             State
      rac2                                  Observer
      rac1                                  Observer
    CTSS is in Observer state. Switching over to clock synchronization checks using NTP
    Starting Clock synchronization checks using Network Time Protocol(NTP)...
    NTP Configuration file check started...
    The NTP configuration file "/etc/ntp.conf" is available on all nodes
    NTP Configuration file check passed
    Checking daemon liveness...
    Check: Liveness for "ntpd"
      Node Name                             Running?
      rac2                                  yes
      rac1                                  yes
    Result: Liveness check passed for "ntpd"
    Checking NTP daemon command line for slewing option "-x"
    Check: NTP daemon command line
      Node Name                             Slewing Option Set?
      rac2                                  yes
      rac1                                  yes
    Result:
    NTP daemon slewing option check passed
    Checking NTP daemon's boot time configuration, in file "/etc/sysconfig/ntpd", for slewing option "-x"
    Check: NTP daemon's boot time configuration
      Node Name                             Slewing Option Set?
      rac2                                  yes
      rac1                                  yes
    Result:
    NTP daemon's boot time configuration check for slewing option passed
    NTP common Time Server Check started...
    NTP Time Server ".INIT." is common to all nodes on which the NTP daemon is running
    NTP Time Server ".LOCL." is common to all nodes on which the NTP daemon is running
    Check of common NTP Time Server passed
    Clock time offset check from NTP Time Server started...
    Checking on nodes "[rac2, rac1]"...
    Check: Clock time offset from NTP Time Server
    Time Server: .INIT.
    Time Offset Limit: 1000.0 msecs
      Node Name     Time Offset               Status
      rac2          0.0                       passed
      rac1          0.0                       passed
    Time Server ".INIT." has time offsets that are within permissible limits for nodes "[rac2, rac1]".
    Time Server: .LOCL.
    Time Offset Limit: 1000.0 msecs
      Node Name     Time Offset               Status
      rac2          -29.328                   passed
      rac1          -84.385                   passed
    Time Server ".LOCL." has time offsets that are within permissible limits for nodes "[rac2, rac1]".
    Clock time offset check passed
    Result: Clock synchronization check using Network Time Protocol(NTP) passed
    Oracle Cluster Time Synchronization Services check passed
    Post-check for cluster services setup was successful.
    [grid@rac1 bin]$Please help me how to solve this problem.
    Thanks & regards
    Poorna Prasad.S

    Hi All,
    Now again i reboothed the database again manually and the database is no up on both the node.
    Here is the output for few commands
    [grid@rac1 bin]$ ./crs_stat -t
    Name           Type           Target    State     Host
    ora....DATA.dg ora....up.type OFFLINE   OFFLINE
    ora.ASM_FRA.dg ora....up.type OFFLINE   OFFLINE
    ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1
    ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1
    ora....N2.lsnr ora....er.type ONLINE    ONLINE    rac2
    ora....N3.lsnr ora....er.type ONLINE    ONLINE    rac2
    ora....VOTE.dg ora....up.type ONLINE    ONLINE    rac1
    ora.asm        ora.asm.type   ONLINE    ONLINE    rac1
    ora.eons       ora.eons.type  ONLINE    ONLINE    rac1
    ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
    ora....network ora....rk.type ONLINE    ONLINE    rac1
    ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE
    ora.ons        ora.ons.type   ONLINE    ONLINE    rac1
    ora....drac.db ora....se.type OFFLINE   OFFLINE
    ora....SM1.asm application    ONLINE    ONLINE    rac1
    ora....C1.lsnr application    ONLINE    ONLINE    rac1
    ora.rac1.gsd   application    OFFLINE   OFFLINE
    ora.rac1.ons   application    ONLINE    ONLINE    rac1
    ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1
    ora....SM2.asm application    ONLINE    ONLINE    rac2
    ora....C2.lsnr application    ONLINE    ONLINE    rac2
    ora.rac2.gsd   application    OFFLINE   OFFLINE
    ora.rac2.ons   application    ONLINE    ONLINE    rac2
    ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2
    ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1
    ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1
    ora.scan2.vip  ora....ip.type ONLINE    ONLINE    rac2
    ora.scan3.vip  ora....ip.type ONLINE    ONLINE    rac2
    [grid@rac1 bin]$ srvctl status nodeapps -n rac1,rac2
    -bash: srvctl: command not found
    [grid@rac1 bin]$ ./srvctl status nodeapps -n rac1,rac2
    PRKO-2003 : Invalid command line option value: rac1,rac2
    [grid@rac1 bin]$ ./srvctl status nodeapps -n rac1
    -n <node_name> option has been deprecated.
    VIP rac1-vip is enabled
    VIP rac1-vip is running on node: rac1
    Network is enabled
    Network is running on node: rac1
    GSD is disabled
    GSD is not running on node: rac1
    ONS is enabled
    ONS daemon is running on node: rac1
    eONS is enabled
    eONS daemon is running on node: rac1
    [grid@rac1 bin]$ ./srvctl status nodeapps -n rac2
    -n <node_name> option has been deprecated.
    VIP rac2-vip is enabled
    VIP rac2-vip is running on node: rac2
    Network is enabled
    Network is running on node: rac2
    GSD is disabled
    GSD is not running on node: rac2
    ONS is enabled
    ONS daemon is running on node: rac2
    eONS is enabled
    eONS daemon is running on node: rac2Here is the output for crsctl stat res -t
    [grid@rac1 bin]$ ./crsctl stat res -t
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS
    Local Resources
    ora.ASM_DATA.dg
                   OFFLINE OFFLINE      rac1
                   OFFLINE OFFLINE      rac2
    ora.ASM_FRA.dg
                   OFFLINE OFFLINE      rac1
                   OFFLINE OFFLINE      rac2
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.OCR_VOTE.dg
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.asm
                   ONLINE  ONLINE       rac1                     Started
                   ONLINE  ONLINE       rac2                     Started
    ora.eons
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.gsd
                   OFFLINE OFFLINE      rac1
                   OFFLINE OFFLINE      rac2
    ora.net1.network
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.ons
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    ora.registry.acfs
                   ONLINE  ONLINE       rac1
                   ONLINE  ONLINE       rac2
    Cluster Resources
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       rac1
    ora.LISTENER_SCAN2.lsnr
          1        ONLINE  ONLINE       rac2
    ora.LISTENER_SCAN3.lsnr
          1        ONLINE  ONLINE       rac2
    ora.oc4j
          1        OFFLINE OFFLINE
    ora.qfundrac.db
          1        OFFLINE OFFLINE
          2        OFFLINE OFFLINE
    ora.rac1.vip
          1        ONLINE  ONLINE       rac1
    ora.rac2.vip
          1        ONLINE  ONLINE       rac2
    ora.scan1.vip
          1        ONLINE  ONLINE       rac1
    ora.scan2.vip
          1        ONLINE  ONLINE       rac2
    ora.scan3.vip
          1        ONLINE  ONLINE       rac2What is going wrong here .
    Thanks & Regards,
    Poorna Prasad.S
    Edited by: SIDDABATHUNI on Apr 30, 2011 2:06 PM
    Edited by: SIDDABATHUNI on Apr 30, 2011 2:10 PM

  • Problem displaying picture stored in mySQL

    Hi, i just have got problem displaying picture stored in database as BLOB and presented on JSP over servlet. Below is my code i am using to upload file into database, than download it and display again. The result is the picture can not draw inself and there is always only empty picture space on the web page i am displaying. Please help me to find why it is not working, thanx.
    servlet uploading picture to database
                   boolean isMultipart = FileUpload.isMultipartContent(req);
                   DiskFileUpload upload = new DiskFileUpload();
                   List items = upload.parseRequest(req);
                   Hashtable textFields = new Hashtable();
                   byte[] data = new byte[4096];
                   if(isMultipart)
                        Iterator iter = items.iterator();
                        while(iter.hasNext())
                             FileItem item = (FileItem)iter.next();
                             if(item.isFormField())
                                  textFields.put(item.getFieldName(), item.getString());
                             }else{
                                  data = item.get();
                   String sqlStatement = "INSERT INTO cds VALUES('" textFields.get("id")"'," +
                                            "'" textFields.get("album") "','" textFields.get("interpreter") "'," +
                                                      "'" textFields.get("gr1") "','" textFields.get("gr2") "','" textFields.get("price") "')";
                   String sqlStatement2 = "INSERT INTO pics VALUES('" textFields.get("id") "','" data "')";
    servlet to download picture
    String SQL =
         "SELECT Picture " +
         "FROM pics " +
         "WHERE id = '" + request.getParameter("id") + "'";
         ResultSet rs = stmt.executeQuery(SQL);
         rs.next();
         Blob blob = null;
         blob = rs.getBlob(1);
         response.setContentType("image/jpg");
         request.setAttribute("blob", blob);
         System.out.println("just above OutputStream");
         InputStream in = blob.getBinaryStream();
         ServletOutputStream sout = response.getOutputStream();
         int b;
         while ((b = in.read()) != -1) {
         sout.write(b);
         in.close();
         sout.flush();
         sout.close();
    img tag in JSP
    <img src="LoadImageServlet?id=some id>
    plus i am using
    Tomcat 5.0
    mySQL 4.0
    debuging in eclipse
    thanx for help once more, Libor.

    1:
    are there any exceptions throws by the jdbc code
    2:
    is the code in a doGet
    3:
    you should do a if(result.next())
    4:
    Is your mapping code working

  • Problems displaying in IE

    While I love iWeb's ease of use, it seems to have serious problems displaying on IE. There is really no point blaming IE, since it is the dominant browser and most people who will see our sites will use it. The point of iWeb should be to allow people to communicate broadly and effectively, not just to Mac & Safari users.
    Lists do not work well. The indents do not display properly. Text in boxes shift alignment and location. Bullets show up with different sizes. I have had to hand indent and line space all the lists in the sites I make, which is a mess and not scaleable.
    See fieldsforkidsmamk.org.
    Are there any workarounds or fixes?
    The other obvious issues with iWeb are worth noting:
    * inconsistent display in browsers -- pages look different in Safari and Firefox, even on the Mac (let alone IE)
    * difficulty adding html code
    * page names must be identical to nav names, so pages with multiple words (Get Involved) display urls as /Get%20Involved (can't be corrected unless you have Get_Involved as a header.)
    * need to publish whole site for any change
    * need to publish all sites for each change to any site
    * can't change color, display, location, function etc for Nav
    I assume everyone is aware of these problems. The question is, what to do? Grin and bear it? Any help, tips or ideas would be appreciated.
    Thanks!
    MacBook Mac OS X (10.4.8)
    MacBook Mac OS X (10.4.8)
    MacBook Mac OS X (10.4.8)
    MacBook   Mac OS X (10.4.8)  

    * page names must be identical to nav names, so pages
    with multiple words (Get Involved) display urls as
    /Get%20Involved (can't be corrected unless you have
    Get_Involved as a header.)
    You can fix this the same way you add html code, by post processing.
    * need to publish all sites for each change to any
    site
    You can fix this by separating your sites into different Domain files so you only publish one at a time.
    Contrary to the other response, "encoding" is not connected to the points you made. There is never any need to add a UTF-8 "tag" to an iWeb page. If you see question marks or Â's when your page is displayed on any browser, Mac or PC, then you may need to fix your ftp or server settings.

  • How to create JTree without root node

    Hello;
    I like to create a JTree without root node?
    Any help?
    Thanks!
    --tony                                                                                                                                                                                   

    javadocs JTree,
    setRootVisible
    public void setRootVisible(boolean rootVisible)
    Determines whether or not the root node from the TreeModel is visible.
    Parameters:
    rootVisible - true if the root node of the tree is to be displayedSee Also:
    rootVisible

  • Problems displaying rtf memo fields

    Post Author: Davidm
    CA Forum: General
    We use Crystal Reports X to run reports on an Access database with a significant number of rtf memo fields. We use Total Access Memo to allow extended use of rtf within Access as our users require the additional formatting capabilities that this offers.
    However, there are considerable problems displaying items like bullet points, tables and hyperlinks in the Crystal Viewer with tables in particular coming out in a real mess with all entries in the table being displayed in a list with a small square marking each cell at the end of each line.
    Curiously, if you preview the report in the full version of Crystal X, it appears a bit better with the hyperlinks still underlined (bullet points still vanish) and rows in rtf tables are at least presented as a row even if the columns are not ordered and mixed (with no bounding cells visible).
    Firstly, is this disparity of end result between full Crystal X Print Preview and the Crystal X Viewer fixable?
    Secondly, is the limited handling of rtf tags likely to be solved in the next release of Crystal?

    Hi Mathias,
    If I caught you correctly, you want to display data in Adobe forms in form of tabel, right?
    So, follow the steps:
    1. Insert one sub form on your adobe form.
    2. Set its type as "flow content" in object->subform property.
    3. Set flow direction as "Table".
    4. Insert another subform inside this subform.
    5. set its type as "flow content" and flow direction as "Table row".
    6. Now, choose binding tab, and there check "repeat subform for each Data item check box" and specify min. count for your rows.
    7. Now, insert your column fields inside this sub form once.
    8. Format its look and feel as you want.
    When you run this application, it will show you multiple data as table on Adobe form.
    Regards,
    Bhavik

  • Problem displaying php page in dreamweaver

    I am having problems displaying php scripting on dreamweaver.
    Need your advice.
    Installed dreamweaver 8, Coldfusion 7, mysql, php5.2 (using
    windows installer).
    Created file test.php ror testing containing
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    </head>
    <body>
    date is:<b><?php echo Hello ?></b>
    </body>
    </html>

    ulises_arsi wrote:
    > I am having problems displaying php scripting on
    dreamweaver.
    Tell us what the problems are.
    > Installed dreamweaver 8, Coldfusion 7, mysql, php5.2
    (using windows installer).
    PHP needs to be configured with a web server, such as Apache
    or IIS.
    ColdFusion is also a webserver, but as far as I know, it
    cannot be
    configured to serve PHP pages.
    > date is:
    <?php echo Hello ?>
    The only thing that would display is an error message. Hello
    needs to be
    enclosed in quotes:
    <?php echo 'Hello'; ?>
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • 've recently upgraded to FireFox v22.0. Originally, a legacy XBAP I use always opened correctly in FireFox and had no problems displaying or running. As of v22.

    I've recently upgraded to FireFox 22. Originally, a legacy XBAP I use always opened correctly in FireFox and had no problems displaying or running. As of 22, it won't even attempt to download the application, let alone try and display it.
    I have the windows Presentation Foundation 3.5.30729.1 installed, which is the same version I have been using in older versions.
    Can anyone shed some light on any changes that would have effected this?

    Hi, I have a similar problem. I did attempt the *.rdf fix on a test system, but it didn't work (em:maxVersion was already 22).
    We got about inflow of phone calls from our clients experiencing the problem mentioned above from the 2nd of July onwards... and more are phoning in.
    All the complaints come from clients (+- 10 so far and rising in number) using Firefox v22 (we have checked), and all of them have said that it was working previously.
    We downgraded one of the clients to an older version of Firefox, and it worked again. So far we are telling our clients to downgrade until a fix comes out, or use Internet Explorer (*blush*)

  • Problem Displaying data from oracle in JTable

    Please can any one help me? I have a problem displaying the data fetched from oracle database(ResultSet) in JTables. Can any one provide me with any possible way out(and any alternative).

    User,
    As suggested in the other post - Google/Books/find a mentor is the best option.

  • Problems displaying itab with 'REUSE_ALV_GRID_DISPLAY'

    Hi experts!
    I have a problem displaying the internal table itab_test. Itab_uload is a TYPE TABLE of a complex and nested structure I defined in the DDIC. I am able to pass the entries, which are not conform with the specifications, to itab_test, but when I execute the program I get a short dump.
    Error message is:" It was tried to pass the internal table IT_FIELDCAT to the formal parameter IT_FIELDCAT. In doing so, a ^type conflict occured between the formal and the actual parameter."
    Can anybody please advise on the code-sample below. What did I wrong and what can I do to correct it?
    Thanks a lot for your help!
    Johann
    P.S.:Points will be rewarded for helpful answers!
    *&          DECLARATIONS
    TYPES: BEGIN OF error_test,
           oz TYPE c,
           bez TYPE c,
           END OF error_test.
    DATA: itab_test TYPE TABLE OF error_test WITH HEADER LINE,
          itab_upload TYPE TABLE OF zstr_gaeb WITH HEADER LINE.
    DATA: wa_upload TYPE zstr_gaeb,
          wa_lvbereich TYPE zstr_lvbereich,
          wa_bereichdeslv TYPE zstr_bereichdeslv,
          wa_beschreibung TYPE zstr_lvbeschreibung,
          wa_position TYPE zstr_position.
    DATA :      it_fieldcat TYPE lvc_t_fcat,
              wa_fieldcat LIKE LINE OF it_fieldcat,
              wrk_pos TYPE i.      
    *&           START OF SELECTION
    START-OF-SELECTION.
    LOOP AT itab_upload INTO wa_upload.
        LOOP AT wa_upload-vergabe-lv-lvbereich INTO wa_lvbereich.
          oz_len = STRLEN( wa_lvbereich-oz ).
          IF oz_len <> 3.
            MOVE wa_lvbereich-oz TO itab_test-oz.
            MOVE wa_lvbereich-bez TO itab_test-bez.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'oz'.
      wa_fieldcat-seltext = 'Ordnungszahl'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wrk_pos = wrk_pos + 1.
      wa_fieldcat-col_pos = wrk_pos.
      wa_fieldcat-tabname = 'ITAB_TEST'.
      wa_fieldcat-fieldname = 'bez'.
      wa_fieldcat-seltext = 'Bezeichnung'.
      wa_fieldcat-emphasize = ''.
      wa_fieldcat-hotspot = ''.
      APPEND wa_fieldcat TO it_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
         it_fieldcat                       = it_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
        TABLES
          t_outtab                          = itab_test
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

    Hello,
    Make the change like this
      DATA: L_R_REPID LIKE SY-REPID.
      L_R_REPID = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = L_R_REPID " CHeck here
    * I_INTERFACE_CHECK = ' '
    * I_BYPASSING_BUFFER = ' '
    * I_BUFFER_ACTIVE = ' '
    * I_CALLBACK_PROGRAM = ' '
    * I_CALLBACK_PF_STATUS_SET = ' '
    * I_CALLBACK_USER_COMMAND = ' '
    * I_CALLBACK_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_TOP_OF_PAGE = ' '
    * I_CALLBACK_HTML_END_OF_LIST = ' '
    * I_STRUCTURE_NAME =
    * I_BACKGROUND_ID = ' '
    * I_GRID_TITLE =
    * I_GRID_SETTINGS =
    * IS_LAYOUT =
    it_fieldcat = it_fieldcat
    * IT_EXCLUDING =
    * IT_SPECIAL_GROUPS =
    * IT_SORT =
    * IT_FILTER =
    * IS_SEL_HIDE =
    * I_DEFAULT = 'X'
    * I_SAVE = ' '
    * IS_VARIANT =
    * IT_EVENTS =
    * IT_EVENT_EXIT =
    * IS_PRINT =
    * IS_REPREP_ID =
    * I_SCREEN_START_COLUMN = 0
    * I_SCREEN_START_LINE = 0
    * I_SCREEN_END_COLUMN = 0
    * I_SCREEN_END_LINE = 0
    * I_HTML_HEIGHT_TOP = 0
    * I_HTML_HEIGHT_END = 0
    * IT_ALV_GRAPHICS =
    * IT_HYPERLINK =
    * IT_ADD_FIELDCAT =
    * IT_EXCEPT_QINFO =
    * IR_SALV_FULLSCREEN_ADAPTER =
    * IMPORTING
    * E_EXIT_CAUSED_BY_CALLER =
    * ES_EXIT_CAUSED_BY_USER =
    TABLES
    t_outtab = itab_test
    * EXCEPTIONS
    * PROGRAM_ERROR = 1
    * OTHERS = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    VAsanth

Maybe you are looking for

  • Bug #18104 still exists

    Hello, I am quite disappointed about BDB 5. One of the most nasty bugs (#18104) still exists. As soon as you want to use the set_thread_count() feature, BDB will not free the thread-control-block. If you connect/disconnect, BDB will stop working quit

  • JLabel, alternating labels

    I am trying to code a JLabel that will display one string for three seconds (or so), and then switch to a second string. I have three strings located in a vector that I want to switch between. The panel which will display this label is called from my

  • Indesign 5.5  a serious error was detected

    We have Indesign 5.5 that crashes everytime it's starts wiht the error message "A serious error was detected. Please restart...".  If I remove the plugins from the Applications\Indesign\Plugins folder it starts up with no problem. I've re-installed t

  • Songs will not play at all in iTunes 7.0.1 today.  Help?

    Installed new version last night. Everything worked fine, songs played after instal. Today, songs will not play. Display shows name of song, time, etc., but song will not start (time stays constant, progress meter does not move). Any ideas?

  • Erreur lors de la création de l'application

    Bonjour à tous, j'ai un petit soucis. j'ai corrigé un programme, qui a été développé sous Labview 2011 avec labview 2012. Au moment de re-créer mon application, j'ai un message d'erreur ( voir image jointe). j'ai donc enlever mes corrections, et re-e