Output jframe information to command window

Hi all I have a program that tracks the assets of a customer, kind of like a cart that holds cds, appliances, etc...
I wanted to be able to print out the results to the command window after they enter the number of how many items from what the user enters after they press "current status" or if they "delete" their current items. I want it to keep doing this until they close the window and exit the program. People have told me to add the System.out.println to where it says "delete" or "current status" but Im not sure how to add it in I will attach the code here. Thanks
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
public class TestProgram extends JFrame implements ActionListener{
   JLabel column1, column2;
   JLabel totalItems, totalCost;
   JLabel serialNum;
   JLabel electronics, autos, furnitures, cds;
   JButton TrackAssets, delete;
   JPanel panel;
   JTextField electronicsAsset, autosAsset, furnituresAsset, cdsAsset;
   JTextField serialNumber;
   JTextArea items, cost;
   // constructor to initialize the top variables/fields
   public TestProgram()
         column1 = new JLabel("Select Items");
     column2 = new JLabel("Specify Quantity");
     electronics = new JLabel("Electronics");
     electronicsAsset = new JTextField();
     electronicsAsset.addActionListener(this);
     autos = new JLabel("Autos");
     autosAsset = new JTextField();
     autosAsset.addActionListener(this);
     furnitures = new JLabel("Furnitures");
     furnituresAsset = new JTextField();
     furnituresAsset.addActionListener(this);
     cds = new JLabel("Compact Discs");
     cdsAsset = new JTextField();
     cdsAsset.addActionListener(this);
     serialNum = new JLabel("Serial Number input here");
     serialNumber = new JTextField();
     electronicsAsset.setNextFocusableComponent(serialNumber);
//Create labels and text area components
     totalItems = new JLabel("Total Items:");
     totalCost = new JLabel("Total Cost:");
     items = new JTextArea();
     cost = new JTextArea();
//Create buttons and make action listeners
     TrackAssets = new JButton("Current Status");
     TrackAssets.addActionListener(this);
     delete = new JButton("Delete all");
     delete.addActionListener(this);
//Create a panel for the components
     panel = new JPanel();
//Set panel layout to 2-column grid
//on a white
     panel.setLayout(new GridLayout(0,4));
     panel.setBackground(Color.white);
// add details
     getContentPane().add(panel);
     panel.add(column1);
     panel.add(column2);
     panel.add(electronics);
     panel.add(electronicsAsset);
     panel.add(autos);
     panel.add(autosAsset);
      panel.add(furnitures);
      panel.add(furnituresAsset);
      panel.add(cds);
      panel.add(cdsAsset);
     panel.add(furnitures);
     panel.add(furnituresAsset);
     panel.add(totalItems);
     panel.add(items);
     panel.add(totalCost);
     panel.add(cost);
     panel.add(serialNum);
     panel.add(serialNumber);
     panel.add(delete);
     panel.add(TrackAssets);
   public void actionPerformed( ActionEvent event ){
             // variables for method actionPerformed
             String output, output2;
             Object source = event.getSource();
             Integer electronicsNo, autosNo, furnituresNo, cdsNo, serialNum;
             // class responsible for showing different items
             AssetTracker tracker = new AssetTracker();
             Double cost;
             // program is instance of TestProgram creates a new file
             TestProgram program = new TestProgram();
            // if they track assets...
            if(source == TrackAssets){
              tracker.serialNum = serialNumber.getText();
              tracker.electronics = electronicsAsset.getText();
              tracker.autos = autosAsset.getText();
              tracker.furnitures = furnituresAsset.getText();
              tracker.cds = cdsAsset.getText();
         if(tracker.electronics.length() > 0){
                   //statement that might throw an exception
                   try{
                       electronicsNo = Integer.valueOf(tracker.electronics);
                       tracker.itotal += electronicsNo.intValue();
                     //find invalid number     
                     catch(java.lang.NumberFormatException e){
                       electronicsAsset.setText("Invalid Value");
                   else {
                         tracker.itotal += 0;
         if(tracker.autos.length() > 0){
                    //find invalid again
                     try{
                  autosNo = Integer.valueOf(tracker.autos);
                  tracker.itotal += autosNo.intValue();
           catch(java.lang.NumberFormatException e){
                  System.out.println("Invalid Value");
         else {
      tracker.itotal += 0;
    if(tracker.furnitures.length() > 0){
       //seek invalid numbers
     //statement that might throw an exception.
      try{
        furnituresNo = Integer.valueOf(tracker. furnitures);
        tracker.itotal +=  furnituresNo.intValue();
    // statements to be executed if a matching Java exception occurs in try.
      catch(java.lang.NumberFormatException e){
         furnituresAsset.setText("Invalid Value");
         else {
      tracker.itotal += 0;
    if(tracker.cds.length() > 0){
     //check then find invalid
      try{
        cdsNo = Integer.valueOf(tracker.cds);
        tracker.itotal += cdsNo.intValue();
      catch(java.lang.NumberFormatException e){
        cdsAsset.setText("Invalid Value");
      else {
      tracker.itotal += 0;
    // display
     serialNum = new Integer(tracker.itotal);
     output = serialNum.toString();
     this.items.setText(output);
     tracker.icost = (tracker.itotal * 300.00);
     cost = new Double(tracker.icost);
     output2 = cost.toString();
     this.cost.setText(output2);
   // electronics, autos, furnitures, cds
   // if user delete all items from assets
   if(source == delete){
     serialNumber.setText("");
     electronicsAsset.setText("");
     autosAsset.setText("");
     furnituresAsset.setText("");
     cdsAsset.setText("");
     serialNumber.setText("");
     tracker.icost = 0;
     cost = new Double(tracker.icost);
     output2 = cost.toString();
     this.cost.setText(output2);
     tracker.itotal = 0;
     serialNum = new Integer(tracker.itotal);
     output = serialNum.toString();
     this.items.setText(output);
  // main method
  public static void main( String[] args )
        TestProgram frame = new TestProgram();
          // title of JFrame
          frame.setTitle("Asset tracking program");
        // mew window created
        WindowListener l = new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                        System.exit(0);// exit
        // add window from package then show window
        frame.addWindowListener(l);
        frame.pack();
        frame.setVisible(true);

I don't understand the question. Are you telling us you don't understand how to use System.out.println(...);? How do you debug programs without using this method?
Usually the first program someone learns to write is something like:
public static void main(String[] args)
    System.out.println("Hello World");
after they press "current status" or if they "delete" their current itemsYou want to do some activity when the above actions occur. You must already have code in your program to do something in the above cases. So simply add the System.out.println(..) statements in the same part of code.

Similar Messages

  • Output plsql variable to command window

    I am executing a PLSQL stored procedure from my java class. I want to know how to output a variable within the PLSQL to the command window?
    thanks

    I don't understand the question. Are you telling us you don't understand how to use System.out.println(...);? How do you debug programs without using this method?
    Usually the first program someone learns to write is something like:
    public static void main(String[] args)
        System.out.println("Hello World");
    after they press "current status" or if they "delete" their current itemsYou want to do some activity when the above actions occur. You must already have code in your program to do something in the above cases. So simply add the System.out.println(..) statements in the same part of code.

  • How to redirect standard output/error of a ucb function to matrixx command window

    Is there a way to redirect standard output/error of a ucb function to matrixx command window?
    I know that the recommended way is to use stdwrt or XmathDisplay commands. However, we have some
    libraries that already exists which uses printf calls and I would like to redirect their output
    to the matrixx command window.
    Thanks

    Hi,
    What you need to do is create a printf function that will print the information into a string, then you can use stdwrt to display it in Xmath.
    Then you tell the UCB linking process to compile and link with this version of printf.c
    I am including the printf.c that we used to test the function you needed.
    Hope this helps.
    Attachments:
    printf.c ‏1 KB

  • Sending Command Window Output to File

    Okay, I'm guessing the "New to Java" is where I need to be for this kind of new programmer question. I'm working on a program for an assignment and I've completed the entire program and going back over the assignment I've realized that my quick reading has really messed me up. I was supposed to output all information to a file. However, I've already made the entire program using string buffers and out.printf / println's.
    So my newbie question would be, is there anyway I can code my program to take all the output that has been placed on the screen in the command line window and send it a text file at the close of the program? I know this seems weird but I don't really feel like fooling with debugging my whole program after trying to switch all my outputs to sending to a file.
    Can anyone help me? Let me know if you would like to see the code of the program, not sure if it would be helpful or not. And thank you SO much up front. Program is due Tuesday morning at 8am.
    -Kyle Andrews

    Thanks for the answers, I know for the assignment it was a bad idea. I was more going on the lines of a quick fix that might get partial credit. I googled a little bit about what you guys said and the amount of effort I would go through to pass the command line information to a text file seems almost more of a hassle than reprinting all my information to a text file and do my debugging from scratch. Thanks for the quick replies though. Both answers were helpful. Interesting stuff I learned about trying to find a quick fix.
    I was kinda hoping there was some kind of method somewhere that would read the contents of the command box and just ship it all to a file for storage. Thought maybe someone had done something like that, but it was a long shot.
    Thanks again. Hopefully one day I can actually be answering questions on here. This has been a great resource since I sifting through the archives for help a few weeks ago. Very thankful everyone is so helpful with all of us new programmers.
    Kyle Andrews

  • Outputting Servlet information to a new browser window

    I have a simple form that has a few input text fields and a button. When the button is clicked, the information is submitted to a servlet that uses the information to generate XML and display it on the browser window.
    My question is that is it possible to output the XML to a new browser window not the one where the information was submitted from?
    Example, I submit some information, a new window pops up displaying the XML. The form window remains as is and outputs a submitted message.
    Any code would be appreciated.
    Thanks
    Rizwan

    well thats realy not a servlet q, but a html/jsp q..
    your form submit should go to the same page as the form resides on..
    in your servlet you process and prepare the response
    in your formpage you should detect when a submit has taken place (request.getParam... some variable added in your response prepare
    if this is the case, use java script to open a new page (also posting your response information)
    brgds Per Fisker

  • Help needed extracting information from command output using sed

    I want to be able to pipe the output of:
    playerctl metadata
    into sed and extract only the relevant information. I have a working knowledge of regular expressions but I'm not how to get sed to only output the matched text. For reference, this is an example output of the playerctl command:
    {'mpris:artUrl': <'http://open.spotify.com/thumb/ddf652a13affe3346b8f65b3a92bd3abfdbf7eca'>, 'mpris:length': <uint64 290000000>, 'mpris:trackid': <'spotify:track:0xqi1uFFyefvTWy0AEQDJ7'>, 'xesam:album': <"Smokey's Haunt">, 'xesam:artist': <['Urthboy']>, 'xesam:autoRating': <0.23000000000000001>, 'xesam:contentCreated': <'2012-01-01T00:00:00'>, 'xesam:discNumber': <1>, 'xesam:title': <'On Your Shoulders'>, 'xesam:trackNumber': <6>, 'xesam:url': <'spotify:track:0xqi1uFFyefvTWy0AEQDJ7'>}%
    I'm trying to get the track name and artist name and combine them into one string. Perhaps sed isn't the tool for the job but I'm not really sure what else to try. Any help is very appreciated.

    If that was valid json, which it doesn't appear to be, you could use jshon to query it.
    Are you sure that is the exact output of the command? It looks sort of off...
    In the meatime, this is pretty hacky:
    awk 'BEGIN { RS=","; FS="'\''" }; /artist/ { artist = $4 }; /title/ { title = $4 } END { print artist": "title }' file
    Urthboy: On Your Shoulders

  • From command window to jframe

    Hi,
    i wrote a bunch of code that writes stuff into the command window (using that system.println thing) But now i've made a gui (just a jframe with a little text area, a menu and some buttons) how do i get everything thats written in the command window to get written into the gui inside that little text area without me changing lots of code?
    So in other words is there a way i get the command window to be inside my gui? Is this possible?
    Thanx :)

    you might be able to get the command window in your gui using a lot of native coding and C++ but I agree with Noah it would probably be a lot easier to just use TextArea.append() instead of System.out.println() then all your ouput will just get written in the text area on your gui.

  • How to display error messages and output from Matlab (which Matlab would typically send to its command window but no longer does when called by Labview) into Labview or allow it to be dumped into Matlab Command Window?

    Using Labview 6i and Matlab 6.1. I want to be able to see Matlab warnings and error messages either in the Matlab Command Window or in Labview itself. Currently Matlab is called by Labview (which is working). However I would like to debug and/or modify my Matlab script file to better understand how the two programs are interfacing. It is difficult since no data or messages can be displayed currently to the Matlab command window. I would like to change that if it is possible - Labview is suppressing that from happening. If not possible to send these
    messages to Matlab Command Window can I make it at least possible to see Matlab's actual warnings and/or error messages in Labview?

    I don't think you can debug your Matlab script from labVIEW. The following webpage talks about this:
    http://digital.ni.com/public.nsf/3efedde4322fef198​62567740067f3cc/19106e318c476e608625670b005bd288?O​penDocument
    My suggestion would be to write a script in Matlab and thoroughly test it before calling the script from a Matlab script node in LabVIEW.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • Showing output to a command window

    Hi Friends
    i have an application where i have implemented sockects (server-client) using
    client = new Socket(IP,port num); // client
    server = new ServerSocket(port num); // server
    clientSock = server.accept(); // server
    now im sending a SQL query from client to server and at server side i m executing it through jdbc.
    i have converted my server socket program to windows service(through some software). So there is no command prompt opened for the Server program.
    Now the proiblem is that my requirement is to open a new command window through my server program and show the return result from the query on that window and then close it.
    in my server prog i'have writen
    Process p = Runtime.getRuntime().exec("C:\\WINDOWS\\system32\\cmd.exe");
    but its not getting opened.
    if it does also, i dont have a clue how i'll send the data returned from the query to that window..
    HELP!!!!

    no my project reqirement is that we have to show it
    in command prompt window.
    Now im trying to open this command prompt from my
    server socket program. which is a windows service.
    now the problem is that cmd.exe is getting opened but
    im unable to see it bcoz it is getting opened in my
    server socket service's environment.
    What im looking for is to how to open cmd.exe in new
    environment and send some data to it to display on
    it???Why does it need to be shown in a command window? Is the user going to interact with the program (or the command window). If all you are doing is displaying a result a dialog is a much better answer. Ask your project management about it. If it is only that they like the way the command window looks (which is the only reason if the user does not need to interact with it) then set the back- and fore- ground colors and the font, so that it looks like the command window, and your good.
    If the user does not need to interact with the thing, then your program attempting to interact with a command prompt is only introducing a complication and a requirement that you don't need.
    Like I said, ask your project manager if you can use a dialog. It is not only easier, it is much more flexible (and sensible).

  • Printing out to command window project

    hi all, i have a question on this cart program i am making, i wanted to know how to output the results to the command window every time a person clicks on the "current status" of their purchase. I want it to print out like ( 5 boxes purhcased, 4 cds bought, serial number is 1234...... ) i want it to do this until the person exits out of the program.
    i have pasted the code below thanks :)
    (copy and paste )
    import java.awt.Color;
    import java.awt.GridLayout;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    public class TestProgram extends JFrame implements ActionListener{
    JLabel column1, column2;
    JLabel totalItems, totalCost;
    JLabel serialNum;
    JLabel electronics, autos, furnitures, cds;
    JButton TrackAssets, delete;
    JPanel panel;
    JTextField electronicsAsset, autosAsset, furnituresAsset, cdsAsset;
    JTextField serialNumber;
    JTextArea items, cost;
    public TestProgram()
         column1 = new JLabel("Select Items");
    column2 = new JLabel("Specify Quantity");
    electronics = new JLabel("Electronics");
    electronicsAsset = new JTextField();
    electronicsAsset.addActionListener(this);
    autos = new JLabel("Autos");
    autosAsset = new JTextField();
    autosAsset.addActionListener(this);
    furnitures = new JLabel("Furnitures");
    furnituresAsset = new JTextField();
    furnituresAsset.addActionListener(this);
    cds = new JLabel("Compact Discs");
    cdsAsset = new JTextField();
    cdsAsset.addActionListener(this);
    serialNum = new JLabel("Serial Number input here");
    serialNumber = new JTextField();
    electronicsAsset.setNextFocusableComponent(serialNumber);
    totalItems = new JLabel("Total Items:");
    totalCost = new JLabel("Total Cost:");
    items = new JTextArea();
    cost = new JTextArea();
    TrackAssets = new JButton("Current Status");
    TrackAssets.addActionListener(this);
    delete = new JButton("Delete all");
    delete.addActionListener(this);
    panel = new JPanel();
    panel.setLayout(new GridLayout(0,4));
    panel.setBackground(Color.white);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    getContentPane().add(panel);
    panel.add(column1);
    panel.add(column2);
    panel.add(electronics);
    panel.add(electronicsAsset);
    panel.add(autos);
    panel.add(autosAsset);
         panel.add(furnitures);
         panel.add(furnituresAsset);
         panel.add(cds);
         panel.add(cdsAsset);
    panel.add(furnitures);
    panel.add(furnituresAsset);
    panel.add(totalItems);
    panel.add(items);
    panel.add(totalCost);
    panel.add(cost);
    panel.add(serialNum);
    panel.add(serialNumber);
    panel.add(delete);
    panel.add(TrackAssets);
    if(tracker.electronics.length() > 0){
                   try{
                   electronicsNo = Integer.valueOf(tracker.electronics);
                   tracker.itotal += electronicsNo.intValue();
                   catch(java.lang.NumberFormatException e){
                   electronicsAsset.setText("Invalid Value");
                   else {
                        tracker.itotal += 0;
    if(tracker.autos.length() > 0){
    try{
    autosNo = Integer.valueOf(tracker.autos);
    tracker.itotal += autosNo.intValue();
    catch(java.lang.NumberFormatException e){
    autosAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.furnitures.length() > 0){
    try{
    furnituresNo = Integer.valueOf(tracker. furnitures);
    tracker.itotal += furnituresNo.intValue();
    }catch(java.lang.NumberFormatException e){
    furnituresAsset.setText("Invalid Value");
         else {
    tracker.itotal += 0;
    if(tracker.cds.length() > 0){
    try{
    cdsNo = Integer.valueOf(tracker.cds);
    tracker.itotal += cdsNo.intValue();
    catch(java.lang.NumberFormatException e){
    cdsAsset.setText("Invalid Value");
    else {
    tracker.itotal += 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    tracker.icost = (tracker.itotal * 300.00);
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    if(source == delete){
    serialNumber.setText("");
    electronicsAsset.setText("");
    autosAsset.setText("");
    furnituresAsset.setText("");
    cdsAsset.setText("");
    serialNumber.setText("");
    tracker.icost = 0;
    cost = new Double(tracker.icost);
    output2 = cost.toString();
    this.cost.setText(output2);
    tracker.itotal = 0;
    serialNum = new Integer(tracker.itotal);
    output = serialNum.toString();
    this.items.setText(output);
    public static void main( String[] args )
    TestProgram frame = new TestProgram();
              frame.setTitle("Asset tracking program");
    WindowListener l = new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    frame.addWindowListener(l);
    frame.pack();
    frame.setVisible(true);

    If you want to print out to the commmend line all you need to do if put in
    System.out.println(....whatever......);Add this line of code to whereever you click the button to display the users "current Status". In hte brackets is whre you put the details of what you want ot print out e.g. boxes purchaesd etc.
    Chris

  • Command window in a frame

    Hello,
    Is it possible to have a command window, by command window I mean the black window you get when you type cmd in run in windows or a shell in Unix, Linux, in a JFrame. I have a two web apps that I want their outputs/logs to be displayed in such frame plus tomcats output window.
    regards,
    Ehsan

    user2135732 wrote:
    I thinks I have not explained the problem correctly, I have two web applications that produce outputs, I want to display these outputs together with the server( this is in C) and tomcat outputs in a JFrame, yes I will be using a JTextArea or come other area but the question is how to redirect the output. How can I redirect the output of tomcat to a JTextArea, how can I do it with a server that sends it output to the standard output, stdio.Configure the server not to write the output to stdout, but instead a file. Then you can display the contents of that file.

  • Command window won't open Windows 8 (too) [SOLVED]

    I can't get the normal cmd window to open, in Windows 8. It was the same in Windows 7, so obviously something has been transferred (or remained unchanged) when I upgraded to Win8.
    Symptoms: I run cmd from win-R: conhost.exe is started every time, command window process is also started - BUT - there is no visible window! (Same if I run the command from the menu, run as administrator, whatever)
    I have seen this problem decribed by other users in the World for some time before, but still haven't found any solution.
    I suspect there is some policy setting, that prevents this window from opening. I found a proposed removal of policy settings; tried it, but it didn't make any difference.
    What policy settings could theoretically influence this?

    I can provide ProcMon output, but I can't interpret it - it's too much information for me.
    Perhaps a better tool would be ProcExp.  If the task is really there and you have cmd.exe which are both visible and invisible it can at least give you a clue about how it was started and its relationship with other started tasks.  
    ProcMon shows all the steps to producing the result that you are seeing.  You could start with a restrictive filter such as showing only Process & Threads and then comparing the patterns of successful and unsuccessful attempts at starting cmd.exe
    only from that perspective.
    Coincidentally I have just found a new toy you might be able to use easily for comparison purposes too:  wmic.exe
    E.g. for some capturable data about your problem tasks enter:
    process where name='cmd.exe' list /format
    Do it for conhost.exe too.
    C.f.
    http://technet.microsoft.com/en-us/library/bb742610.aspx#ECAA
    FWIW I have been oblivious of conhost.exe until seeing it mentioned in this incident.  What does it do?...
    I don't know but a search shows some other diagnostics which may also be easier to interpret than a ProcMon trace.  E.g. we should have thought about checking the Event log before this.  (But ProcMon would be showing you whether there
    was a write done to it as a result of your test.  <eg>)
    Good luck
    Robert Aldwinckle

  • Why it automatically recover current redo log in RMAN command window?

    Firstly, I restore controlfile and datafiles from a backupset.
    Then when I recover database in RMAN command window like below:
    RMAN> recover database;
    Starting recover at 15-AUG-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=156 devtype=DISK
    starting media recovery
    archive log thread 1 sequence 9 is already on disk as file /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd0slz_.arc
    archive log thread 1 sequence 10 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90sd0tsb_.arc
    archive log thread 1 sequence 11 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90sd110b_.arc
    archive log thread 1 sequence 12 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90sd2ksr_.arc
    archive log thread 1 sequence 13 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90sd2mc6_.arc
    archive log thread 1 sequence 14 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90sd2qrm_.arc
    archive log thread 1 sequence 15 is already on disk as file
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90sd2s0w_.arc
    archive log thread 1 sequence 16 is already on disk as file /u01/app/oracle/oradata/lonion/redo03.log
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd0slz_.arc thread=1 sequence=9
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90sd0tsb_.arc thread=1 sequence=10
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90sd110b_.arc thread=1 sequence=11
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90sd2ksr_.arc thread=1 sequence=12
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90sd2mc6_.arc thread=1 sequence=13
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90sd2qrm_.arc thread=1 sequence=14
    archive log filename=/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90sd2s0w_.arc thread=1 sequence=15
    archive log filename=/u01/app/oracle/oradata/lonion/redo03.log thread=1 sequence=16
    media recovery complete, elapsed time: 00:00:04
    Finished recover at 15-AUG-13
    RMAN>
    But, when I recover database in SQL*Plus command window like below:
    [oracle@lonion ~]$ uniread sqlplus /nolog
    [uniread] Loaded history (2178 lines)
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 15 19:25:38 2013
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL>
    SQL> recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
    SQL> recover database using backup controlfile;
    ORA-00279: change 2147842454 generated at 08/15/2013 18:34:28 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_%u_.a
    rc
    ORA-00280: change 2147842454 for thread 1 is in sequence #9
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00279: change 2147842651 generated at 08/15/2013 18:40:25 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_%u_.
    arc
    ORA-00280: change 2147842651 for thread 1 is in sequence #10
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_9_90sd
    0slz_.arc' no longer needed for this recovery
    ORA-00279: change 2147842653 generated at 08/15/2013 18:40:26 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_%u_.
    arc
    ORA-00280: change 2147842653 for thread 1 is in sequence #11
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_10_90s
    d0tsb_.arc' no longer needed for this recovery
    ORA-00279: change 2147842656 generated at 08/15/2013 18:40:32 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_%u_.
    arc
    ORA-00280: change 2147842656 for thread 1 is in sequence #12
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_11_90s
    d110b_.arc' no longer needed for this recovery
    ORA-00279: change 2147842684 generated at 08/15/2013 18:41:21 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_%u_.
    arc
    ORA-00280: change 2147842684 for thread 1 is in sequence #13
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_12_90s
    d2ksr_.arc' no longer needed for this recovery
    ORA-00279: change 2147842686 generated at 08/15/2013 18:41:23 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_%u_.
    arc
    ORA-00280: change 2147842686 for thread 1 is in sequence #14
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_13_90s
    d2mc6_.arc' no longer needed for this recovery
    ORA-00279: change 2147842689 generated at 08/15/2013 18:41:27 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_%u_.
    arc
    ORA-00280: change 2147842689 for thread 1 is in sequence #15
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_14_90s
    d2qrm_.arc' no longer needed for this recovery
    ORA-00279: change 2147842691 generated at 08/15/2013 18:41:28 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_16_%u_.
    arc
    ORA-00280: change 2147842691 for thread 1 is in sequence #16
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_15_90s
    g0or9_.arc' no longer needed for this recovery
    ORA-00279: change 2147842986 generated at 08/15/2013 19:14:29 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_.
    arc
    ORA-00280: change 2147842986 for thread 1 is in sequence #17
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_16_90s
    g0os5_.arc' no longer needed for this recovery
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    SQL> recover database using backup controlfile;
    ORA-00279: change 2147842986 generated at 08/15/2013 19:14:29 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_08_15/o1_mf_1_17_%u_.
    arc
    ORA-00280: change 2147842986 for thread 1 is in sequence #17
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/oradata/lonion/redo01.log        ---- Yon see, proceeding this process, it can't automatically apply the current redo log.
    Log applied.
    Media recovery complete.
    SQL>
    Question Coming:
    Now, my question is that 「Why it automatically recover current redo log in RMAN command window but not in SQL*Plus」?
    BTW: Please pay attention to the red font.

    It also seems not work.
    SQL> recover automatic database using backup controlfile;
    ORA-00279: change 2148632889 generated at 09/26/2013 12:45:22 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_.
    arc
    ORA-00280: change 2148632889 for thread 1 is in sequence #48
    ORA-00278: log file
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc' no longer needed for this recovery
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    auto
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-00308: cannot open archived log
    '/u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_
    .arc'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file
    or directory
    Additional information: 3
    SQL>
    It must specify the redo log.
    SQL> recover database using backup controlfile;
    ORA-00279: change 2148632889 generated at 09/26/2013 12:45:22 needed for thread
    1
    ORA-00289: suggestion :
    /u01/app/oracle/flash_recovery_area/LONION/archivelog/2013_09_26/o1_mf_1_48_%u_.
    arc
    ORA-00280: change 2148632889 for thread 1 is in sequence #48
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    /u01/app/oracle/oradata/lonion/redo02.log
    Log applied.
    Media recovery complete.
    SQL>

  • Error in WC dot 8 command window

    Hello -  I am struggling with this issue. I have created Managed Bean in WebCenter Portal Extension project (designwebcenterspaces) in Jdev 11.1.1.7 (just one method and register the bean request scope in faces-config).deployed the managed bean as WAR.  Managed Bean has OPSS API implementation and interacts with LDAP (against Default Provider in weblogic)
    updated the weblogic.xml with the above shared library (managed bean name) and deployed as extend.spaces.war .. have restarted the servers as required
    but as soon as i login to webcenter 8888 i get following error even before the home page show up..  Pl help what might go wrong OR is it a BUG in designwebcenterspaces ?
    Following is the stack from webcenter managed server  command window I get the very moment I hit the URL http://localhost:8888/webcenter       in browser
    <Mar 7, 2015 10:33:52 PM PST> <Warning> <oracle.adf.share.ADFContext> <BEA-00000
    0> <Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initializati
    on is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent
    For more information please enable logging for oracle.adf.share.ADFContext at FI
    NEST level.>
    <Mar 7, 2015 10:33:52 PM PST> <Warning> <oracle.webcenter.framework.view.support
    .impl.DeviceSupportUtils> <BEA-000000> <
    java.lang.NullPointerException
            at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1252)
            at java.util.ResourceBundle.getBundle(ResourceBundle.java:795)
            at oracle.webcenter.framework.view.support.impl.DeviceSupportUtils.getVa
    lue(DeviceSupportUtils.java:214)
            at oracle.webcenter.framework.view.support.impl.DeviceSupportUtils.getSe
    ededOptionalAttributes(DeviceSupportUtils.java:231)
            at oracle.webcenter.framework.view.support.impl.DeviceSupportUtils.getMa
    tchingSeededAttr(DeviceSupportUtils.java:3640)
            at oracle.webcenter.framework.view.support.impl.DeviceSupportUtils.conve
    rtSupportAttribtuesToAttribtues(DeviceSupportUtils.java:3608)
            at oracle.webcenter.framework.view.support.impl.DeviceSupportUtils.con

    There are two more bugs filed in Dot8 & Dot8 BP4 respectively :
    Bug 17173341 - NULLPOINTEREXCEPTION SEEN WHEN CREATING A PORTAL
    Bug 19682876 - NPE AT STARTUP.
    which are closed as a duplicate of the following bug pointed out by Kingsley_R
    Bug 17528953 - PORTAL CREATION THROWS NPE IN LOGS: DEVICESUPPORTUTILS.GETVALUE
    [ Source :: KM Note - NullPointerException seen in logs when starting up WebCenter Portal (Doc ID 1933824.1) ]
    FYI, The exception seen in the bug 19682876 is the closest match to the stack trace or exception from your query.
    The above bug 17528953 is already fixed in 11.1.1.9.0. You can request for a backport / one-off patch on top of Dot8 to see if it resolves the issue.
    I hope it helps!

  • How do I keep the command window open?

    I want to write a batch file that will leave the window open after running so I can see what the output is.
    I kind of remember having to use %k
    But I'm not sure exactly how to do it.
    UPDATE: I found what I was looking for, it's /k when you execute the command file.
    If anyone has any additional comments about scripting and keeping the command window open, please comment.

    Add "pause" to the end of the batch.
    ¯\_(ツ)_/¯

Maybe you are looking for

  • Which is better: Pages or Word for Mac?

    Hi everyone! I'm thinking about buying Pages but I never seen it in action. So to all of you who use Pages, please tell me how you like it. Domonique

  • A relative gave me her iPhone.  Is there a way to change the associated apple I'd to mine?

    A relative gave me her Iphone.  Is there a way to associate it to my own apple I'd.  Thanks

  • How to post an Idoc (INVOICE02) for non-po Invoice (MIRO transaction)

    Hi, I want to Post an Idoc for non-po vendor Invoice through MIRO transaction. I want to use INVOICE02 basic type. In the line item we need to enter G/L account , Cost center and line item amount. But I am not able to enter the same in the INVOICE02

  • Dbus does not start

    I just installed Arch (it is my 1st time) following beginners guide, I try to start dbus with /etc/rc.d/dbus {start} but I get: /etc/rc.conf: No such file or directory /etc/rc.d/functions: No such file or directory What could I do? Thank you Last edi

  • BAPI for FB05

    Hi! I'm new to BAPI programming, and I cannot find one to make clearing in FI, the same way FB05 does. For example, I post two documents using FB01, like this: Document 1: Item 1: Credit - account number: 1 Item 2: Debit  - account number: 2 Document