Why System.in is blocking other IO call

I was trying this simple program to run some test...
package com.jpmc.ibtech.hycee.base;
import java.io.IOException;
public class TestThread {
      * @param args
      * @throws IOException
     public static void main(String[] args) throws IOException {
           (new Thread() {
               public void run() {
                    try {
                         sleep(8000);
                          LoadCompsFTP ftpc = new LoadCompsFTP();
                          ftpc.listNames();
                    } catch (Exception e) {
                         System.out.println("exception!!");
          }).start();
          System.out.println("test1");
          try {
               int b = System.in.read();
               System.out.println("read data from main thread=" + b);
          } catch (Exception e) {
               System.out.println("exception!!");
     }LoadCompsFTP() class uses apache commons FTP lib to connect to FTP server.What i observed is when main thread waits on the Systtem.in the connect method in the FTP lib is waiting..It connect's only after i enter anything on my input.basically after system.in ends.
I am not sure why.
I am running JDK 1.4.2 on windows XP

public LoadCompsFTP() {
          System.out.println("Creating FTP");
          ftpClient = new FTPClient();
          isValid = true;
     try {
                     System.out.println("Connecting FTP");
     ftpClient.connect("ftpgate.se.com");
     ftpClient.login("moran" + "@" + "ftp.omp.com","589");
     System.out.println("login FTP");
               } catch (Exception e) {
     isValid = false;
     public String[] listNames() throws IOException {
          System.out.println("Asking filename");
          String[] fileNames = ftpClient.listNames();
          System.out.println("Got filename");
          if (fileNames == null) {
               return new String[0];
          } else {
               return fileNames;
     }Message was edited by:
ashoknanashok

Similar Messages

  • CKPT locks the system objects and blocks other sessions

    CKPT locks the system objects and blocks other sessions
    Oracle Version 10.2.0.4
    OS : HP UX 11.31 Itanium
    SQL> select * from v$lock where block=1;
    ADDR KADDR SID TY ID1 ID2 LMODE
    REQUEST CTIME BLOCK
    C0000009FCC2B348 C0000009FCC2B368 1100 RO 65559 1 2
    0 3877 1
    SQL> select program from v$session where sid=1100;
    PROGRAM
    oracle@ctqanhr1 (CKPT)
    As a workaround we flush the buffer cache with the below command
    SQL> alter system flush buffer_cache;
    however the issue reoccurs after some times.
    Edited by: 965132 on Dec 2, 2012 9:59 PM

    other reference:
    CKPT Questions
    The temporary workaround is to set "_db_fast_obj_truncate"=FALSE in that particular case.
    Regards,
    sgc
    Edited by: Samuel G. Cristobal on 03-dic-2012 8:48

  • Weird select could cause blocked other session

    Dear Gurus,
    Could you give me some explanation why select query could blocked other update sessions, please find below
    SID_BLOCKER BLOCKER WAITER
    Session ID: 22339    in instance 1 is blocking   Session ID: 296 in instance 1
    Session ID: 22339    in instance 1 is blocking   Session ID: 6673 in instance 1
    Session ID: 22339    in instance 1 is blocking   Session ID: 26091 in instance 1
    Elapsed: 00:00:01.77
    12:21:45 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 22339
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
    22339    40705 18135 26767 XLAPPC      cmwl21     INACTIVE 15-SEP-2013 23:25:35 java@cbtcm cbtcmpap02 18-SEP-2013 12:21:53
    pap02 (TNS
    V1-V3)
    SQL*Net message from client Idle 0            6649 WAITING
    Elapsed: 00:00:00.08
         PIECE SQL_TEXT
             0 SELECT ch_objects.obj_id, ch_objects.obj_type, ch_objects.obj_ex
             1 ternal_id, ch_objects.obj_name, ch_objects.obj_desc, ch_arcs.arc
             2 _relation, TO_CHAR (ch_arcs.arc_valid_from, 'YYYYMMDDHH24MISS'),
    3  TO_CHAR (ch_arcs.arc_valid_to, 'YYYYMMDDHH24MISS'), TO_CHAR (ch
             4 _objects.sys_update_date, 'YYYYMMDDHH24MISS') FROM ch_objects, c
             5 h_arcs WHERE ch_arcs.arc_child_id = :m_startObjID AND ch_arcs.ar
             6 c_relation IN (:relTypes0:relTypesInd0,:relTypes1:relTypesInd1,:
             7 relTypes2:relTypesInd2,:relTypes3:relTypesInd3,:relTypes4:relTyp
             8 esInd4,:relTypes5:relTypesInd5) AND ch_arcs.arc_father_id = ch_o
             9 bjects.obj_id AND TO_DATE (:m_effectiveTime, 'YYYYMMDDHH24MISS')
            10 BETWEEN ch_arcs.arc_valid_from AND ch_arcs.arc_valid_to
    Elapsed: 00:00:00.71
    12:21:54 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 6673
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
      6673    51927 15196 19846 XLAPPC      cmwl61 ACTIVE   16-SEP-2013 18:25:53 java@cbtaa cbtaampap01      18-SEP-2013 12:22:08
    mpap01 (TN
    S V1-V3)
    enq: TX - row lock contention Application 0            2681 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.03
         PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:00.69
    12:22:09 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 6673
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
      6673    51927 15196 19846 XLAPPC      cmwl61 ACTIVE   16-SEP-2013 18:25:53 java@cbtaa cbtaampap01      18-SEP-2013 12:22:21
    mpap01 (TN
    S V1-V3)
    enq: TX - row lock contention Application 0            2695 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.03
         PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:00.63
    12:22:22 SQL> @ssid
    Elapsed: 00:00:00.00
    enter value for sid: 26091
    enter value for instance id: 1
       SID  SERIAL# SERVER_PID CLIENT_PID USERNAME    OSUSER     STATUS LOGON_TIME PROGRAM MACHINE          SYSDATE
    EVENT WAIT_CLASS WAIT_TIME SECONDS_IN_WAIT STATE SQL_ID
    26091    15759 57714 32378 XLAPPC cmwl11     ACTIVE   17-SEP-2013 14:08:58 java@cbtcm cbtcmpap01       18-SEP-2013 12:22:45
    pap01 (TNS
    V1-V3)
    enq: TX - row lock contention Application 0            2051 WAITING a30z7fqk9sd1u
    Elapsed: 00:00:00.04
        PIECE SQL_TEXT
             0 update ch_objects  set obj_name=:b0,sys_update_date=TO_DATE(:b1,
             1 'YYYYMMDDHH24MISS'),operator_id=:b2:b3,application_id=:b4:b5,dl_
             2 service_code='30' where obj_id=:b6
    Elapsed: 00:00:03.89
    Regards,

    Session 22339 is only currently running a SELECT.  However, it might have, in the past, run an UPDATE or DELETE statement (against the rows that the other sessions want to update) without yet issuing a COMMIT (or ROLLBACK).  So the previous DML by this session makes it the "blocker" session.
    Hemant K Chitale

  • Why can't I block certain people face timing and imessageing me? I keep receiving random facetime calls every 5 minutes got to the point where I have has to turn facetime off.

    Why can't I block certain people face timing and imessageing me? I keep receiving random facetime calls every 5 minutes got to the point where I have has to turn facetime off.

    I'm having the same problem, but it's also coming through on my computer, through my Apple email address.  I have a very short Apple email, and little kids are trying to facetime their little friends, and then when I tell them I'm not their friend, they FaceTime or iMessage me even more, thinking that I'm still their friend, and I'm just kidding around. 
    I can't block the kids before they call...I don't know who they are.  I want to restrict my FaceTime to only my phone number, and block all FaceTime and iMessage requests that are coming in through my email address.  Can I do that?
    I have another thread:  https://discussions.apple.com/thread/5840011

  • I keep getting calls, so I added that number to my list of calls to block.  It doesn't ring anymore, but I keep getting notification messages that say "Call back".  Why do I receive this when the call should be blocked?

    I keep getting calls from (removed), so I added that number to my list of calls to block.  It doesn't ring anymore, but I keep getting notification messages that say "Call back (removed)".  Why do I receive this when the call should be blocked?
    Private info removed as required by the Verizon Wireless Terms of Service
    Message was edited by: Admin Moderator

    Okay, you are correct the call is not supposed to ring in. Have you done any troubleshooting on the phone? First off, try power cycling the phone. Turn the phone off, then back on again. If that does not work, then try a reset. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot. See if that changes things. Is the caller using the exact number that you blocked, or is it possible they are using another number, or have restricted the Caller ID?

  • Why can't I block a number through the call and message blocking request?

    Every time I try to insert a number, it keeps saying that they are unable to complete my requested change at this time.

        Jezallygrace, I want to make sure you're able to block those unwanted calls and messages. If you're still having problems with the site, we'll need to verify the feature is on your account and possibly add the block for your. If you still need assistance, please send me a private message with your mobile number.
    MarquiaF_VZW
    Follow us on Twitter @VZWSupport

  • Why can't we block a certain phone # from calling our phone?

    Verizon stated: when I asked?
    Can I block an incoming number?
    "Neither Verizon Wireless nor any other wireless provider is able to block specific numbers from your wireless phone; however, we are able to block all incoming calls. We strongly recommend that you utilize your Caller ID feature to screen your incoming calls. This way, you will be able to ignore unknown callers at your discretion. If the unwanted calls persist, we encourage you to change your wireless number."
    REALLY??? THAT'S JUST ASSSSININE....
    By the way, That statement is Not True, I know for a Fact that STRAIGHT TALK, of All Company's has that feature & it comes Standard...  So what's up??? I don't get it???
    The worst part is... the phone # calling me is:  000-000-0000  & the guy barely speaks english & keeps calling me about getting a loan to go to college.  I have told him, 3 times a day when he calls, NO THANK YOU, PLEASE STOP CALLING ME, BUT HE WON'T.  I bet I can't even block a 000-000-0000 number anyways.  Yet, they can get away with calling me with it.????
    Message was edited by: << Name removed to comply with Verizon Wireless Terms of Service  >>
    Message was edited by: Verizon Moderator

    Hmm, what phone and what plan do you have?  I thought you could get up to 5 numbers blocked for up to 90 days for free on each line.  Can you just hit the END button when the call comes in to ignore it or send it straight to voicemail?  At least that way you won't get charged minutes when the # calls you.
    Or, put that in as a contact, and choose NO ringtone, or silent ringtone, so you won't even hear when the call comes in and it will eventually go to VM - you won't have to do anything.

  • Why won't the "block cookies and other website data" setting work on Safari 7.0.2?

    Why doesn't the "block cookies and other website data" setting on Safari 7.0.2 work?  Everytime I try this setting, I still get cookies and other data that needs to be deleted from my computer.

    This has been the case for sometime.
    There is no effective way to block these cookies.
    Try this, may help.
    Safari > Preferences > Security > Cookies and other website data:
    Press "Remove All Other Website Data:'
    Do this twice.
    Select "Reset Safari" from Safari drop down menu.
    Select only "Reset all website data".
    Click "Reset".

  • System is not blocking Customer at creating Sales order - Urgent

    Hello all,
    Our user has created a sales order for 1,040,000.00  PKR for advance payment- cheque payment term. There is not payment against customer in fbl5n but system is not blocking sales order.Customer credit limit is zero. Any idea that why this is happening??

    hi,
    we had a similar req we handled it using delivery level blocks and restricted the authorisation to remove the block to certain users. incase you are not doin this follow this path. imglog executionshippingdeliveries-define reasons. assign this block to the order. also you will ahve to put teh block in cust master too.
    saurabh

  • Java is blocked. Don't know why. Error: Application Blocked Java Plug-In 10.51.2.13 using JRE version 1.7.0_51-b13 Java HotSpot(TM) Client VM

    I keep receiving this message when trying to use http://www.exodus-chats.org/DolTerias . it uses a java based chat system, and won't allow me to open the application. I've tried checking through my options menus, but I've found no reason as to why this can be blocked. The only thing I've come up with is my plug ins, but it doesn't allow me to change anything to allow the app to be used.
    Application Blocked
    Details: Java Plug-In 10.51.2.13 using JRE version 1.7.0_51-b13 Java HotSpot(TM) Client VM

    Starting in Java 7 Update 51, sites that would normally be blocked based on your Java Security settings can be added to an Exceptions list, via the Java Control Panel. See the Java Help page [http://www.java.com/en/download/faq/exception_sitelist.xml How can I configure the Exception Site List?] for details.
    Ref: http://kb.mozillazine.org/Java#Java_security_prompts

  • FB60 Invoice posting system is showing blocked for payment

    Dear all,
    When ever we post FB60 Vendor Invoice document system is showing blocked for payment error.
    In OBA5 we changed the message warning to Error thats why it is showing error message.
    In XK01 vendor master we have put it as Payment Block "B".
    While raising vendor invoice itself system is showing Blocked for Payment error. It will show the error message while payment itself only.
    Regards,
    Teja

    Hi
    The message you have converted from Warning to Error may not be the appropriate one, so you can getting the message while invoice booking.
    If you want to avoid users removing the payment block in proposal, you can customize payment block indicator by ticking "change in pmnt prop".  Likewise, if you want to avoid manual payments also, then you can tick "Manual payments block" in the same configuration.
    Hope this helps.
    Regards

  • Why does Safari say "Blocked Plug-in" when I want a video?

    Why does Safari say "Blocked Plug-in" when I want a video?

    When you have installed the latest version of Flash, relaunch Safari and test.
    If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
    click Check Now. Quit and relaunch your browser.

  • Why do i get blocked plug in

    why do i get blocked plug in message and how do i fix this?  All videos are black.

    If you can't install or update Flash, follow these instructions.
    If you have installed the latest version of Flash, please take each of the following steps that you haven't already tried. After each step, relaunch Safari and test.
    For a "blocked plug-in" error, see Step 4.
    For a "missing plug-in" error, start with Step 8.
    Back up all data before making any changes.
    Step 1
    You might have to log out or restart the computer before a Flash update takes effect.
    Step 2
    From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data...
    and confirm. Close the window. Then select
               ▹ System Preferences… ▹ Flash Player ▹ Advanced ▹ Delete All...
    In the sheet that opens, check the box marked
              Delete All Site Data and Settings
    then click Delete Data. Close the preference pane.
    Step 3
    If you're only having trouble with YouTube videos, log in to YouTube and load this page. You may see a link with the text "Leave the HTML5 Trial." If so, click that link.
    Step 4
    a. If you get a warning of a "blocked" or "outdated" plug-in, then select the Security tab in the Safari preferences window. In the list of plugins on the left, there should be one—and only one—entry for "Adobe Flash Player," showing the same version number that you installed. Select that entry. On the right there will be a list of websites for which you have specifically allowed Flash, if any. It's normal for the list to be empty. Below that is a menu labeled
              When visiting other websites
    From that menu, select either Allow or Ask.
    b. If you still get the alerts, then go back to the Flash Player preference pane and select the Advanced tab. Click Check Now. Quit and relaunch the browser.
    c. If the alerts still persist, triple-click anywhere in the line below on this page to select it:
    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
    Right-click or control-click the highlighted text and select
              Services ▹ Open
    from the contextual menu.* A folder should open. Inside it, there should be a file named "XProtect.meta.plist". If that file is missing and you know why it's missing, restore it from a backup or copy it from another Mac running the same version of OS X. Otherwise, reinstall OS X.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    Step 5
    In the Safari preferences window, select the Advanced tab and uncheck the box marked
              Stop plug-ins to save power
    Step 6
    Open this folder as in Step 4:
    /Library/Internet Plug-Ins
    Delete the following item, or anything with a similar name, if present:
              Flash Player (failing).plugin
    You may be prompted for your login password.
    Step 7
    Re-download and reinstall Flash. Download it from the domain "get.adobe.com". Don't click a link from any other website, including this one, because you can't trust links. They may be an attempt to trick you into installing malware masquerading as Flash. Type the address into the browser window. Never download a Flash update from anywhere else.
    Step 8
    If you get a "missing plug-in" error, select
              Safari ▹ Preferences... ▹ Security
    from the Safari menu bar and check the box marked 
              Allow (or Enable) plug-ins
    Then click the button marked
              Manage Website Settings...
    if present and make sure that the website is not blocked for Flash.
    Step 9
    Select
              Safari ▹ Preferences... ▹ Extensions
    from the Safari menu bar. If any extensions are installed, disable them.

  • Why does my Mac block certain websites?

    My Mac blocks Yahoo and Facebook most of the time.  I was told that this is not my router or modem and is a security issue.  Why does it only block specific sites?  I can't seem to find anything in my security settings.

    You're connected on a private and particularly an access-controlled and restricted network, and the administrators of that network have decided that connected users shall not expend available resources and bandwidth with access to various web sites and/or web services. 
    If the network administrators have established the blocks correctly, you'll need to use fairly advanced techniques to bypass the blocks, and attempts to bypass these blocks — whether the bypasses are successful or not — may well be considered grounds for network disconnection and/or disciplinary action by the organization.
    It's common to log these sorts of failures and attempts to bypass, and — given they have control of the switching gear — it can be feasible to uniquely identify the client computer that's making these requests.  If not the specific identity of the client computer system or the credentials used, then the location of the client computer that's attempting the connections.
    Check with your network administrators, and with the site's policies and procedures.

  • How or can i block a number calling me

    how to or can i block a number calling my i phone 4.
    i am on o2 ireland network.

    Even a $30 cellphone can block voice or txt from unwanted callers, why Apple missed this feature is a total mistery for me.
    The only working solution I found is:
    - make a file with Garageband (some seconds of full silence);
    - send it to iTunes;
    - download it on the iPhone's Ringtones;
    - save the callers in your Contacts;
    - use that silent ringtone as a specific ringtone for the unwanted calls, but only after you saved the callers in your Contacts of course!  
    But still ...you can't set the iPhone to not Vibrate for those specific callers...
    Message was edited by: PolloTonto

Maybe you are looking for

  • Share iTunes library between users

    I would like all the users on my computer to share the same itunes library.  It is music that belongs to our whole family and I don't want to have to store it in multiple places and take up space.  How can I do this?

  • BGP Community additive out of order?

    From cli output: 13237 3356 3549 22047     195.69.144.212 from 195.69.144.212 (82.197.128.1)       Origin IGP, localpref 100, valid, external       Community: 3356:2 3356:22 3356:86 3356:501 3356:666 3356:2065 3549:4852 3549:34152 13237:44049 13237:4

  • Dreamweaver CS6(MacOSX)をupdate後「テーブルモード」が表示メニューから消える

    はじめまして. Dreamweaver CS6(creative croud版)をMacにインストールして使用しているのですが. Application ManagerにてDWのアップデート通知がありましたのでアップデートしたところ. メニューの[表示]→[テーブルモード]が無くなってしまいました. このため.[テーブルモード]→[拡張テーブルモード]を選択することができなくて困っています. このモードに切り替えるためのショートカットキー「option(Alt) + F6」キーも アップデート後

  • Having issues with IMAP in Mail

    For the last week have been unable to receive emails in Mail for either yahoo or gmail. the accounts continue to work fine on IOS devices? Here is the error I'm getting: There may be a problem with the mail server or network. Verify the settings for

  • Error message "Invalid Key Manual"

    I recently bought the E2500 Router and I am using the EA2500 Adapter with it . I have this set-up on 2 Desktop PC's . 1 Pc is working just fine with this set-up . The other keeps giving me an Error message of "Invalid Key Manual" . What does this mea