MultiThreads and java.io.InterruptedIOException, Plz. help

Dear javas,
I have a multithreaded application, where I'm using wait and notify to make my thread communications, I'm using the java.io.File to get a list of files in the local folder, then read all these files and use the content of the files as my input, my problem is some time a java.io.InterruptedIOException is throwen, and I don't know why?
it is thrown when I'm trying to read the content of the file, I browsed the Net for more than three days, and no bugs are reported or one have reported any thing.
did I miss something??
Bye the way, the problem happen on unix just, and not with windows
also it happen with my code and with log4j package
did any one have an idea or can help me?
I ahve to deliver the project in the next comming day, and I'm stuck with this thing.
I did find a work around with my code, but I can't do any thing with log4j
I appreciate your help.

did you read the exception description? obviously the thread reading the data was terminated too early. there could be an architectural problem with your design, e.g. the reader thread is a daemon thread and the main thread terminates without waiting for all tasks to be terminated.
robert

Similar Messages

  • My ph's apple4g i update latest virsion 7.0.4 now my ph was very slaw,can i get a 6.0.3 or 7.0.0 and how to install plz help me.........

    my ph's apple4g i update latest virsion 7.0.4 now my ph was very slaw,can i get a 6.0.3 or 7.0.0 and how to install plz help me.........

    3.5.x will be supported until August.
    http://www.mozilla.com/en-US/firefox/all-older.html
    Also see: [[Installing a previous version of Firefox]] and [[Installing Firefox]]
    If you want to troubleshoot your problems with Firefox 3.6.x you can start with [[Firefox hangs]]. Start basic troubleshooting with [[Safe Mode]].

  • TS3274 my ipad does not start or reset even. when i hold both buttons only apple logo appears and ipad wont start. plz help somebody

    my ipad does not start or reset even. when i hold both buttons only apple logo appears and ipad wont start. plz help somebody

    try restoring see guide
    http://www.ipadforums.net/ipad-help/2987-how-put-your-ipad-into-recovery-mode.ht ml

  • Binary addition,subtraction and modulus...plz help urgent

    plz help me on this query...
    i need to pass two 512 bit number as string,then convert them to binary and
    then perform binary addition,subtraction,modulus operations on those two numbers.finally convert result to integer.
    i designed a code which doesnt work correct.it is:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package bytearrayopeations;
    import java.math.BigInteger;   
    * @author sheetalb
    public class binaryadding {
        public static void main(String[] args) {
            BigInteger a = new BigInteger("123456");
            BigInteger b = new BigInteger("5121");
            String bb1 = a.toString(2);
            String bb2 = b.toString(2);
            String ss1 = null;
            String ss2 = null;
            String result = "";
            String carry="0";
            System.out.println("first value=" +bb1);
            System.out.println("second value=" +bb2);
            int k=bb1.length();
            int h=bb2.length();
            System.out.println("length 1="+ k);
            System.out.println("length 2=" +h);
            int p=h-k;
            //System.out.println("difference=" +p);
            int q=k-h;
            //System.out.println("difference 2=" +q);
            if(h==k)
           else if(h>k)
                for(int i=0;i<p;i++)
                    bb1="0"+bb1;
                System.out.println("new value of first=" +bb1);   
        else if(h<k)
            for(int i=0;i<q;i++)
                bb2="0"+bb2;
            System.out.println("new value of second=" +bb2);
            StringBuffer sb1=new StringBuffer(bb1);
         StringBuffer sb2=new StringBuffer(bb2);
            bb1=sb1.reverse().toString();
         bb2=sb2.reverse().toString();
            //System.out.println("rev. buffer1=" +bb1);
            //System.out.println("rev. buffer2=" +bb2);
            for(int i=0;i<bb1.length();i++)
                ss1=bb1.substring(i,i+1);
                ss2=bb2.substring(i,i+1);
              System.out.println("value1=" + ss1 + "    " + "value2=" + ss2);
              if (ss1.equals("0") && ss2.equals("0")) 
                 if (carry.equals("0")) 
                     result+="0";
                        else
                            result+="1";
               else if (ss1.equals("1") && ss2.equals("1"))
                if (carry.equals("0")) 
                    result+="0";
              carry="1";
              else
                   result+="1";
                   carry="1";
        else if (ss1.equals("0") && ss2.equals("1"))
                     if (carry.equals("0")) 
                         result+="1";
                   carry="0";
                        else
                          result+="0";
                                    carry="1";
               else if (ss1.equals("1") && ss2.equals("0"))
                     if (carry.equals("0")) 
                        result+="1";
                        carry="0";
                   else
                                result+="0";
                                carry="1";
           System.out.println("sum=" +result + "         " + "carry" + carry);
                        result+=carry;
                        StringBuffer sb3=new StringBuffer(result);
                        result=sb3.reverse().toString();
                    System.out.println("result is " +result); 
                  System.out.println("Binary = "+ result + ", Decimal = "+Integer.parseInt(result,2));
    }plz provide me or email me if possible java coding for all three operations as soon.
    [email protected]

    One thread is enough. Continue here:[http://forums.sun.com/thread.jspa?threadID=5373720&messageID=10643157#10643157]

  • HttpURLConnection and java.io.InterruptedIOException

    Hello,
    I am experiencing the following problem:
    I created a standalone java program to open an HttpURLConnection to
    an image on the internet at an https address. I am timing how long
    it takes to read image through the stream so I can get an idea of my
    connection speed.
    It works ok, so I made it a servlet that resides in WebSphere 3.5 App server, and when I invoke it, I get:
    java.io.InterruptedIOException: Operation timed out: no further information
    I check the field java.io.InterruptedIOException.bytesTransferred and it is 0.
    Here is a code snippet:
    URL dhServlet = new URL("https://www.some-server.com/some-image.bmp");
    HttpURLConnection conn = (HttpURLConnection) dhServlet.openConnection();
    conn.setDoOutput(false);
    conn.setDoInput(true);
    conn.setRequestProperty("Accept-Language","en");
    conn.setRequestProperty("Accept", "image/bmp, */*");
    if (conn.getResponseCode() == 200) // success
    BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    int chr = in.read();
    while( chr != -1 )
    chr = in.read();
    in.close();
    Again, I am confused why it would work in void main but not as a servlet... Thanks for any help you can offer!
    - Tom

    No they were on different machines -
    so I put the stand alone on on the server with the servlet, and
    got the error message:
    Exception in thread "main" java.net.NoRouteToHostException: Operation timed out:
    no further information
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at TimeConnection.main(TimeConnection.java:43)
    And Line 43 says
    if (conn.getResponseCode() == 200) // success
    Maybe the server I connect to restricts by IP? Thanks very
    much for your feedback!
    - Tom

  • Hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

    hi i installed wrong iousbfamily on osx and now my login screen is frozen, keyboard and mouse not working plz help

    How and why did you install that?  What steps did you take in that process.  I can then help with some steps to undo them. 

  • I was going on to a game and my screen turned white and wont turn off Plz help

    My ipod went white and wouldnt turn off.I was playing myhorse then that happer.What happen to my IPod?
    Plz help

    - Try a reset:
    Reset iPod touch:  Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Connect the iPod to your computer and try to restore via iTunes.
    - If screen still white, let the battery fully darain. After charging for an hour try the above again.

  • Why can't I play a certain song on my iPad Mini when it was working the day before, but after syncing it to my iMac, it won't work on both my iPad and my iMac. Plz help

    Why can't I play a certain song on my iPad Mini when it was working the day before, but after syncing it to my iMac, it won't work on both my iPad and my iMac. Plz help

    Accidents happen, and apple can certainly assist you with replacement of said device.  Most manufacters would tell you to buy a brand new retail unit, apple will charge you about half price for a replacement unit.  I agree its unfortunate that it happend, but expecting a free replacement is just going to lead to disappointment

  • MultiThreading and Java IO

    Hello All,
    I have my application running under JBoss 3.2.5 deployed as MBeans.
    All I do in my process is connect to DB (Oracle 8i) create serializedObjects for 1 months data and save it to a folder on the Harddisk. THe size of these objects is approximately 1MB each. When my process runs the 2nd iteration (once per day), it reads this object to get data for 29 days and connects to the DB to fetch data for the current day to complete 30 days, Generates the Object and saves it to the disk. When I have a single process running, It reads quickly from the cache and generates object.
    My problem is when I run the process in multithreads wherein I have 25 - 50 of such Threads in the JVM, it takes awefully long time to generate the files. For eg, while 1 thread takes 3 mins to create a new object, 25 threads in parallel (each reading/writing different files) takes around 1 hr to complete their object.
    Could anyone help me understand my problem. THe server that I have Jboss installed on is an 8 CPU 2.8GHz each box with 8GB RAM running Windows 2003 OS.
    Thanks.

    Parallel thread execution does not help after a certain number of threads because the processor is not actually processing them in parallel. Parallel processing is not truly parallel processing in the strictest sense. The threads are actually queued with time sliced for a single or multiple processor(s) as may be available. That's where multiple processors make a difference, but there will be a limit to the number of processors. Hence, you will not benefit from starting too many threads.
    http://www-128.ibm.com/developerworks/library/j-thread.html
    Threads may be supported by having many hardware processors, by time-slicing a single hardware processor, or by time-slicing many hardware processors.
    http://java.sun.com/docs/books/jls/third_edition/html/memory.html

  • Plz help i went to restore my ipod touch and it just froze and its not restoring plz help

    PLZ SOME1 HELP MY IPOD FROZE WHEN IT WAS SUPPOSED 2 RESTORE AND IT JUST HAS THE APPLE SIGN

    Hi hellomynameisbrooke,
    Try rebooting the iPod by pressing and holding the on/off and home buttons simultaneously until the screen goes blank and you see the apple logo. It should take about 10-15 seconds to reboot.
    If that doesn't work, connect it to your computer and try restoring it via iTunes.
    Hope this helps!
    Cheers,
    GB

  • KDE, Konqueror and Java... HELP!!!

    i'm running RedHat 8.0 w/ KDE and i can't seem to get applets running at all, i know that my JVM works fine since i use it to compile and run my apps but i can't seem to get applets running at all! under settings have i "enabled java globally" and have tried to set the "path to ajva executable" but i'm not sure what to point it to... any help is useful

    I'm not entirely sure about Konqueror, but this is what I did to get it to work on Mozilla and Galeon. I be that Konqueror won't be too much different < http://members.shaw.ca/trollking >.

  • HT201210 my iphone 5 randomly turns off while paying apps i can't turn it back on and when i connect to itunes it is in recovery mode and cant be restored. plz help

    My Ihone turned off randomly while playing an app. I cant turn it back on and when i plug it back into my computer it is in recovery mode and cant be restored. help plz.

    do you get an error message when trying to restore? what does it say? please be specific.

  • Java Newbie Problem : plz help

    I'm having problem with the java command :
    [root@myServer datos]# export CLASSPATH=/usr/local/jdk/lib:/opt/tomcat/webapps/axis/WEB-INF/classes/org/enyuq/software/datos
    [root@myServer datos]# /usr/local/jdk/bin/java InformacionServidorLicencias
    Exception in thread "main" java.lang.NoClassDefFoundError: InformacionServidorLicencias (wrong name: org/enyuq/software/datos/InformacionServidorLicencias)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    [root@myServer datos]# /usr/local/jdk/bin/java org.enyuq.software.datos.InformacionServidorLicencias
    Exception in thread "main" java.lang.NoClassDefFoundError: org/enyuq/software/datos/InformacionServidorLicencias
    [root@myServer datos]#
    Can anybody help me with this error?
    Thanks

    some of the reasons why most people get this error
    The java file has not been compiled
    The java class does not have a main method(Applet or servlet) and is being run with the wrong tool.
    typing error for the name of the class

  • Can't install Netbeans and Java JDK (MAC OSX) Help?

    i downloaded Netbeans with JDK Java from the Oracle website and when I came to install it, it said that "Oracle JDK and Netbeans IDE can't be installed on this disk. OSCHECK_MESSAGE" which is referring the "Macintosh HD" drive. 
    I am running OS X Yosemite 10.10.1. Currently have a Macbook Pro with Retina Display.
    I have attached a picture to this question to show the problem.

    Vespre, lets restart your machine and retry.
    Also, Sign out, Sign in | Creative Cloud Desktop app
    Below articles should also help:
    http://helpx.adobe.com/creative-suite/kb/exit-code-15-installing-ccm.html
    Installation, launch log errors | CS5, CS5.5, CS6, CCM
    Regards
    ~ Arpit Kapoor

  • Need suggestions to start java card prog. plz help!!

    hi ppl....
    I am new to java card programming, but not to java programming. As a starter, i need to know ..... how to write a basic java card app?? Further, i also want to get the knowledge of testing/running this app on any simulator (if available). Can someone tell me that if i need to run my card application on real "smart card" (NOT on simulator), then what i need to have ... i mean any card processor or interface with PC. Any help will be much appreciated.
    Raheel.

    Download the sun kit and read the manuals

Maybe you are looking for

  • BPM task not appearing in universal worklist

    Hello All. We have installted NWCE 7.2 for a developing a pilot . We have created a sample BPM application and build and deployed it. For some reason the BPM task (first activity in our process model)  is not appearing in the UWL We have ensured that

  • I am busy making a website with iweb. Do you know if it is possible to make a page with a slideshow which does not contain jpg's but other documents?

    I am busy making a website with iweb. Can I only make a page with a slideshow containing jpg's? I would like to make a (pages) document with pictures and have this as a slideshow. Is that possible?

  • Error executing procedure in package

    If someone can help me, i'd greatly appreciate it! I created a package (see code below) in the Portal Navigator and I'm getting the following error when i try to execute the procedure: ORA-06550: line 2, column 16: PLS-00201: identifier 'CURSOR' must

  • IDOC acknowledgements

    Hello All, This is a IDOC - XI - File scenario. The scenario works fine and the file is generated as expected. But the IDOC ack has error status in SXMB_MONI. The error msg is "Acknowledgement not possible". When I open the msg in SXMB_MONI and doubl

  • Code developed in Testsand v1 does run on v3

    Hello All, I have recently upgraded 1 off our production machine to teststand v3 hoping that there will be no compatibility problem, but I was wrong. I noticed that the following code that runs fine in ver1.0 does not work on ver3.0 platform 1) A sta