Current Position:Home > Problem getOutputStream of Runtime

Problem getOutputStream of Runtime

Update:11-30Source: network consolidation
Advertisement
Hi all,
I'm facing a problem with getOutputStream Following is my code:
try {
String loadCommand = "svnadmin load " + repLocation;
Process loadProcess = runtime.exec(loadCommand);
OutputStream os = loadProcess.getOutputStream();
FileInputStream is = new FileInputStream(restoreLocation);
byte[] buff = new byte[BUFFSIZE];
int len = 0;
while ((len = is.read(buff)) > 0) {
os.write(buff, 0, len);
is.close();
os.close();
} catch (IOException e) {
log.error("IO EXCEPTION" + e.getMessage());
} catch (InterruptedException e) {
log.error("INTERRUPTED EXCEPTION" + e.getMessage());
i'm getting the following exception:
java.io.IOException: The pipe has been ended
     at java.io.FileOutputStream.writeBytes(Native Method)
     at java.io.FileOutputStream.write(Unknown Source)
     at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
     at java.io.BufferedOutputStream.write(Unknown Source)
     at Load.<init>(Load.java:58)
     at Load.main(Load.java:107)
The above code is used to restore my repository.The code work upto some 30 revisions,But after some tiem i get the above exception.
Can anyone please point out my mistake!!
Not much of examples available for getOutpuStream method!!
Thanks
Archana

The Best Answer

Advertisement
The dump file is basically the mixture of text headers and binary content, MD5 checksums are used to verify content, but no checksums for the headers (only the lenght is given, so that the headers content doesn't have to be eschaped).
It should be easy to find out in which revision the error occurs (since the svnadmin load outputs the information about which revision is being processed). You can either check it and try to correct manually or maybe examine and point out the error in the dump file.
A possible reason which comes to my mind right now is wrong encoding of some national characters, which causes the properties to be longer than the advertised lenght (since UTF-8 encoded characters take more than 1 byte). We experienced similar error with PVCS import.
  • Problem getOutputStream of Runtime Update:11-30

    Hi all, I'm facing a problem with getOutputStream Following is my code: try { String loadCommand = "svnadmin load " + repLocation; Process loadProcess = runtime.exec(loadCommand); OutputStream os = loadProcess.getOutputStream(); FileInputStream

  • Problem in using runtime.exec() Update:11-30

    Hi all, I am having a problem with the runtime.exec method.I am trying to execute linux commands using this method.For most of the commands it works fine.But when i tried to change the user with the su command in linux my program hung up.So please he

  • Problem Connection at Runtime Update:10-11

    Hi everybody, Context: Crystal Reports 9, Windows XPPro, SQL Server When I change my report to another Datasource at runtime doesn't work I retrive always the same data from the original Datasource. Below the code I'm using     Dim sql As String, Con

  • Any problems with labview runtime v 7.1 on one host interacting with lvrte 6.1 on another host? Update:11-30

    Using OPC, UDP ant TCP on the host running lv 7.1 runtime, communicating with a second host running lvrte 6.1. Both hosts communicating with cpfp 2020 and using similar IAK files. Need to know if there are any known problems with this scenario. I can

  • UNIX Problem with method Runtime exec(String[],String[],File) Update:11-30

    Hello !! i'm french scuse my english I got a probleme with method exec(String[],String[],File) of Runtime Class i don't have any probleme when my program runs on Windows NT but the same program on UNIX doesnt execute my command.. When i use exec(Stri

  • A problem about ABAP Runtime Error Update:11-30

    Now i am responsible for writing a program, including an internal table, which will store 3 million Datensätze. But when ich ran this program, an error happened: Runtime Error: TSV_TNEW_PAGE_ALLOC_FAILED Short Text: No more storage space available fo

  • Problem Installing VS2010 Runtime x32 Update:11-30

    I developed a simple Crystal Report reader under VS 2010 with CR for VS2010. It's in C++.  The app works on the development machine. However when I install the runtime on the target machine (x32) it does not install all the crystaldecisions.crystalre

  • Problems with J2SE runtime enviromen 5.0 update 6 Update:11-30

    i uninstalled it but it will not leave my add/remove program area i tried to reinstall it and i get this: the installation of package http://java.sun.com/update/1.5.0/jre-1_5_0_06-windows-j586.xp:failed with-203 i go to try to remove it from the add/

  • Problem in executing RunTime.exec() commands Update:11-30

    Hello EveryBody I have a problem.i have to zip the photos that r uploaded by the users and sumit it to the lab person.for that i zip these photos and give the lab person to download that zip. But the problem is that when ever i zip 30 to 40 photos it

  • Very strange problem. Portal runtime errors at various levels. Update:11-30

    Hello Everyone. I'm having trouble with some webdynpro applications in my production environment. Sometimes, the applications fail to load up generating a Runtime Error error. When I look through the logs of the WAS I find the following entries: cann