Why the Process is still in deadlock when i have exhaust its error stream.

There is the code:
import java.io.*;
public class ProcessExec {
  public static void main(String[] args) {
     * Test the Process created by Runtime.exec().
    Runtime rt = Runtime.getRuntime();
    String s = new String();
    if(args.length < 1) {
      System.out.println("Usage: java ProcessExec executionName");
      System.exit(-2);
    try {
      Process process = rt.exec(args[0]);
       * Buffer the error stream and exhaust it.
      System.out.println("ErrorStream data of Porcess:");
      BufferedReader br = new BufferedReader(new InputStreamReader(process.getErrorStream()));
      while( (s = br.readLine()) != null) {
        System.out.println(s);
      System.out.println("\n\n------------------------------------------------------------\n\n");
       * Buffer the input stream and exhaust it.
      br = new BufferedReader(new InputStreamReader(process.getInputStream()));
      System.out.println("InputStream data of Porcess:");
      while( (s = br.readLine()) != null) {
        System.out.println(s);
      System.out.println("Return num: " + process.waitFor());
    catch(Throwable t) {
      System.out.println(t);
}When i run the "javac" as :
C:\classses\lang\java ProcessExec javac
The process run correctly and print the error stream.
But when i run the "java" as:
C:\classes\lang\java ProcessExec java
The process was in deadlock?
Why,in my code i have buffered the error stream and input stream using a BufferedReader and then exhausted them.
And when i invoke the "javac" it ran correctly but why it couldnt run correctly when i invoked the "java" execution?

A deadlock occurs when two locks are dependant on each other.
This is unlikely to be the case here.
With out your exact command line or what your output is or if you have a dealock we will need to see the thread dump which displays where the deadlock is.

Similar Messages

  • Why the process chain always run twice when triggered from R3?

    I run a program from R3 by calling the remote function 'RSSM_EVENT_RAISE' on BW to trigger an event and in turn the event on BW bring up the running of a process chain.  But whenever I run the program on R3 to bring up the running of the process chain, I find the process chain always run twice at the same time.  Does anybody knows the answer? 
    And also I would like to know the functionalities of the two picture buttons "Activate" and "Activate and Schedule" in process chain.  In which case the "Activate" button should be used and in which case, the "Activate and Schedule" button should be used?   If we click the Start variant of a process chain, then click "Change Selections" button which bring up the window "Start Time" where the buttons "Immediate", "Date/Time", "After job", and "After event" are listed at the top.  If we modify at any of the above buttons, then after save this modification, we will have to click "Activate and Schedule" button to make it work, right? 
    Thanks a lot and everyone's idea is greatly appreciated!

    Kevin, make sure there is only one job scehduled for the Start Process of your Process Chain.  If you bring up the Process Chain (not the log view), right click on the Start Process and select "Displaying Scheduled Job(s)...".  There should only be one scheduled job with name BI_PROCESS_TRIGGER.  If there is more than one, then when triggered, it would execute more than once at the same time.  If there is only one job, then maybe your R/3 program is triggering the event more than once? 
    As far as the Start conditions for the Start Process, it works off the same principals as a scheduled job.  These start conditions determine when or how the Process Chain is to be executed.  You also have control over frequency.  These start conditions determine the scheduling of the Start Process of your Process Chain.
    When you schedule a Process Chain, a separate scheduled job is created for "each" process in the Chain.  BW controls the triggering of these jobs based upon how the processes in the Chain are linked.  All the jobs associated with Process Chains have strict naming conventions and all begin with BI_PROCESS_...  If you use SM37 to view all jobs that begin with BI_PROCESS_ you will find alot of scheduled jobs associated with your process chains.  Each job represents one of the processes within your process chains. 
    Does this help?
    Another tip might be to trigger the event manually in BW (use tx SM64).  If the process chain executes twice again, then maybe there is a separate scheduled job in BW that triggers the process chain that is triggered by the same event as the start process of the process chain.
    Message was edited by: George Shannon

  • HT1414 I am going through the process of unlocking my iphone 4 and have had all the go aheads from my service provider but i am still having problems when i plug the phone into itunes. Has anyone else had this program

    I am going through the process of unlocking my iphone 4 and have had all the go aheads from my service provider but i am still having problems when i plug the phone into itunes. Has anyone else had this problem??

    Umm, what problem?  What actually happens when you try to restore it in iTunes?

  • Why does FF save files to desktop, when I have "downloads" checked in options? This is a new issue with the latest version 3.6.3 Windows XP Thanks.

    Why does FF save files to desktop, when I have "downloads" checked in options? This is a new issue with the latest version 3.6.3 . Using Windows XP Driving me nuttier! Thanks.
    (Is is that MicroNetFrame Asst thing?)
    == This happened ==
    Every time Firefox opened
    == When I installed latest version

    Thanks for your reply. I appreciate your help.
    It was just a hunch that MircoNetFrame was causing the problem. I disabled it as you suggested, and I still have the problem.
    I just changed under Tools>Options> General - had checked "ask me every time" under downloads, so instead of asking me, FF saved the download to I know not where. It no longer saves it to the desktop, leaving a duplicate in "my documents".
    In windows, I have found unless one knows the entire name of the document, one can never find anything. It isn't listed under recent ''''''__. I can't recall the nomenclature, but the
    capability is ridiculous. So, I don't know where that file I just downloaded is!
    I downloaded a PDF file, but this happens with all DL's. It was so easy to have them all stacked in one place and I could recall
    what I had and when I downloaded it easily.
    Do you have any other suggestions other that going back to the old version of FF, which I would rather not do?
    Thanks again for your time, it is very considerate to help a complete stranger, I must say. Sounds like something I might do! Cheers!

  • Why the new iPad still has no Flash

    I wonder why the new iPad still has no flash. I love to take photos with my iPhones and iPads, sometimes a flash could be handy when it's dark.
    I know it could be another nightmare for the Apple case makers.

    Apple has never said why, and rarely does explain decisions like that... my guess is that it would have taken space and power away from something else, it's a pretty tightly-packed product. :-)

  • I started my update for ios 5.1for iPhone 4s and cancelled it have way through now it says it's downloaded but really it's not the update is still there and when I try to update it it says unable to install update : an error occurred installing iOS 5.1  ?

    I started my update for ios 5.1for iPhone 4s and cancelled it have way through now it says it's downloaded but really it's not the update is still there and when I try to update it it says unable to install update : an error occurred installing iOS 5.1  ?

    See Here... Unable to Update or Restore...
    http://support.apple.com/kb/HT1808

  • After closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    after closing large documents (drawings) the window closes but the process runs still in the background. I open the next document, the same procedure and after dowing this several times the RAM is full the system becoms very slow. what can i do???

    You can always shut it down manually via the Task Manager
    (CtrlShiftEsc)...
    On Mon, Sep 1, 2014 at 3:05 PM, frank koethen <[email protected]>

  • Flash play installation not work - The exe file deelete automaticly and the process is still running

    Flash play installation not work - The exe file deelete automaticly and the process is still running

    Why i get no answer?

  • Why does the top button always brake why as my screen decided to pop off why is the back of my case bending when I have never dropped it why dose this shity phone keep sending text messages as picture messages this is the worst phone av ever had!!

    Why does the top button always brake why as my screen decided to pop off why is the back of my case bending when I have never dropped it why dose this shity phone keep sending text messages as picture messages this is the worst phone av ever had!!

    I know a lot of people with iphone 5 and have never heard them complain about top button always brake and screen that decides to pop off or the back of their case is bending.
    That sounds like a phone that has been dropped a numerous times.

  • Why can I only create 4 forms when I have purchased the entire package at 100+ dollars?

    Why can I only create 4 forms when I have purchased the entire package at 100+ dollars?

    FormsCentral can be used from anywhere, but to purchase a subscription you need a credit card with the mailing address in one of the countries supported for purcahse:
    http://forums.adobe.com/docs/DOC-1375
    The partner can purchase if they have access to a card in one of those countries.  Alternatively they do not need to purchase a subscription to edit forms that you've created, they do in order to create multiple forms of their own, but by your sharing forms with them at the "Co-author" level they have access to the editing.  Here are the instructions to share a form:
    http://forums.adobe.com/docs/DOC-2462
    Thanks,
    Josh

  • Why the processing time for loading is taking longtime

    Hi All,
              why  the processing time for loading is taking longtime i want to know the soltion.
    Thanks,
    chandu

    To analyze the process chain and fix it, go through the below document:
    [SAP BW Data Load Performance Analysis and Tuning|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3a699d90-0201-0010-bc99-d5c0e3a2c87b]
    Hope it helps,
    Naveen

  • Before Firefox 4, each time I started the computer, it would load the windows I still had open when I closed down the night before. This has disappeared. Can I restore this?

    Before Firefox 4, each time I started up the computer in the morning and clicked on Mozilla Firefox, it would load up the windows I still had open when I closed down the night before. Very handy! How do I restore it this terrific time-saving feature?
    Thanks
    Brian
    Sydney Australia

    Is there a solution to this? Could someone post a link?

  • Why the hyperlink's text change position when the website is online?

    Why the hyperlink's text change position when the website is online?

    Are these hyperlinks in the navigation menu or the text of the site?
    Are you using a web safe font?
    http://www.iwebformusicians.com/iWeb/Fonts-Colors.html
    Can you publish the URL to a page of the site?

  • Why the links are still opened in new windows?

    Why the links are still opened in new windows even I selected the option to open in tabs?
    This is one of the web I am reading (sorry that it is in simplified Chinese), I have no problems reading it in tabs in Firefox:
    http://www.sodu.com.cn/mulu_30498.html

    Hi,
    How are you trying to open the windows? Safari does not default to opening new windows in tabs. It can open +external application+ links (e.g. from your email program, RSS viewer, etc) in a new tab, but not links from an existing website.
    To open links in a new tab, you'll need to hold the ctrl key and click the link, or use the middle-mouse button if your mouse has one (or right-click on the link and choose to open it in a new tab).

  • I have installed Adobe Lightroom CC.  In the process of launching, a popup appears, that says:  "AN INTERNAL ERROR HAS OCCURRED.  Cannot create the required folder:  /Users/(my user name)/Library/Application Support/Adobe/Lightroom/Develop Presets."  So e

    I have installed Adobe Lightroom CC.  In the process of launching, a popup appears, that says:  "AN INTERNAL ERROR HAS OCCURRED.  Cannot create the required folder:  /Users/(my user name)/Library/Application Support/Adobe/Lightroom/Develop Presets."  So even though Lightroom CC is installed, it will not launch.  What do I need to do to allow it to launch?

    The problem was solved today.  Here's the full story.  I'm a Mac user.  At first I installed Lightroom CC on my iMac (desktop).  I had this problem so I called Adobe, and was referred to a "special unit" .  After about an hour the tech solved it for me ... we did a screen sharing and she took control of my computer for a loooong time.  Because of language difficulties, at first I wondered if she knew what she was doing but she eventually solved it.  Although she couldn't explain exactly what she was doing, she summarized it by saying "it was a permissions problem."  I asked if I would have the same issue later when I installed it on my laptop (Macbook Air).  She said probably not.
    But I did.  The same internal error popup arose on launch and launch did not complete on my laptop.  I tried chat but no joy so I eventually called Apple Care.  I had noticed that on my laptop (and the iMac for that matter), that there was no Library folder after my user name.  The Apple tech explained that the Library folder is actually there but it is hidden because it's very easy for users to do some very nasty things to their computer by going astray while in the Library folder.  The folder is actually there, but they hide it.  I did remember seeing that the tech helping me with my iMac had typed the work "Library" while she was controlling my computer.  Basically she had activated the hidden Library folder so she could open the path that Lightroom was trying to follow to create that "Develop Presets" folder.  For some reason, the inability to create that folder in the launch process was preventing launch from being completed.  The Apple tech said she didn't actually have to do that and activated the Library folder by use of the Go selection on the menu bar.  Anyway, once that complete path was replicated and opened, the next step was to go to the Lightroom Permissions field and add my user name to the user categories already there and enable "read and write" permissions to my user name.  Once done, I shut down my laptop, and then rebooted.  I launched Lightroom and then boom, voila, heavens to betsy, etc. it launched and suddenly a dismal weekend turned into a great one. 
    I am not a geek, so I hope this makes some sense.  I also hope Lightroom launches again tomorrow and beyond! 

Maybe you are looking for

  • Air on android is not support sharedintent??

    hello.. i want to register shaedIntent by air application, so i insert intent-filter in description xml below.. [xml in Air] ------------------------------- <application android:enabled="true"> <activity android:excludeFromRecents="false">      <inte

  • Is it the same create web service in netweaver CE7.1 and create in ECC6.0?

    Hi. I have some questions about ECC 6.0 and netweaver CE 7.1 1.  I want to test webservice in ECC6.0.      At this time I have no this product, butI have downloaded netweaver CE 7.1 trial version (contains java edition).      If I create web service

  • AD OID sync not working after relocating servers

    Experts, OAS 10g (9.0.4.3.0) The AD/OID synch which runs once a day did not run after the servers were relocated. I had run the chgip on both infra and midtier and the applications are running without any problems. How can I troubleshoot this? Where

  • Setup of oracle10gR1 on windos XP

    hi database gorus, i want to install oracle10gR1 on my windows XP machine but during installation on this part... setup pending...Its gone..the screen disappears.what i used to be able to the setup is oracle\install\setup. when i try to click the aut

  • How can I fix nav bar that wraps to next line, leaving big gap?

    I have 2 lines of menu items in the navigation bar (Formal theme) when I'm in iWeb, but it wraps to 3 lines in various browsers, leaving a big gap at the end of the 1st and 2nd line where a short menu item could easily fit. Here's an example: http://