JTree Listener problem!

I have the following JTree:
[root] project
[node1] car
[node2 = child of node1] car_Info
[children of node2] color, length, engine, price, etc...(about 80 items)
I use polymorphism to implement this:
public interface NodeInfo {
public void select();
public class car implements NodeInfo {
// rest of car class
public void select() {
// car specific implementation
public class car_Info implements NodeInfo {
// rest of car_info
public void select() {
// car_info specific implementation
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
if (node == null) {
return;
NodeInfo nodeInfo = (NodeInfo) node.getUserObject();
nodeInfo.select(); // dynamic call to the actual runtime subtype of the NodeInfo object
How do i implement the leafs for my tree? (that is, color, length, etc....) And how can i put that into my valueChanged method?

I have the following JTree:
[root] project
[node1] car
[node2 = child of node1] car_Info
[children of node2] color, length, engine, price,
etc...(about 80 items)
I use polymorphism to implement this:
public interface NodeInfo {
public void select();
public class car implements NodeInfo {
// rest of car class
public void select() {
// car specific implementation
public class car_Info implements NodeInfo {
// rest of car_info
public void select() {
// car_info specific implementation
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node =
e = (DefaultMutableTreeNode)
tree.getLastSelectedPathComponent();
if (node == null) {
return;
NodeInfo nodeInfo = (NodeInfo)
fo) node.getUserObject();
nodeInfo.select(); // dynamic call to the actual
ual runtime subtype of the NodeInfo object
How do i implement the leafs for my tree? (that is,
color, length, etc....) And how can i put that into
my valueChanged method?the valueChanged method exists only to allow the model to notify the view that it has changed, so that the view may change accordingly
I don't understand what you mean with your last sentence

Similar Messages

  • Listening problem

    Ok here goes.
    I currently have a main Jframe which contains a splitpanel. On the left side the split panel there is a jtree which is generated using beans. A jtree listener loads on the right hand side diffarent jpanels which are on separate files(classes) depending on which node the user selected. The jpanels loaded contain textboxes, labels and a save button. The problem is, I need the main class(Frame) to know if the save button has been pressed so that I can refresh the tree. Do i need to use a listener on this external class???
    any help would be greatly appreciated!!
    Thanks in advance.

    You should make the main frame an action listener.
    public myFrame extends JFrame implements ActionListener Then add it to the save buttons' actionlisteners.
    saveButton.addActionListener(this);In the frame's actionperformed event, update the tree.
    public void actionPerformed(ActionEvent ae) {
        if (ae.getSource() == saveButton) {
            // do your updating
    }Here is a link that should help:
    http://java.sun.com/docs/books/tutorial/uiswing/events/index.html

  • JTree selection problem when using custom renderer and editor

    Hello:
    I created a JTree with custom renderer and editor.
    The customization makes JCheckBox to be the component
    responsible for editing and rendering.
    The problem is that when I click on the node with the checkbox
    the JTree selection model does not get updated.
    Without customizations of the editor and renderer the MouseEvent would be fired and BasicTreeUI$MouseHandler.mousePressed() method would call
    the selectPathForEvent() method which would be responsible for updating
    the selection model. At the same time if I attach a mouse listener to the JTree (customized) I see the events when clicking on the nodes. It seems like the MouseEvent gets lost and somehow as a result of which the selection model does not get updated.
    Am I missing something?
    Thanks
    Alexander

    You probably forgot to call super.getTreeCellRendererComponent(...) at the beginning of your getTreeCellRendererComponent(...) method in your custom renderer.
    Or maybe in the getTreeCellEditorComponent(...) of the TreeCellEditor...

  • JTree Refesh problem

    Hello --
    I've searched this subject ad nauseum on these forums and the rest of the web, and I'm still coming up blank.
    Basically, I have a file structure JTree. To do a "refresh" view, I basically kill the original object, and rebuild it again -- while first storing the last TreePath the user was on.
    Since this tree is built dynamically, placeholders are used to tell if the parent node has any children. From there, it looks up its children.
    During the refresh, I fire the tree.expandPath(path), and in my expansion listener, it should take care of the rest.
    Well, it seems like all the steps are going correctly, due to the debug output I'm getting, but I can't get the tree to scroll to the path. Here's the reload part:
    public void refreshTree(TreePath path){
       TP tp = null;
       Object [] obj = path.getPath();
         for (int i = 2; i <= obj.length; i++){
              tp = new TP(obj, i);     
             tree.expandPath(tp.getTP());
    //I've tried these in the for loop to no avail
    //               tree.setSelectionPath(tp.getTP());
    //              tree.scrollPathToVisible(tp.getTP());
           //this should be the last and final TreePath object
         tree.expandPath(tp.getTP());
         //tree.getSelectionModel().setSelectionPath(tp.getTP());
              tree.setSelectionPath(tp.getTP());
         tree.scrollPathToVisible(tp.getTP());
         //this class exists so I can build the treepath one
            //leaf at a time
         class TP extends TreePath{
              public TP(Object[] obj, int length){
                   super(obj, length);     
              public TreePath getTP(){
                   return this;
         }I've tried rebuild and all, and it seems like everything is doing what it's supposed to except drawing it right. Here's the code for the expansion:
    class selectionListener implements TreeExpansionListener{
       public void treeExpanded(TreeExpansionEvent evt){
         DefaultMutableTreeNode node = getTreeNode(evt.getPath());
         TreeNode firstBorn = node.getFirstChild();
         if (firstBorn.toString().equals(PLACEHOLDER)){
              System.out.println("made it");  //debug
              populateTree(evt.getPath());  //this gets the new stuff
      public void treeCollapsed(TreeExpansionEvent evt){}          
    }So, again, it seems like everything is firing the way it should, it's just not redrawing the tree to the current path.
    I'm on Java 1.4[02], Windows 2K, and JTree is set to SINGLE selection mode. If you need any additional information, please let me know.
    Thank you very much for your time.
    -Steve

    It seems that the tree is firing a node change itself, because I have code executing in the
    public void treeExpanded(TreeExpansionEvent evt)
    function.
    I also put a bit of debug code in... I have
    System.out.println("Is collapsed? " + tree.isCollapsed(tp.getTP()));
    Inside my for loop... the output is false everytime.
    So it seems that everything exists, it's just not repainting the gui for some reason or other. I'm not spinning off seperate threads to do anything, so I'd assume it's not a thread problem.
    Any ideas? This is really getting frustrating, for something I thought would be so simple.

  • Tree selection listener problem

    I have a JTree which uses a selection listener.
    I encounter a problem when I collapse a row while a leaf has focus.
    My program doesn't hang but so many error messages scroll up my prompt.
    How can I resolve this problem?
    Thanks!

    try to capture the error messages. If you are unable to get them from standard output, try redirecting to a file like:
    prompt>java samp > xwhere samp is your class file and x is the file your output is redirected to. After you collapse the leaf that has focus, close the application and open the file 'x'. Copy and paste the errors here.
    I'll see what I can do!

  • Message Listener Problem (iDoc)

    I am receiving an iDoc successfully in the Message Listener within Mii.  I have created a Processing Rule for the Message Type and tied it to a simple BLS.  The BLS has an XML input parameter which is selected in the Processing Rule.
    The BLS simply maps the XML input parameter to an XML output parameter and that's it as I want to make sure communication is working before creating any BLS logic.
    The iDoc Message goes into failure status and this is what I get in the log:
    Unable to process request com.sap.jms.client.message.JMSObjectMessage@431f1d25
    [EXCEPTION]
    com.sap.xmii.bls.exceptions.TransactionLoadException: Unable to create transaction instance
    Any ideas why this is happening?

    After much searching and trial and error, I was able to locate the source of this problem.  While I was modifying the "Log Level" in the Processing Rule, someone else changed the Transaction Security to include the "SAP XMII Developer" role.  Once I remove this role from the BLS, the same symptom occurs. 
    It seems this is the only role that allows the Processing Rule to trigger the BLS's.  Is this hard coded somewhere in Mii that this role is required?  If so where can I find these types of requirements so I can avoid going through this for other Mii functionality in the future?
    Thanks

  • HELP!!! Listener problem on AIX 4.1 with oracle 7.2.2.0

    When I try to do "lnsrctl start" (or stop) the server give to me the error below:
    Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=ora7))
    TNS-12224: TNS:no listener
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    IBM/AIX RISC System/6000 Error: 2: No such file or directory
    Connecting to (ADDRESS=(COMMUNITY=TCP.world)(PROTOCOL=TCP)(Host=BILANCIO)(Port=1521))
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    IBM/AIX RISC System/6000 Error: 79: Connection refused
    Connecting to (ADDRESS=(COMMUNITY=TCP.world)(PROTOCOL=TCP)(Host=BILANCIO)(Port=1526))
    TNS-12545: Connect failed because target host or object does not exist
    TNS-12560: TNS:protocol adapter error
    TNS-00515: Connect failed because target host or object does not exist
    IBM/AIX RISC System/6000 Error: 79: Connection refused
    On metalink, solutions are client side, but I have this problem on server side.
    I try to change host name to ip add, but problem persist.
    I try to reboot server (because I think the problem was the oracle istance) but the db works correctly.
    What can I do?
    thank u so much!!!
    pedro

    Hello Pedro,
    Please can you tell me if you resolved this issue you were having and how did you resolve this. I am having the same issue now....
    We did a restore to a different box and now cannot connect to the database and having same issues you described.
    Your help will be appreciated,
    Regards
    Avishkar Bandu

  • Oracle Listener Problem

    I am having a problem starting the Oracle Listener after a system crash on Windows NT.
    However, if I first connect to the internet and then try to restart, everything works ok.
    Why should I have to connect to the internet with my laptop in order to start the Oracle Listener?
    The message I am getting is as follows.
    C:\WINNT\Profiles\timh\Desktop>net start OracleStartORCL
    The OracleStartORCL service is starting..........
    The OracleStartORCL service was started successfully.
    C:\WINNT\Profiles\timh\Desktop>net start OracleTNSListener80
    The OracleTNSListener80 service is starting.
    The OracleTNSListener80 service could not be started.
    A system error has occurred.
    System error 1067 has occurred.
    The process terminated unexpectedly.
    null

    some more info.
    Given below is the output of status. does anything look bad or am I doing something wrong?
    for the service"abcd" it says has two instances, one of the status is unknown. does that matter is it always like that or I am asking very dumb questions?
    Please excuse me if that is the case.
    C:\lsnrctl status
    LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 23-JUL-2007 14:54:28
    Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=servername)(PORT=1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 9.2.0.1.0 - Produc
    tion
    Start Date 23-JUL-2007 10:27:09
    Uptime 0 days 4 hr. 27 min. 19 sec
    Trace Level off
    Security OFF
    SNMP OFF
    Listener Parameter File D:\oracle\ora92\network\admin\listener.ora
    Listener Log File D:\oracle\ora92\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain)(PORT=2100))(Presentation=FTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "abcd" has 2 instance(s).
    Instance "abcd", status UNKNOWN, has 1 handler(s) for this service...
    Instance "abcd", status READY, has 1 handler(s) for this service...
    Service "abcdXDB" has 1 instance(s).
    Instance "abcd", status READY, has 1 handler(s) for this service...
    The command completed successfully

  • JTree Inserting Problem

    Please help me ..
    i have write a code ..which is when the user clicks the button...
    a jtree table will come and the values inside the jtree will be filled by the contents of the selected items in the form...
    but my problem is jtree only is comming
    i created the object class ... but ...
    the initialisation is not happening...
    plz check the code below .. this is my class
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.sql.*;
    public class Reservation extends JFrame implements ItemListener,ActionListener{
         JComboBox fromCity = null;
         JComboBox toCity = null;
         JComboBox dDay = null;
         JComboBox dMonth = null;
         JComboBox dYear = null;
         JComboBox rDay = null;
         JComboBox rMonth = null;
         JComboBox rYear = null;
         JComboBox adult = null;
         JComboBox Cabin = null;
         JFrame table;
         public Reservation()
              setSize(600,400);
              JPanel p = new JPanel();
              //getContentPane().setLayout(new BorderLayout());
              GridBagLayout gbl = new GridBagLayout();
              GridBagConstraints gbc = new GridBagConstraints();
              p.setLayout(gbl);
              String []cities = {"New York","Chicago","Miami","Pittsburgh","Memphis","New Orleans"};
              String [] days={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","27","28","29","30","31"};
              String [] months = {"January","Feburary","March","April","May","June","July","August","September","October","November","December"};
              String [] year = {"2006","2007"};
              String [] adt = {"1","2","3","4"};
              String [] cab = {"Buisness","Economy"};
              fromCity = new JComboBox(cities);
              fromCity.setSelectedIndex(0);
              toCity = new JComboBox(cities);
              toCity.setSelectedIndex(0);
              dDay = new JComboBox(days);
              dMonth = new JComboBox(months);
              dYear = new JComboBox(year);
              rDay = new JComboBox(days);
              rMonth = new JComboBox(months);
              rYear = new JComboBox(year);
              adult = new JComboBox(adt);
              Cabin = new JComboBox(cab);
              JLabel frmCity = new JLabel("From");
              frmCity.setLabelFor(fromCity);
              JLabel tCity = new JLabel("To");
              tCity.setLabelFor(tCity);
              JLabel dDate = new JLabel("Departure Date");
              dDate.setLabelFor(dDate);
              JLabel rDate = new JLabel("Return Date");
              rDate.setLabelFor(rDate);
              JLabel Psg = new JLabel("Pasengers");
              Psg.setLabelFor(Psg);
              JLabel Adults = new JLabel("Adults");
              Adults.setLabelFor(Adults);
              JLabel cabin = new JLabel("Cabin");
              cabin.setLabelFor(cabin);
              JLabel search = new JLabel("Search By");
              search.setLabelFor(search);
              JRadioButton ROneWay = new JRadioButton("One Way");
              JRadioButton RRoundTrip = new JRadioButton("Round Trip");
              JButton searchbutton = new JButton("Date");
              ButtonGroup group = new ButtonGroup();
              group.add(ROneWay);
              group.add(RRoundTrip);
              gbc.gridx = 0;
              gbc.gridy = 0;
              gbc.insets = new Insets(0,30,0,0);
              p.add(frmCity,gbc);
              gbc.gridx =1;
              gbc.gridy = 0;
              gbc.insets = new Insets(0,30,0,0);
              p.add(fromCity,gbc);
              gbc.gridx =0;
              gbc.gridy = 1;
              gbc.insets = new Insets(0,30,0,0);
              p.add(tCity,gbc);
              gbc.gridx =1;
              gbc.gridy = 1;
              gbc.insets = new Insets(10,30,0,0);
              p.add(toCity,gbc);
              gbc.gridx = 0;
              gbc.gridy = 2;
              gbc.insets = new Insets(10,50,0,0);
              p.add(ROneWay,gbc);
              gbc.gridx = 1;
              gbc.gridy = 2;
              gbc.insets = new Insets(10,30,0,0);
              p.add(RRoundTrip,gbc);
              gbc.gridx = 1;
              gbc.gridy = 3;
              gbc.insets = new Insets(0,0,0,0);
              p.add(dDate,gbc);
              gbc.gridx = 0;
              gbc.gridy = 4;
              p.add(dDay,gbc);
              gbc.gridx = 1;
              gbc.gridy = 4;
              p.add(dMonth,gbc);
              gbc.gridx = 2;
              gbc.gridy = 4;
              p.add(dYear,gbc);
              gbc.gridx = 1;
              gbc.gridy = 5;
              gbc.insets = new Insets(0,0,0,0);
              p.add(rDate,gbc);
              gbc.gridx = 0;
              gbc.gridy = 6;
              p.add(rDay,gbc);
              gbc.gridx = 1;
              gbc.gridy = 6;
              p.add(rMonth,gbc);
              gbc.gridx = 2;
              gbc.gridy = 6;
              p.add(rYear,gbc);
              gbc.gridx = 1;
              gbc.gridy = 7;
              p.add(Psg,gbc);
              gbc.gridx = 0;
              gbc.gridy = 8;
              p.add(Adults,gbc);
              gbc.gridx = 1;
              gbc.gridy = 8;
              p.add(adult,gbc);
              gbc.gridx = 0;
              gbc.gridy = 9;
              p.add(cabin,gbc);
              gbc.gridx = 1;
              gbc.gridy = 9;
              gbc.insets = new Insets(10,0,0,0);
              p.add(Cabin,gbc);
              gbc.gridx = 0;
              gbc.gridy = 10;
              p.add(search,gbc);
              gbc.gridx = 1;
              gbc.gridy = 10;
              gbc.insets = new Insets(10,0,0,0);
              p.add(searchbutton,gbc);
              getContentPane().add(p);
              fromCity.addItemListener(this);
              toCity.addItemListener(this);
              dDay.addItemListener( this);
              dMonth.addItemListener( this);
              dYear.addItemListener(this);
              adult.addItemListener(this);
              Cabin.addItemListener(this);
              searchbutton.addActionListener(this);
              //Jtable form
              table = new JFrame();
              Container container;
              container = table.getContentPane();
              JPanel jpanel = new JPanel(new GridLayout(2,1));
              container.setLayout(new GridLayout(2,1));
              JLabel l1 = new JLabel("Departure Journey");
              l1.setLabelFor(l1);
              container.add(l1);
              final String[] colHeads = {"","Flightno","Date","Departure Time","Arrival Time","Flight","Duration","Fare"};
              final Object[ ][ ] data = new Object[10][10];
              JTable table = new JTable(data,colHeads);
              int v=ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;     
              int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
              JScrollPane jsp = new JScrollPane(table,v,h);
              container.add(jsp,BorderLayout.CENTER);
         String ffcity,ttcity,dday,dmon,dyear,adt,cab;
         public void itemStateChanged(ItemEvent e)
              ffcity = (String)fromCity.getSelectedItem();
              ttcity = (String)toCity.getSelectedItem();
              dday = (String)dDay.getSelectedItem();
              dmon = (String)dMonth.getSelectedItem();
              dyear = (String)dYear.getSelectedItem();
              adt = (String)adult.getSelectedItem();
              cab = (String)Cabin.getSelectedItem();
         public void actionPerformed(ActionEvent ae)
         if(ae.getActionCommand() == "Date")
              try
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection con = DriverManager.getConnection("jdbc:odbc:ds","sa", "");
              PreparedStatement stmt = con.prepareStatement("select ifno,vdtime,vatime,vdate1,vdate2,vdate3,efare from airways where fcity = ? and tcity = ? and vdate1 = ? and vdate2 = ? and vdate3 = ?");
              stmt.setString(1,ffcity);
              stmt.setString(2,ttcity);
              stmt.setString(3,dday);
              stmt.setString(4,dmon);
              stmt.setString(5,dyear);
              ResultSet d = stmt.executeQuery();
              /* int count=0;
              while(d.next())
              {count++;
              int i = 0;*/
              while(d.next())
              /*for(int j =1;j<=7;j++)
              data[i][j] = rs.getString(j);
              System.out.println(" " + data[i][j]);
              }i++;*/
              System.out.println(d.getInt(1));
              System.out.println(d.getDouble(2));
              catch(Exception ex)
                   System.out.println("Error occurred");
                   System.out.println("Error:"+ex);
              table.setVisible(true);
              table.setSize(300,200);
         private static void createAndShowGUI()
              JFrame.setDefaultLookAndFeelDecorated(true);
              Reservation r=new Reservation();
              JFrame frame = new JFrame("Reservation Form");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              //r.pack();
              r.setVisible(true);
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable(){
                   public void run()
                        createAndShowGUI();
    in this object creation is not happening
    when i run this code ...
    only jtree is comming..
    how can i make it the values of seceted items to come in table
    i commented the parts that having error..
    when u uncomment it u will get the problem of this code

    please anyone

  • 9.2 and 10g on same machine, listener problem

    Hi,
    i had a 10g db on a solaris server. then i installed a 9.2 database on this server. I know that i should use the 10g listener for 9.2 database.
    But i cant manage to configure it correctly.
    The 10g listener name is LISTENER and 9.2 listener name is TPRS.
    what i did ? i opened netmgr and created a new listener named TPRS. added the database to it.(on the menu database services)
    when i try to start TPRS i get the following error message
    bash-2.05$ lsnrctl start TPRS
    LSNRCTL for Solaris: Version 10.1.0.4.2 - Production on 08-JUN-2009 16:05:22
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    Starting /oracleAS/app/oracle/product/10.1.2.0.2/infra/bin/tnslsnr: please wait...
    TNSLSNR for Solaris: Version 10.1.0.4.2 - Production
    System parameter file is /oracleAS/app/oracle/product/10.1.2.0.2/infra/network/admin/listener.ora
    Log messages written to /oracleAS/app/oracle/product/10.1.2.0.2/infra/network/log/tprs.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sun3.tuprasnet.local)(PORT=1522)))
    TNS-01201: Listener cannot find executable /oracleAS/TPRS/app/oracle/product/9.2.0.1.0/bin/oracle for SID TPRS
    Listener failed to start. See the error message(s) above...
    The directory "/oracleAS/TPRS/app/oracle/product/9.2.0.1.0/bin/" exists , and oracle executable is under it. also /oracleAS/TPRS/app/oracle/product/9.2.0.1.0 is the oracle home for 9.2 database.
    The listener.ora file of 10g is like that:
    SID_LIST_TPRS =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = TPRS)
    (ORACLE_HOME = /oracleAS/TPRS/app/oracle/product/9.2.0.1.0)
    (SID_NAME = TPRS)
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /oracleAS/app/oracle/product/10.1.2.0.2/infra)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = iasdb.tuprasnet.local)
    (ORACLE_HOME = /oracleAS/app/oracle/product/10.1.2.0.2/infra)
    (SID_NAME = IASDB)
    TPRS =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sun3.tuprasnet.local)(PORT = 1522))
    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sun3.tuprasnet.local)(PORT = 1521))
    what am i missing?
    Thanks in advance,
    mehmet

    We (Gerwin and I) had a small discussion about the problem at hand.
    The discussion is overlooking the obvious
    TNSLSNR for Solaris: Version 10.1.0.4.2 - Production
    System parameter file is /oracleAS/app/oracle/product/10.1.2.0.2/infra/network/admin/listener.ora
    Log messages written to /oracleAS/app/oracle/product/10.1.2.0.2/infra/network/log/tprs.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sun3.tuprasnet.local)(PORT=1522)))
    TNS-01201: Listener cannot find executable /oracleAS/TPRS/app/oracle/product/9.2.0.1.0/bin/oracle for SID TPRSSo the Solaris user that starts the listener HAS NO ACCESS rights to the directory path and/or the executables (lsnrctl / tnslsnr).
    [oracle@srv01-18-102 bin]$ ps -ef|grep tns
    oracle   11967     1  0 Jun07 ?        00:00:53 /u01/app/oracle/product/11.1.0/dbhome_1/bin/tnslsnr LISTENER -inherit
    oracle   28694 17439  0 17:49 pts/0    00:00:00 grep tnsYou can choose for a "more than one listener" solution or "only one listener". Whatever you do the unix user that starts the oracle, listener executables have to be the same OR sicky bits have to exist on the executables (so the user is allowed to start the executables and access the memory realms as if it was the actual owner).
    The moment you don't use the defaults - aka "LISTENER" or a non default port (1521), you will have to define this via the database parameter
    LOCAL_LISTENER
    SQL> conn / as sysdba
    SQL> show parameter local_listener
    NAME                                 TYPE        VALUE
    local_listener                       string
    SQL> ALTER system SET LOCAL_LISTENER=
            "(ADDRESS=(PROTOCOL=TCP)(HOST=sun3.tuprasnet.local)(PORT=1522))"
            scope=BOTH;
    System altered.
    SQL> show parameter local_listener
    NAME                                 TYPE        VALUE
    local_listener                       string      (ADDRESS=(PROTOCOL=TCP)(HOST=sun3.tuprasnet.local)(PORT=1522))Now the database "knows" that it has to register itself against "sun3.tuprasnet.local" and will be serviced via port 1522.
    After been set on database level, the "LOCAL_LISTENER" value can be resolved via the string itself or (*most common way of doing it is using a tnsalias*) is resolved via the tnsnames.ora file (the string given in LOCAL_LISTENER is an tns ALIAS).
    If you use ONE listener, then databases can register themselves against SQL*Net compatible listeners. So you don't have to use a 9i listener for a 9i database. A 10g database is also allowed.
    If I use a ONE listener solution, then I normally pick the listener from the highest database version and let all database versions use this listener.
    The post given here (http://www.liberidu.com/blog/?p=116): "Registering non-default XMLDB HTTP/WebDAV and FTP ports on a non-default Oracle Listener port" describes a use case which is even more "extreem" regarding shared server functionality, based on TWO listeners and NON-DEFAULT PORT addressing, based on an Oracle 9 and Oracle 10 environment on the same machine.
    HTH
    M.
    Edited by: Marco Gralike on Jun 8, 2009 6:01 PM

  • OAS 4.0.8 http listener problems

    I am running OAS 4.0.8 on NT w/ SP5. I followed the instructions for install in the latest (Jan 2000) release notes. The problem I am having is with the listeners. The admin and www default listeners start up fine, but if I create a new listener, it will not start up. The error message tells me to check the NT Event log but there is nothing there. Also there is no svwww.err file available to check because it never starts!
    I am completely lost on this one. Any help is appreciated.
    Thanks

    Try to use root for startup. Remember that port bellow 1024 is protected for root only.
    SA

  • Listener problem

    Hello,
    I have created new database and added connection string in to tnsnames.ora file but i am not able to connect with new database remotely.
    my tnsnames.ora file
    $ cat tnsnames.ora
    # tnsnames.ora Network Configuration File: /opt/appl/oracle/product/10.2.0/db/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    PROD2=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 139.74.169.143)(PORT=1532))
    (CONNECT_DATA =
    (SID=ROD2))
    PROD=
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 139.74.169.143)(PORT=1532))
    (CONNECT_DATA =
    (SID=PROD)
    listener.ora
    $ cat listener.ora
    # listener.ora Network Configuration File: /opt/appl/oracle/product/10.2.0/db/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER_PROD =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/appl/oracle/product/10.2.0/db)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = PROD)
    (ORACLE_HOME = /opt/appl/oracle/product/10.2.0/db)
    (SID_DESC=
    (SID_NAME = PROD2)
    (ORACLE_HOME = /opt/appl/oracle/product/10.2.0/db))
    LISTENER_PROD =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 139.74.169.143)(PORT = 1532))
    LSNRCTL> status LISTENER_PDMPROD
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    Alias LISTENER_PDMPROD
    Version TNSLSNR for HPUX: Version 10.2.0.4.0 - Production
    Start Date 06-MAR-2011 07:16:52
    Uptime 0 days 0 hr. 39 min. 31 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /opt/appl/oracle/product/10.2.0/db/network/admin/listener.ora
    Listener Log File /opt/appl/oracle/product/10.2.0/db/network/log/listener_pdmprod.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=139.74.169.143)(PORT=1532)))
    Services Summary...
    Service "PDMPROD" has 1 instance(s).
    Instance "PDMPROD", status UNKNOWN, has 1 handler(s) for this service...
    Service "PDMPROD2" has 1 instance(s).
    Instance "PDMPROD2", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL> exit
    sqlnet.ora
    $ cat sqlnet.ora
    # sqlnet.ora Network Configuration File: /opt/appl/oracle/product/10.2.0/db/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    $ tnsping PDMPROD
    TNS Ping Utility for HPUX: Version 10.2.0.4.0 - Production on 06-MAR-2011 07:56:34
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    /opt/appl/oracle/product/10.2.0/db/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 139.74.169.143)(PORT=1532))) (CONNECT_DATA = (SID=PDMPROD)))
    OK (0 msec)
    $ tnsping PDMPROD2
    TNS Ping Utility for HPUX: Version 10.2.0.4.0 - Production on 06-MAR-2011 07:56:40
    Copyright (c) 1997, 2007, Oracle. All rights reserved.
    Used parameter files:
    /opt/appl/oracle/product/10.2.0/db/network/admin/sqlnet.ora
    TNS-03505: Failed to resolve name

    If you would have looked up TNS-03505 you would have been easily able to solve this error yourself.
    Please look up this error now, and refrain from redundant posting, violating the Forums Etiquette.
    Thank you !!!
    Others : please don't spoon feed, and promote laziness. The problem is very easy to spot.
    Sybrand Bakker
    Senior Oracle DBA

  • Menu/submenu managing and Event Listening problem

    Hi guys,
    I'm creating a flashwebsite and I've got a problem with submenu appearing/disappering.
    What is extremely easy in html/jquery is taking me overburned in actiuonscript: make appear a submenu only when the mouse cursor is over its button and not over itself.
    Indeed I've my button/MC, that contains its submenu (which is a vertical list of MC), and when I go over it, submenu appears, when I leave, sub menu becomes invisible.
    BUT, when I go over the space under the button (where my invisible submenu is), submenu become visible another time. I know that cause is the listener associated to the main button is linked to all its nested MC.
    My question is: there is a way to declare a listener only to a MC and not for all is nested elements?
    If not, what shopuld I do for my pourpose?
    function createNav(lang:String = 'it') {
        var nav:Array = new Array({label: "CHI SIAMO", url: "../chi-siamo/index.php"},
                                  {label: "PRODUZIONE ESECUTIVA", url: "../produzione-esecutiva/index.php"},
                                  {label: "FILMOGRAFIA", url: "../filmografia/index.php"},
                                  {label: "CAMPILOTS", url: ""},
                                  {label: "PROGETTI", url: ""},
                                  {label: "NEWS", url: ""},
                                  {label: "CONTATTI", url: ""},
                                  {label: "LINGUE", url: "", submenu:new Array({label:"ITALIANO", url:""},
                                                                               {label:"INGLESE", url:""},
                                                                               {label:"TEDESCO", url:""},
                                                                               {label:"FRANCESE", url:""}
        var navHeight:Number = 25;//single element height
       //BUTTON CREATION
        for (var i = 0;i < nav.length;i++) {
            var item:MovieClip = new NavLink();
            item.label.text = nav[i].label;
            item.href = nav[i].url;
            if(nav[i].submenu != null){    //SUBMENU CREATION
                for(var j:int = 0; j < nav[i].submenu.length; j++){
                    var subLabel = new SubLabel();
                    subLabel.x = subLabel.y = 18 * (j + 1);
                    subLabel.tfMC.text = nav[i].submenu[j].label;
                    item.addChild(subLabel);               
            item.buttonMode = true;
            item.mouseChildren = false;
            item.addEventListener(MouseEvent.CLICK, function(e) {
                href = e.target.href;
                gotoAndPlay('page2page');
            var subMenuAnim:Array = new Array();
            item.addEventListener(MouseEvent.MOUSE_OVER, function(e) {
                var iconCocc:MovieClip = e.target.coccinella;
                var iconRotTween:Tween = new Tween(iconCocc, "rotation", Back.easeOut, iconCocc.rotation, (iconCocc.rotation + ((Math.random() * 200) + 200)), 2, true);
                //APPREAING ANIMATION
            item.addEventListener(MouseEvent.MOUSE_OUT, function(e) {
                for(var i:int = 0; i < subMenuAnim.length; i++){
                   //DISAPPREAING ANIMATION
                subMenuAnim = new Array();
            item.y = navHeight * i;
            item.visible = false;
            item.coccinella.rotation = (Math.random() * 200);
            nav_container.addChild(item);

    What are you doing to make the submenu invisible?  If you set its visible property to false it should not interact with the mouse, but if you are changing its alpha property to 0, it will react.

  • Parallel Port Listener problem

    hello everyone,
    I have downloaded the javax.comm package and installed it as given in the installation instructions. I can print my files using the javax.comm classes. But i do not get the Parallel Port Event even if i register a listener.
    Also for all the methods such as is PrinterError(), isPrinterTimedOut(), isPaperOut() etc i do not get anything else but flase. Even if the printer is online or not, or if the paper is out etc, in all cases only false is returned by these methods. Please tel me what could be the problem.
    All these methods return false even when the printer is online or not :
    parallelPort.isPrinterBusy()
    parallelPort.isPrinterError()
    parallelPort.isPrinterSelected()parallelPort.isPrinterTimedOut()
    parallelPort.isPaperOut()

    Well, i think you should be looking for specs about the printer(s) to find out how they communicate with windows. That might not be that easy because not all company's will be very open about that. You should realise that any message windows gives you about the printerstatus comes to you via the drivers for that printer. The drivers know how to communicate with the printer, and that's different per printer.
    The most used standard for printing is Postscript (I believe HP6L is a postscript printer) wich is supported by the 'bigger' printers. There will be info about Postscript on the web, but it is owned by Adobe and I son't know how free the specs are...
    An older dot matrix printer is more likely to be using the lines that are signal out busy, error etc. You will find the pin layout here: http://www.doc.ic.ac.uk/~ih/doc/par/doc/regpins.html
    If all your after is printing your files you might want to use java.awt.PrintJob wich will let you print through the spooler of the operating system, thus letting the OS handle the printer with the right drivers.

  • HTTP Listener problems

    Good day all,
    I have some problems regarding HTTP Listener:
    1. I cannot startup my www listener on port
    80, only Node Manager listener can be
    started. It gives out the errors:
    OWS-08811 & OWS-08851.
    2. I even cannot either view or edit the
    configuration for my HTTP listener.
    When I clicked on the properties such
    as Network, Server, etc, it just doesn't
    show up the configuration that I needed
    to see.
    I have already checked the environment variable: WV_GATEWAY_CFG, and it is in the right path. What could possibly went wrong?
    This is the specification of my installed products:
    Platform: Windows 2000
    DB: Oracle 8i Enterprise Edition 8.1.7.0.0
    Oracle 9ias 4.0.8.2.1a
    Any ideas? Thanks.
    - Alfian
    null

    As far as I know, there is no utilities to view the configuration as you have mentioned. All configurations are in configure files,
    they are
    httpd.conf
    jserv.conf
    jserv.properties
    zone.properties
    If someone does know such a utility, please tell me. :-)
    Regards,
    --tao                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • XML publisher with graph not refresh date

    Hi I use EBS r12, and i create report using XML and BI Publisher rtf file, this report include graph, the problem is when i add the graph according to xml data and run the report throw bi publisher desktop its work fine, but when i run it in concurre

  • Accidentally deleted firefox "profiles.ini" and now says firefox is already running when I try to open it.

    Accidentally deleted firefox "profiles.ini" and now says firefox is already running when I try to open it. "a copy of firefox is already open. only one copy of firefox can be open at one time. Now I'm aware this happens often and people have posted s

  • Power Reset error message All-in-one 6310xi

    I have an Officejet All-in-one 6310xi.  I have had it for several years, and it has worked well.  Recently, for no apparent reason the on/off button will flash and the message "power reset" will appear.  If I restart the power, it will restart and wo

  • Do you offer a trial pdf to excel conversion?

    I have a few dozen pdfs that I would like to convert to excel to make the data more easily searchable and sortable. Is it possible I could get a trial to convert one of the files to see how it works before purchasing a whole year? Frankly, I have my

  • Photoshop CS very slow startup

    I'm running CS on a XP Pro SP2 PC, and have been running it since 2004 with no problems until last fall. For no reason I can figure out it stopped starting up. No new software, no viruses, I checked. I would get just a grey window with no credits and