Socket buffered read yields corrupt data

While trying to read from a socket, the data gets corrupted:
First, from telnet, I send the length of the data: 12<enter>
Then I send the data: this is some data
The server only displays part of the data:
�� = some unprintable character (I can't even copy it from the console)
examples:
SEND 11<enter>
SEND this is a test for
System.out.println yields: "this is &#8234;������"
SEND 11<enter>
SEND this is a test for socket data
System.out.println yields: "this is &#8234;������"
SEND 13<enter>
SEND this is a test for socket data
System.out.println yields: "this is &#8234;����������"
SEND 13<enter>
SEND this is a test for socket data, yes, for sockets
System.out.println yields: "this is &#8234;����������"
SEND 20<enter>
SEND this is a test for socket data, yes, for sockets
System.out.println yields: "this is ������������������������"
s_out = new PrintWriter(s_socket.getOutputStream(), true);
s_in = new BufferedReader(new InputStreamReader(s_socket.getInputStream()));
AProtocol proto = new AProtocol();
int data_length = 0;
while (proto.state != STATUS_GOODBYE){
     switch (proto.state) {
     case STATUS_WAITING_LENGTH :
          inputLine = s_in.readLine();
          s_out.println(proto.processInput(inputLine));
          if (proto.state == STATUS_WAITING_DATA){
               data_length = Integer.parseInt(inputLine.trim());     
          break;
                              case STATUS_WAITING_DATA :
          inarray = new char[data_length];
          if ((count = s_in.read(inarray,0,data_length)) >= 0){
               inputLine = String.valueOf(inarray);
               proto.processInput(inputLine);
               if (proto.state == STATUS_WAITING_LENGTH){
                    System.out.println("*" + inputLine + "*");
          break;
}

It looks like you're writing bytes, but reading them as Java characters (e.g., Unicode).

Similar Messages

  • Buffered reader / data inputstream

    I need to find out how to enter array numbers in from the keyboard
    i think it might be by using buffered reader, but i dont know th exact code can
    anybody help me!
    Cheers

    Do you need to keep array of numbers?
    It's simply and not powerfull solution:
    import java.io.*;
    import java.util.Vector;
    public class test
    public static void main (String argv[])
    BufferedReader theIn = new BufferedReader (new InputStreamReader (System.in));
    int nValue;
    int nSumma = 0;
    Vector theItems = new Vector (0, 10);
    while (true)
    try
    nValue = Integer.parseInt (theIn.readLine ());
    nSumma += nValue;
    theItems.addElement (new Integer (nValue));
    catch (Exception e)
    break;
    System.out.println ("Summa: " + nSumma);
    }

  • How to get rid of other/corrupt data?

    My phone:  iPhone 4s, 16gb, newest IOS 8.1 (newest right now) / Newest iTunes on computer
    Multiple times now under IOS 8, I've attempted to sync my phone (only music) and suddenly 9+ gb of `other` data appear when I plug in my phone, which then deletes nearly all my music (which takes up about 8gb).  The red circle and square appear and I cannot play any songs.
    I`ve tried restoring to new, but I don`t want to lose all my texts/contacts/notes etc. so I always end up backing it up, only to get the same problem yet again.  This is the 4th time now and sometimes it ends up going away but this time it isn't and it has been weeks.
    When I check my data usage under my settings it says I have little to no space available, yet when I look at the division of the data between apps, my music is the highest at 750mb (the 100ish of my favourite songs i was able to squeeze into the space available), so i assume there is some sort of corrupt data I am unaware of.
    I've called apple help in the past which fixed the problem by playing with my itunes and icloud sign in settings.  It fixed the issue, only to have it return the next week when I synced it again.
    Has anyone else had this problem?  If so, what did you do to make it go back to normal?
    Also, is there a way to restore to new, but also keep all texts/contacts/notes?  As I can simply re download apps and sync my music from my computer.
    Thanks for the help!

    ca$hbury828 wrote:
    I`ve tried restoring to new, but I don`t want to lose all my texts/contacts/notes etc. so I always end up backing it up, only to get the same problem yet again.
    Yes, because you have corrupted data in your back up. As long as you keep loading from that corrupted back up, you'll have the same problem.
    Your notes and contacts should be synced to something (e.g. iCloud, Gmail, etc). If you restore the phone as new and resync, you shouldn't loose them. Texts are a bit tricker. I use PhoneView (Mac) to make archive PDFs of text messages I want to keep. TouchCopy works for Mac and Windows. There's no good way that I know of to reload the texts. However, they may be part of the problem so, you may be better off archiving them (you could always copy a PDF of the texts back to the phone) and starting fresh.
    Best of luck.

  • Computer is balky random freezes across apps. Two hard drive cleans later (their scan reveals no hard drive problems) photo shop won't work at all, magic touch mouse inoperable and their diagnoses is corrupted data? Anybody heard of this?

    Computer is balky random freezes across apps. Two hard drive cleans later (their scan reveals no hard drive problems) photo shop won't work at all, magic touch mouse inoperable and their diagnoses is corrupted data? Anybody heard of this?

    Well, yes, data does get corrupted sometimes.
    The trick is finding what data.
    By 'cleaned' are you therefor meaning that the drive has been erased and the system re-installed?
    Because that's the quickest way to deal with such a situation.
    Back up the system first of course,
    Add back 3rd party apps one at a time in case one of them is causing the problem.

  • How can i check for corrupt data

    I have a lot of machine embroidery designs stored on my imac and have reason to believe some may have corrupt data which is not evident when opening but has caused major damage to memory board in sewing machine. Is there anyway to scan for corrupt files?

    My wifes sewing machine is in for service and repair because a couple of designs in the memory have somehow become too big for the machine to open them so it is not possible to edit or delete them. I sent the designs to brother and their machines developed a problem as well so they had to change the memory board and they can only put it down to a corrupt file even though they can't prove it as virus scans show all clear and the designs work fine on the computer with the sewing software program. Our machine worked fine except for not being able to remove 3 designs. Brother said their machines version number changed and also couldn't remove the designs. I have read that if a file is corrupt, backup software will detect it but again no problem there. I have sent the suspect designs to someone in the US who is going to access the design and see if they can find anything but at the moment I can't get any answers because its never happened before. Any ideas would be greatly appreciated.
    Regards
    Dennis

  • 10 GB of Corrupted Data

    So today I attempted to update my phone from iOS 7.0 to 7.0.4. Near the end of the update I got an error message on my iTunes (I believe it was error 006, but I could be wrong) and my phone became frozen in the updating screen with the loading bar. iTunes suggested that I restore my phone to factory settings and then restore it again with a backup from earlier today, which I proceeded to do. Upon restoring my phone and attempting to sync all my data, I got an error message saying that I did not have enough room on my phone for everything and that I needed to delete 4 GB of data.
    At this point I realized that my phone had 10 GB of "Other" clogging up all the space. Before this whole debacle my "Other" section was approximately half a gigabyte, if even. Now it's preventing me from accessing any of my beloved music on my phone. I scoured the various settings on my iTunes and my phone in an attempt to find a solution, but to avail. I tried restoring my phone to a backup from earlier today only to find that the 10 GB of Other was still present. In one last desparate attempt, I tried to restore my phone to a backup from September that I had created prior to updating to iOS 7. To my dismay, this failed as well.
    Long story short, I have 10 GB of corrupted data on my phone that refuses to go away despite all my attempts. I'm tired and desparate guys, is there anything I can do. Or should I just give up and live with the 10 gigs? It seems unescapable at this point.

    I hopefully have a solution for you as prior to writing this, i too had 10g of "other." My solution was actually quite simple.. Remove all music and sync, and then re sync the music back on. It actually fixed this is uner 2 minutes(yes un-installing, and re-installing music) for some reason was done extemely quick, and I now have 1.3g of "other" I think it was syncing songs twice..I really hope this helps you as i was extremely frustrated myself until i fixed it.

  • HELP - Buffered Reader

    Below is a portion of my program, its a simple app, that is supposed to read a policy number, and then display the results. I can't get it to read the file, or output onto the app. Any help would be appreciated.
    the file is called loans.txt and a line looks like this...
    12322|Smith, Dennis|456 Westfield Blvd|Westfield, IN 46033|$2,500|1/1/2001|7/11/2005|None
    public void GetFile(){
    //User's entered policy number is stored here
    String Policy_Num_Entered = SearchFor.getText();
    /*If the the policy is found in loans.txt, sucess will be changed to 1,
    otherwise it will stay 0 and be used to output a "I'm Sorry message*/
    int sucess = 0;
    //Try Catch Block
    try{
    BufferedReader br = new BufferedReader(new FileReader(file));
    //Access the first line of loans.txt
    String line = br.readLine();
    //Read the # of lines in loans.txt
    LineNumberReader read = new LineNumberReader(new FileReader(file));
    //Assign the # of lines to count
    int count = read.getLineNumber();
    //Item being looked by the String Tokenizer
    String Item;
    //For loop, looping the # of times a line must be read
    for(int x = 0; x < count; x++){
    //While Line is not empty, proceed
    while ( line != null )
    //Read individual words of the line from loans.txt
    StringTokenizer tokenizer = new StringTokenizer(line, "|");
    Item = tokenizer.nextToken();
    //While the line has more words
    while(tokenizer.hasMoreTokens() )
    //If Word equals "The" add 1 tot he sum
    if(Item == Policy_Num_Entered){
    //Fill in policy Number
    Policy_Number.append(Item);
    Item = tokenizer.nextToken();
    //Fill in First and Last Name
    Name.append(Item);
    //Item = tokenizer.nextToken();
    //Name.append(" " + Item);
    Item = tokenizer.nextToken();
    //Fill in Address
    Address.append(Item);
    Item = tokenizer.nextToken();
    //Address.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Address.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Fill in City, State and Zip Code
    City_St_Zip.append(Item);
    Item = tokenizer.nextToken();
    //City_St_Zip.append(" " + Item);
    //Item = tokenizer.nextToken();
    //City_St_Zip.append(" " + Item);
    //Item = tokenizer.nextToken();
    //Fill in Loan Balance
    LoanBal.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Effective Date
    LoanEffDate.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Maturity Date
    MatDate.append(Item);
    Item = tokenizer.nextToken();
    //Take all the words that are left to fill in Notes
    //while(tokenizer.hasMoreTokens() ){
    Notes.append(" " + Item );
    Item = tokenizer.nextToken();
    //end of while has more tokens
    //Item found so change to 1
    sucess = 1;
    //Break out of the loop
    break;
    }//end of If
    //Grab the next word
    Item = tokenizer.nextToken();
    }//end of while tokenizer
    }//end of while
    //Read the next line
    line = br.readLine();
    }//for loop
    if(sucess == 0)
    JOptionPane.showMessageDialog(Finalapp.this, "I'm sorry the Policy " +
    Policy_Num_Entered + " was not found. Please try "+
    "again.");
    //Close the buffered Reader, and close the .dat file
    br.close();
    }//End of try
    //Catch any errors that may have occured in the reader
    catch(IOException exception)
    exception.printStackTrace();
    }//end of catch
    }//end of GetFile

    Ok I know that my line reader was messing up, so it was never running the loop, my new code reads like this...
    public void GetFile(){
    //User's entered policy number is stored here
    String Policy_Num_Entered = SearchFor.getText();
    /*If the the policy is found in loans.txt, sucess will be changed to 1,
    otherwise it will stay 0 and be used to output a "I'm Sorry message*/
    int sucess = 0;
    //Try Catch Block
    try{
    BufferedReader br = new BufferedReader(new FileReader("loans.txt"));
    /*FileInputStream file = new FileInputStream("c:\\loans.txt");
    BufferedReader br = new BufferedReader( new InputStreamReader( file) );*/
    //Access the first line of loans.txt
    String line = br.readLine();
    //Read the # of lines in loans.txt
    LineNumberReader read = new LineNumberReader(new FileReader("loans.txt"));
    //Assign the # of lines to count
    int count = 7;//read.getLineNumber();
    Policy_Number.append(count + " ");
    //Item being looked by the String Tokenizer
    String Item = null;
    //For loop, looping the # of times a line must be read
    for(int x = 0; x < count; x++){
    //While Line is not empty, proceed
    while ( line != null )
    //Read individual words of the line from loans.txt
    StringTokenizer tokenizer = new StringTokenizer(line, "|");
    Item = tokenizer.nextToken();
    //While the line has more words
    while(tokenizer.hasMoreTokens() )
    //If Word equals "The" add 1 to the sum
    if(Item == Policy_Num_Entered){
    //Fill in policy Number
    Policy_Number.append(Item);
    Item = tokenizer.nextToken();
    //Fill in First and Last Name
    Name.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Address
    Address.append(Item);
    Item = tokenizer.nextToken();
    //Fill in City, State, ZIp Code
    City_St_Zip.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Balance
    LoanBal.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Loan Effective Date
    LoanEffDate.append(Item);
    Item = tokenizer.nextToken();
    //Fill in Maturity Date
    MatDate.append(Item);
    Item = tokenizer.nextToken();
    //Take all the words that are left to fill in Notes
    Notes.append(" " + Item );
    Item = tokenizer.nextToken();
    //Item found so change to 1
    sucess = 1;
    //Break out of the loop
    break;
    }//end of If
    //Grab the next word
    Item = tokenizer.nextToken();
    }//end of while tokenizer
    //Read the next line
    line = br.readLine();
    }//end of while
    }//for loop
    if(sucess == 0)
    JOptionPane.showMessageDialog(Finalapp.this, "I'm sorry the Policy " +
    Policy_Num_Entered + " was not found. Please try "+
    "again.");
    //Close the buffered Reader, and close the .dat file
    br.close();
    }//End of try
    //Catch any errors that may have occured in the reader
    catch(IOException exception)
    exception.printStackTrace();
    }//end of catch
    }//end of GetFile

  • Unable to drop materialized view with corrupted data blocks

    Hi,
    The alert log of our database is giving this message
    Wed Jan 31 05:23:13 2007
    ORACLE Instance mesh (pid = 9) - Error 1578 encountered while recovering transaction (6, 15) on object 13355.
    Wed Jan 31 05:23:13 2007
    Errors in file /u01/app/oracle/admin/mesh/bdump/mesh_smon_4369.trc:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    No one is using this mview still oracle is trying to recover this transaction (6, 15).
    when i tried to drop this mview it gives me this error
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
    ORA-06512: at line 1
    I have tried to fix the corrupted data blocks by using dbms_repair package, but of no use.
    I have marked this block to be skipped by using dbms_repair.skip_block but still unable to drop it.
    Please suggest what should I do?
    Thanks in advance
    Anuj

    You are lucky if only your undesirable MV is affected by theese corrupted blocks. This is an advice to do a complete-super-full-hot-cold-middle backup of ypur database and search for any disk for a "possible replace".
    God save us!

  • Acrobat will not download, message Reliable source serving corrupt data

    I have purchased a subscription to Adobe Acrobat for my new Lenovo Think Pad. I white listed to the website in my anti-virus. But even then, the program will not download and I get the message Reliable source serving corrupt data.

    [discussion moved to Acrobat Installation & Update Issues forum.]

  • Buffered Reader question.

    I am writing a program that reads data from multiple text files.
    When the program would need to read data from a different file I just reasigined the Buffered Reader object. For example:
    reader = new BufferedReader(new FileReader(new File(<name of first file>)));
    reader = new BufferedReader(new FileReader(new File(<name of second file>)));
    Is this a good method to use, or is it better to instanciate a new buffered reader object for each file?

    It is fine, the old reader will be GCed after a while.
    However, you might want to close the stream before just dumping the old one, as OSes have a limit on the number of files an app can open at one time. Plus it might leave the file locked, so other apps can not use said file.

  • Corrupt Data File Quicken 2007 for Mac (Lion)

    Bought QM 2007 for Mac (Lion compatible) and without touching my personal data file, opened a new file and immediately got the "...corrupt data in data file" message. I've tried everything I could find including: trashing the Quotes file, my old Quicken 2006 app, removing any 3vix files, intuit preferences, etc. Nothing helped. I then ran QM2007 on Snow Leopard with my old data file, and after trashing the Quotes file, it worked. So I saved this file and transfered it to my Lion machine, trashed the quotes file. Same error, ...data corrupted. Thinking it's my Lion machine, I opened it in Safe mode...no help. Created a new account...no help. Imported .qif file..no help. I've searched the Quicken forum...no help. I'm very desparate; anyone have any ideas?
    Mac OS X 10.7.5, Mac Pro (2012), Quicken 2007 for Mac (Lion) 16.1.4.

    Thanks, Baltwo. I'm convinced it's something about my Lion installation that's the cause, since others as yourself seem to be OK—although I haven't been able to run it down. The Quicken 2007 is a fresh installation, each time I try out a new approach, I reinstall the software. Now perhaps it's accumulating some ancillary file that doesn't get trashed, but I can't run that down. I did find something interesting in my systematic search for a cause, and that is that when i install it on my Snow Leopard machine, it works fine with a new, unpopulated data file. But if I re-index my Q 2006 file, trash my Quotes file, then import it into QM 2007, the "corrupt data error" comes up. So I know everything (the QM 2007-Lion) works in Snow Leopard without prior re-indexing the data file, just not in Lion. So I saved my data file that worked in the Snow Leopard version (so it's now a QM 2007-Lion file), try to open it on my Lion machine with a new QM 2007-Lion install, and the corrupt data error appears. As I said above, opening in Safe mode, creating a new account, running my disk through Disk Utility and fixing permissions, nothing has worked so far.
    So I bit the bullet and created a Snow Leopard virtual machine (Server version) with my Parallels, and it finally works, including downloading my investment, credit card, etc. accounts. Now I can move on with my taxes, but I'm still perplexed why Lion won't let me run it. I don't like my SL VM because Parallels won't permit coherence, so it's kind of kludgy.
    That's my story after many hours of troubleshooting. I hope this helps someone else with the same problem. Thanks for trying to help.

  • Datafile not restored due to missing or corrupt data

    Hi all,
    I was asked to restore a RMAN backup which we got from another region, the rman backup contains controlfiles and datafiles as compressed backupset.
    oracle version is 10.2.0.3.0
    aix version 6
    First, I have restored the control file using the below command:
    run
    +{+
    allocate channel t1 type disk;
    restore controlfile from '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    alter database mount;
    +}+
    Second, I have cataloged the backup piece:
    catalog backuppiece '/oracle/app/prod/rman/df_t794754324_s12_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t793567544_s13_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t731097654_s14_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792538698_s15_p1';
    catalog backuppiece '/oracle/app/prod/rman/df_t792183472_s16_p1';
    catalog backuppiece '/oracle/app/prod/rman/cf_t799873684_s17_p1';
    Third, used below command to restore:
    +run {+
    allocate channel t1 type disk;
    allocate channel t2 type disk;
    allocate channel t3 type disk;
    allocate channel t4 type disk;
    set newname for datafile 01 to '/oracle/app/oradata/dbprod/system01.dbf';
    set newname for datafile 02 to '/oracle/app/oradata/dbprod/undotbs01.dbf';
    set newname for datafile 03 to '/oracle/app/oradata/dbprod/sysaux01.dbf';
    set newname for datafile 04 to '/oracle/app/oradata/dbprod/users01.dbf';
    set newname for datafile 06 to '/oracle/app/oradata/dbprod/datafile005.dbf';
    set newname for datafile 07 to '/oracle/app/oradata/dbprod/datafile006.dbf';
    set newname for datafile 08 to '/oracle/app/oradata/dbprod/datafile007.dbf';
    set newname for datafile 09 to '/oracle/app/oradata/dbprod/datafile008.dbf';
    set newname for datafile 10 to '/oracle/app/oradata/dbprod/datafile009.dbf';
    set newname for datafile 11 to '/oracle/app/oradata/dbprod/datafile010.dbf';
    set newname for datafile 14 to '/oracle/app/oradata/dbprod/datafile001.dbf';
    set newname for datafile 15 to '/oracle/app/oradata/dbprod/datafile002.dbf';
    set newname for datafile 16 to '/oracle/app/oradata/dbprod/datafile003.dbf';
    set newname for datafile 17 to '/oracle/app/oradata/dbprod/datafile004.dbf';
    set newname for datafile 18 to '/oracle/app/oradata/dbprod/indfile001.dbf';
    set newname for datafile 19 to '/oracle/app/oradata/dbprod/indfile002.dbf';
    set newname for datafile 20 to '/oracle/app/oradata/dbprod/indfile011.dbf';
    restore database;
    switch datafile all;
    recover database;
    +}+
    But while restoring, I got error like below:
    Starting restore at 22-OCT-12
    channel t1: starting datafile backupset restore
    channel t1: specifying datafile(s) to restore from backup set
    restoring datafile 00004 to /glotam3/oracle10g/oradata/T24DEV3/users01.dbf
    restoring datafile 00007 to /glotam3/oracle10g/oradata/T24DEV3/datafile006.dbf
    restoring datafile 00011 to /glotam3/oracle10g/oradata/T24DEV3/datafile010.dbf
    restoring datafile 00012 to /glotam3/oracle10g/oradata/T24DEV3/recop01.dbf
    restoring datafile 00014 to /glotam3/oracle10g/oradata/T24DEV3/datafile001.dbf
    channel t1: reading from backup piece /oracle/app/prod/rman/df_t793567544_s13_p1
    channel t2: starting datafile backupset restore
    channel t2: specifying datafile(s) to restore from backup set
    restoring datafile 00001 to /oracle/app/oradata/dbprod/system01.dbf
    restoring datafile 00003 to /oracle/app/oradata/dbprod/sysaux01.dbf
    restoring datafile 00008 to /oracle/app/oradata/dbprod/datafile007.dbf
    restoring datafile 00015 to /oracle/app/oradata/dbprod/datafile002.dbf
    restoring datafile 00018 to /oracle/app/oradata/dbprod/indfile001.dbf
    channel t2: reading from backup piece /oracle/app/prod/rman/df_t792538698_s15_p1
    channel t3: starting datafile backupset restore
    channel t3: specifying datafile(s) to restore from backup set
    restoring datafile 00002 to /oracle/app/oradata/dbprod/undotbs01.dbf
    restoring datafile 00009 to /oracle/app/oradata/dbprod/datafile008.dbf
    restoring datafile 00013 to /oracle/app/oradata/dbprod/prefstat01.dbf
    restoring datafile 00016 to /oracle/app/oradata/dbprod/datafile003.dbf
    restoring datafile 00019 to /oracle/app/oradata/dbprod/indfile002.dbf
    channel t3: reading from backup piece /oracle/app/prod/rman/df_t731097654_s14_p1
    channel t4: starting datafile backupset restore
    channel t4: specifying datafile(s) to restore from backup set
    restoring datafile 00006 to /oracle/app/oradata/dbprod/datafile005.dbf
    restoring datafile 00010 to /oracle/app/oradata/dbprod/datafile009.dbf
    restoring datafile 00017 to /oracle/app/oradata/dbprod/datafile004.dbf
    restoring datafile 00020 to /oracle/app/oradata/dbprod/indfile011.dbf
    channel t4: reading from backup piece /oracle/app/prod/rman/df_t794754324_s12_p1
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t793567544_s13_p1
    ORA-19612: datafile 11 not restored due to missing or corrupt data
    channel t3: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t731097654_s14_p1 tag=TAG20120822T184703
    channel t3: restore complete, elapsed time: 01:06:05
    channel t2: restored backup piece 1
    failover to piece handle=/oracle/app/prod/rman/
    df_t792538698_s15_p1 tag=TAG20120822T184703
    channel t2: restore complete, elapsed time: 01:09:10
    ORA-19870: error reading backup piece /oracle/app/prod/rman/
    df_t794754324_s12_p1
    ORA-19612: datafile 20 not restored due to missing or corrupt data
    failover to previous backup
    released channel: t1
    released channel: t2
    released channel: t3
    released channel: t4
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 10/22/2012 15:11:23
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 20 found to restore
    RMAN-06023: no backup or copy of datafile 17 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore
    RMAN>
    This same rman backup has been restored in other server, the commands were same but the db was not restored in my server.
    Kindly help me....
    Thanks in advance,
    nonuday

    Hi mseberg,
    When I executed the below command with same date. This is what is got and am not able to understand what it says.
    RMAN> run
    +{+
    SET UNTIL TIME "TO_DATE('10/22/2012','MM/DD/YYYY')";
    restore database preview;
    +}2> 3> 4> 5>+
    executing command: SET until clause
    Starting restore at 23-OCT-12
    using channel ORA_DISK_1
    List of Backup Sets
    +===================+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +8 Full 11.68G DISK 02:10:15 22-AUG-12+
    BP Key: 18   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t793567544_s13_p1
    List of Datafiles in backup set 8
    File LV Type Ckp SCN    Ckp Time  Name
    +4 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/users01.dbf+
    +7 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile006.dbf+
    +11 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile010.dbf+
    +12 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/recop01.dbf+
    +14 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +10 Full 11.35G DISK 02:15:49 22-AUG-12+
    BP Key: 16   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t792538698_s15_p1
    List of Datafiles in backup set 10
    File LV Type Ckp SCN    Ckp Time  Name
    +1 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/system01.dbf+
    +3 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/sysaux01.dbf+
    +8 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile007.dbf+
    +15 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile002.dbf+
    +18 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile001.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +11 Full 10.78G DISK 02:20:07 22-AUG-12+
    BP Key: 15   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t731097654_s14_p1
    List of Datafiles in backup set 11
    File LV Type Ckp SCN    Ckp Time  Name
    +2 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/undotbs01.dbf+
    +9 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile008.dbf+
    +13 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/prefstat01.dbf+
    +16 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile003.dbf+
    +19 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/indfile002.dbf+
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time
    +12 Full 16.83G DISK 03:25:43 22-AUG-12+
    BP Key: 14   Status: AVAILABLE  Compressed: YES  Tag: TAG20120822T184703
    Piece Name: /oracle/app/prod/rman/df_t794754324_s12_p1
    List of Datafiles in backup set 12
    File LV Type Ckp SCN    Ckp Time  Name
    +6 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile005.dbf+
    +10 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile009.dbf+
    +17 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile004.dbf+
    +20 Full 30013719101 16-AUG-12 /u01/oradata/dbproddata/datafile011.dbf+
    archive logs generated after SCN 30013719101 not found in repository
    Media recovery start SCN is 30013719101
    Recovery must be done beyond SCN 30013719101 to clear data files fuzziness
    Finished restore at 23-OCT-12
    RMAN>
    Thanks for reply,
    Nonuday

  • Buffered Reader Question about wrapping around another Reader

    I'm reading about BufferedReaders and in the API the following paragraph reads:
    In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,
    BufferedReader in = new BufferedReader(new FileReader("foo.in"));
    I was wondering if somebody could explain their reasoning in slightly less complicated terms...I can't really figure out what their reasoning is. Thanks

    If every time you wanted to read a character, you had to talk to the hard disk device, it would be very slow. This is because communicating with the disk is thousands of times slower than communicating with main memory.
    The buffered reader reads in chunks, buffers those data, and allows you to request them one character at a time.

  • Buffered Reader from  a JTextArea?

    Hi everyone,
    can anyone please tell me how i can get a buffered reader from a JTextArea? This is what I would like to do where the following gets displayed in the JTextArea
    Please enter your name: (user enters data here)
    Please enter your id number: (user enters id number here)
    I had coded this using the System.in but now trying to convert to a GUI
    Regards,
    M

    Hi there,
    I can't use get text as I will already have the other data that is written in the text area there as well, so it will get all the text. I need to be able to write stuff and then read the next line from what I have written. For example using my the command prompt:
    static BufferedReader br = new BufferedReader(
                                                     new InputStreamReader(System.in));
    System.out.print("Enter choice : ");
                System.out.flush();
                String choiceStr=null;
                try
                    choiceStr = br.readLine();
                } catch (IOException ioe)
                    System.out.println("Error reading choice.");
                    System.exit(1);
                int choice = -1;
                if (choiceStr.length() > 0)
                    choice = Integer.parseInt(choiceStr);
                switch (choice)
                    case 0: ....
                }On screen it would have wrote Enter choice: (user puts "7" )
    when the 7 and then /r is pressed then it will read in the 7 only.
    Thanks, M

  • Buffered Reader IO

    Hi Friends,
    Have a unusual problem.
    I am trying to read a file using buffered reader api as:
    testHandle = new BufferedReader(new FileReader("Test.DAT"));
    but when i do
    while(...){
    String line = testHandle.readLine();
    System.out.println(line);
    the output is :
    My Name is Vishal.
    ello
    When in the file Test.DAT it is :
    # My Name is Vishal.
    Hello
    and if i add * in the Test.DAT file like this
    *# My Name is Vishal.
    Hello
    Then It prints
    # My Name is Vishal.
    ello
    Not able to understand why it is skipping the first letter (zeroth character of every line from the file) .
    Need your help on this.
    Thanks,
    Vishal

    You must be skipping some character(s), which you're not showing in the code snippet you posted. File I/O doesn't just skip over them - so there must be a bug in your code which you have omitted here.

Maybe you are looking for

  • External Hard Drive on Airport Extreme

    My external hard drive is connected to my Extreme. I noticed that when I copy files from my mac to the hard drive, the upload rate in the network activity monitor increases(in MB sizes). Will my ISP consider this as an upload rate to the internet? I

  • Connecting Devices to TV

    I have the Toshiba 40E220U model television and am having issues connecting multiple devices to it. My satellite box hooks up via composite A/V cables (I believe I had the option of an HDMI cable but I didn't have an HD TV when I got the satellite se

  • THE PAGES WITH LINKS TO OLD FIREFOX DON'T WORK I DON'T WANT THE NEW VERSION

    I HAVE SPENT THE LAST WEEK TRYING TO FIX WHAT THE NEW IMPROVED VERSION OF FIREFOX DID TO MY COMPUTER. I WANT AN OLDER VERSION BUT NONE OF THE LINKS WORK NOTHING HAPPENS HOW DO I INSTALL AN OLDER VERSION THE NEW ONE TOTALLY SCREWED MY COMPUTER

  • Bean-Managed vs. Container-Managed Persistence

    Hello, I would like the real world skinny on bean-managed persistence vs. container-managed persistence. I have heard the bean-managed offers higher scalability and performance, while container-managed offers simplicity but with a cost. Can someone g

  • My arrow keys and backspace no longer works in Sql Developer

    In the work sheet of Sql Developer it is not allowing me to use my arrow keys or backspace key, I can use these keys in the result section but not in the worksheet section. When I use the arrow key it scrolls the page but the cursor stays in the same