Invalid Volume Header

Hi everyone, I have a Power G4 running Tiger and is unable to boot.
These are the messages I'm getting while running Disk Utility on the Installation Disk.
Unable to boot
Invalid Volume header
Invalid sibling link
The volume Macintosh HD needs to be repaired.
Error: The underlying task reported failure on exit.
1 HFS Volume checked
Volume needs repair
I ran it 4 or 5 times with the same resolt.
The next step was to boot in single user mode
and rand fsck -y and also fsck -fy and got
the same result as above Invalid volume header.."
In single user mode I'm able to see all files and directories but they are in read-only mode.
Nothing can be deleted in read-only mode we only
can see whats out there.
Did a df -k
root device / is 92%
devfs is 100% of is capacity 0 available
fdesc is 100% of it capacity 0 available
Need help, waited over an hour for apple support,
they were very busy.
Is there anything that can be done before
we go to the last resort "format and re-install"
Thanks in advance.
Stablerock.
Power G4   Mac OS X (10.4.7)  

Hi, Stablerock.
See the "Disk Utility cannot repair the disk" section of my "Resolving Disk, Permission, and Cache Corruption" FAQ.
Good luck!
Dr. Smoke
Author: Troubleshooting Mac® OS X
Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
I may receive some form of compensation, financial or otherwise, from my recommendation or link.

Similar Messages

  • 'Invalid Volume Header' - Repair - is drive safe?

    Hi there.
    Failure to mount external firewire 1TB Maxtor
    error was 'Invalid Volume Header"
    Data Rescue II recovered files to another drive.
    Diskwarrior COULD create another Directory, but could NOT exchange it for the faulty one ?!
    I ended up using Disk Utility to Reformat the Drive.
    Question is, can I trust this drive or do I need to ditch it?...

    Simple answer: No drive is safe.
    An error like the one you saw doesn't necessarily have to be indicative of a failing drive and could have been the result of some other system error, a power fluctuation, whatever. Still, if your data is that valuable you should have it all backed up on a second drive too. You can never trust any drive 100% as they can fail at any time. This isn't just referring to mechanical failure but a recurrence of the kind of thing you just saw.

  • Hard drive error: Invalid Volume Header @ 0: I/O error

    The hard drive I was using in my 2010 MacBook Pro suddenly stopped working. There wasn't any early warnings like clicking or other weird sounds coming from the hard drive, it just suddenly stopped working.
    I was using my MacBook Pro normally, when it happened. I was listening to music, then the music stream stopped and it couldn't play any files. Then the spinning beach ball came in and slowly everything else stopped working. Eventually the whole system froze. I waited for about 10 minutes, but it still didn't respond and I forced my MacBook Pro to shutdown. Then I tried to boot it up again, but nothing happened for several minutes, it just showed a grey blank screen. Then, after several minutes, a flashing folder with a question mark appeared on the screen. I googled what that means and I know that the Mac isn't able to find the drive to boot. I tried OS X Recovery, which used to work perfectly, but now it went straight to Internet Recovery, and I figured that the Mac wasn't even able to find the Recovery disk, indicating that something is really wrong. I tried Internet Recovery and it worked, and I was able to use tools like Disk Utility from it. Disk Utility didn't even recognize my drive at that time.
    Then I decided to take the hard drive out of my 2010 MacBook Pro, put it in an empty external hard drive case and connect it in my other Mac. Finder didn't recognize this drive but Disk Utility did recognize it, but it didn't recognize any partitions. I ran "repair disk" and then it gave me the errors in the screenshot.
    The hard drive in question is a 1Tb Western Digital drive and it was about 1.5 years old.
    So my question is that has anyone got a solution for my problem or is my hard drive officially dead?

    And if I click "Repair Disk" again, Disk Utility gives the following error: "Error: Some information was unavailable during an internal lookup."

  • Invalid stream header exception

    hi all
    I have a program to encrypt/decrypt a file using existing secret key
    which is generated by my java code and it works fine. I got a key from a friend and an encrypted file to decrypt it but the program throws this exception:
    java.io.StreamCorruptedException: invalid stream header: 87449FAA
    Exception in thread "main" java.security.InvalidKeyException: No
    installed provider supports this key: (null) this is my code:
    try
        //throws exception here
        ObjectInputStream in = new ObjectInputStream(new
    FileInputStream("key.dat"));
        key = (SecretKey)in.readObject();
        byte[] raw = key.getEncoded();
        skeySpec = new SecretKeySpec(raw, "AES");
        in.close();
    catch (Exception e)
        System.out.println(e);
    Cipher cipher = Cipher.getInstance("AES");
    cipher.init(Cipher.DECRYPT_MODE, skeySpec); Honestly i don't know how my friend creates the secret key but i think he uses some key generation tools. I suppose the key file is not corrupted because he used it to encrypt/decrypt other files.

    Looks like your friend did not use Java serialization to save the key in the file.
    Edited by: sabre150 on Apr 13, 2008 5:27 PM

  • Invalid stream header Exception - AES PBE with SealedObject

    I am trying to do an PBE encryption with AES algorithm and SunJCE provider, using the SealedObject class to encrypt/decrypt the data...
    And Im still getting the "invalid stream header" exception. Ive searched this forum, readed lots of posts, examples etc...
    Here is my code for encryption (i collected it from more classes, so hopefully I didnt forget anything...):
        //assume that INPUT_STREAM is the source of plaintext
        //and OUTPUT_STREAM is the stream to save the ciphertext data to
        char[] pass; //assume initialized password
        SecureRandom r = new SecureRandom();
        byte[] salt = new byte[20];
        r.nextBytes(salt);
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");
        Cipher ciph = Cipher.getInstance("AES/CTR/NoPadding");
        ciph.init(Cipher.ENCRYPT_MODE, key);
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        int ch;
        while ((ch = INPUT_STREAM.read()) >= 0) {
          byteOut.write(ch);
        SealedObject sealed = new SealedObject(byteOut.toByteArray(), ciph);
        BufferedOutputStream bufOut = new BufferedOutputStream(OUTPUTSTREAM);
        ObjectOutputStream objOut = new ObjectOutputStream(bufOut);   
        objOut.writeObject(sealed);
        objOut.close();
      }And here is my code for decrypting:
        //assume that INPUT_STREAM is the source of ciphertext
        //and OUTPUT_STREAM is the stream to save the plaintext data to
        char[] pass; //assume initialized password
        SecureRandom r = new SecureRandom();
        byte[] salt = new byte[20];
        r.nextBytes(salt);
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");
        BufferedInputStream bufIn = new BufferedInputStream(INPUT_STREAM);    //MARK #1
        ObjectInputStream objIn = new ObjectInputStream(bufIn);   
        SealedObject sealed = (SealedObject) objIn.readObject();   
        byte[] unsealed = (byte[]) sealed.getObject(key);          //MARK #2
        ByteArrayInputStream byteIn = new ByteArrayInputStream(unsealed);
        int ch;
        while ((ch = byteIn.read()) >= 0) {
          OUTPUT_STREAM.write(ch);
        OUTPUT_STREAM.close();Everytime I run it, it gives me this exception:
    Exception in thread "main" java.io.StreamCorruptedException: invalid stream header: B559ADBE
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at javax.crypto.SunJCE_i.<init>(DashoA13*..)
         at javax.crypto.SealedObject.unseal(DashoA13*..)
         at javax.crypto.SealedObject.getObject(DashoA13*..)
         at oopsifrovanie.engine.ItemToCrypt.decrypt(ItemToCrypt.java:91)  //MARKED AS #2
         at oopsifrovanie.Main.main(Main.java:37)    //The class with all code below MARK #1I've also found out that the hashCode of the generated "key" object in the decrypting routine is not the same as the hashCode of the "key" object in the ecrypting routine. Can this be a problem? I assume that maybe yes... but don't know what to do...
    When I delete the r.nextBytes(salt); from both routines, the hashCodes are the same, but that's not the thing I want to do...
    I think, that the source of problem can be this part of code (generating the key):
        SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
        KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);
        SecretKey pbKey = factory.generateSecret(keySpec);
        SecretKeySpec key = new SecretKeySpec(pbKey.getEncoded(), "AES");But I derived it from posts like: [http://forums.sun.com/thread.jspa?threadID=5307763] and [http://stackoverflow.com/questions/992019/java-256bit-aes-encryption] and they claimed it's working there...
    Is there anyone that can help me?
    Btw, I don't want to use any other providers like Bouncycastle etc. and I want to use PBE with AES and also SealedObject to store the parameters of encryption...

    Yes, it really uses only one Cipher object, but it does decoding in a little nonstandard (not often used) way, by using the SealedObject class and its getObject(Key key) method. You can check these links for documentation: [http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#SealedObject] and [http://java.sun.com/javase/6/docs/api/javax/crypto/SealedObject.html] So the question is, why it doesn't work also with the AES routines, because it should.
    Btw, according to [http://java.sun.com/javase/6/docs/technotes/guides/security/SunProviders.html#SunJCEProvider] PBEWithSHA1AndDESede/CBC/PKCS5Padding is a valid JCE algorithm for the Cipher class.
    Firstly, I was generating the key for AES enc./decryption this way and it was working:
    char[] pass; //assume initialized password
    byte[] bpass = new byte[pass.length];
        for (int i = 0; i < pass.length; i++) {
          bpass[i] = (byte) pass;
    SecretKeySpec key = new SecretKeySpec(bpass, "AES");
    But I think, that it really wasn't secure, so I wanted to build a key from the password using the PBE.
    Maybe there's also a way how to do this part of my AES PBE algorithm: *KeySpec keySpec = new PBEKeySpec(pass, salt, 1536, 128);* manually (with my own algorithm), but I dont know how to do it and I'd like it to be really secure.
    Btw, thanks for your will to help.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • New MBP 15" Weird Freezing & Disk (Volume Header) Problems, related?

    Hi all
    I hope someone can help me, and I hope I don't have a faulty Mac!
    I bought a 15" MBP a week ago and while it's awesome, I have a problem where the system will completely freeze, except for the mouse cursor.
    Nothing on the keyboard works, force quit doesn't come up, plugging in / removing the power supply doesn't change the battery icon, there's no spinning beach ball. Literally the whole system is unresponsive except for the mouse cursor which seems to be moving fine. None of the hardware controls work either, i.e. eject button
    The only consistency that I can think of is that of all the times that it has happened, Firefox was open (ver. 2.0.0.2), except once where Firefox had just started (it froze with Firefox darkened in the dock)
    Since then I've reinstalled Firefox but I have another problem and wonder if they're related.
    Fresh out of the box I tried to install Windows through Boot Camp but when Boot Camp tried to partition my disk it gave me an error and referred me to Disk Utilities. Disk Utilities gave me a "Volume Header needs minor repair" error, so I fixed it from an older Mac that I have with the MBP mounted in disk mode.
    This fixed it, Boot Camp then installed fine, I managed to get myself a virus so I deleted the Windows partition through Boot Camp and tried to partition the disk again with the intent of installing Windows and not get a virus this time
    However, Boot Camp gave me the same "Volume Header needs minor repair" error!
    The consistency of these errors is making me concerned about the quality of the hdd that's in my MBP!
    Some info you might need to know about my MBP
    15" MBP Core2Duo
    2.33 ghz
    Boot ROM ver: MBP22.00A5.B01
    SMC Version: 1.12f5
    HDD: Toshiba MK2035GSS
    Revision: DK021B
    The Disk Utility error:
    Verifying volume “Macintosh HD”
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Checking multi-linked files.
    Checking Catalog hierarchy.
    Checking Extended Attributes file.
    Checking volume bitmap.
    Checking volume information.
    Volume Header needs minor repair
    The volume Macintosh HD needs to be repaired.
    Error: The underlying task reported failure on exit
    1 HFS volume checked
    Volume needs repair
    Also, I'm not sure if this has any bearing but I migrated all the info from my old 12" PB onto this.
    I hope someone can tell me that everything's ok!!
    15" MBP, Core2Duo, 2.33; G5 iMac, no iSight; 12" Powerbook 867 Mac OS X (10.4.8)

    Hi all
    I hope someone can help me, and I hope I don't have a faulty Mac!
    I bought a 15" MBP a week ago and while it's awesome, I have a problem where the system will completely freeze, except for the mouse cursor.
    Nothing on the keyboard works, force quit doesn't come up, plugging in / removing the power supply doesn't change the battery icon, there's no spinning beach ball. Literally the whole system is unresponsive except for the mouse cursor which seems to be moving fine. None of the hardware controls work either, i.e. eject button
    The only consistency that I can think of is that of all the times that it has happened, Firefox was open (ver. 2.0.0.2), except once where Firefox had just started (it froze with Firefox darkened in the dock)
    Since then I've reinstalled Firefox but I have another problem and wonder if they're related.
    Fresh out of the box I tried to install Windows through Boot Camp but when Boot Camp tried to partition my disk it gave me an error and referred me to Disk Utilities. Disk Utilities gave me a "Volume Header needs minor repair" error, so I fixed it from an older Mac that I have with the MBP mounted in disk mode.
    This fixed it, Boot Camp then installed fine, I managed to get myself a virus so I deleted the Windows partition through Boot Camp and tried to partition the disk again with the intent of installing Windows and not get a virus this time
    However, Boot Camp gave me the same "Volume Header needs minor repair" error!
    The consistency of these errors is making me concerned about the quality of the hdd that's in my MBP!
    Some info you might need to know about my MBP
    15" MBP Core2Duo
    2.33 ghz
    Boot ROM ver: MBP22.00A5.B01
    SMC Version: 1.12f5
    HDD: Toshiba MK2035GSS
    Revision: DK021B
    The Disk Utility error:
    Verifying volume “Macintosh HD”
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Checking multi-linked files.
    Checking Catalog hierarchy.
    Checking Extended Attributes file.
    Checking volume bitmap.
    Checking volume information.
    Volume Header needs minor repair
    The volume Macintosh HD needs to be repaired.
    Error: The underlying task reported failure on exit
    1 HFS volume checked
    Volume needs repair
    Also, I'm not sure if this has any bearing but I migrated all the info from my old 12" PB onto this.
    I hope someone can tell me that everything's ok!!
    15" MBP, Core2Duo, 2.33; G5 iMac, no iSight; 12" Powerbook 867 Mac OS X (10.4.8)

  • LWAPP"invalid IP header checksum"

    Hello , i hace a problem with a wireless network based on 4 WiSM (two in two 6500) and AP1010. AP's get IP from the DHCP and associate to the controller, but after a while, they start sending a syslog message LWAPP-ERROR: "invalid IP header checksum". I have ping losses and the AP dissasociates, reloads and reassociates to the controller. Does anyone have found the same problem?
    thanks

    What code are you running on the WLC's? I know that with the AP1010, you can't be running the newer code. that is why I ask.
    Is this happening on all 4 WLC's and can you post a snip of the log from the cli.

  • Recurring "Invalid volume directory count" error

    Hi everyone!
    I'm hoping that someone can shed some light on this issue, because I'm just about to lose my mind trying to figure it out!
    I manage a small companies' network of approximately 35 Apple Macintosh computers. All the computers are newer 2009 or later MacBook Pros and 2009 or later iMac running Mac OS 10.5.8 or 10.6.6.
    A small number of computers persistently report one or more "Invalid Volume Directory Count" errors whenever I perform a Verify Disk check in Disk Utility roughly once per month. The errors are always easily corrected by booting the computers from their system CDs and then performing a Repair Disk and/or executing an fsck command in single user mode. Unfortunately, the problem recurs the very next time I check the affected computers' disks.
    One particular user whose computer had always exhibited this problem recently received a new 2010 MacBook Pro 15, and now THIS computer exhibits the problem as well! Even more baffling, and just to be certain I avoided copying any damaged Library component from the old computer's drive, I didn't use the Apple Migration Assistant to migrate this user's hard drive to the new computer; rather, I performed a clean installation of all the applications and then copied his data to the new user account. Once again, Disk Utility reported the same error the very next time I performed a Verify Disk scan on the new computer's drive.
    All staff use the same applications, and most of the other computers do not exhibit this problem.
    I'm completely stumped by this problem! HELP
    Message was edited by: psiciliano

    Hi Thomas!
    Thanks for your advice!
    I doubt that the drives are dying for the following reasons:
    1. The computers are fairly new
    2. I do check the SMART status every time I perform monthly diagnostics, and the affected units' drives always report back ok
    As for backing them up, I will certainly attempt do so more frequently.
    I have to believe that the problem must be caused by the way in which the affected users handle their computers; although when I ask them, they always assure me that they properly shut down and/or restart their computers.
    As for the possibility that a program may be causing the issue, since everyone in this company uses the same software, I would expect this problem to affect considerably more systems than it presently does.
    I will continue to troubleshoot this problem and (hopefully) discover its cause once and for all.
    It's these sorts of problems that will one day do me in...career-wise, anyways.
    Pietro

  • Xorg fails with "/usr/lib/libexpat.so.1: invalid ELF header"

    After upgrade, Xorg fails with the following message:
    (EE) AIGLX error: dlopen of usr/lib/xorg/modules/dri/i965_dri.so failed (/usr/lib/libexpat.so.1: invalid ELF header)
    (EE) AIGLX: reverting to software rendering
    openbox: error while loading shared libraries: /usr/lib/libexpat.so.1: invalid ELF header
    (I also get en error about fbcon, fbdev modules, but have read that this is not actually an issue.)
    Thanks for any help.
    Last edited by marimo (2010-01-24 07:12:25)

    If it were different architectures, there would be an ELF class error. Assuming that all of the installed libraries are from the Arch repos, I'm betting that expat is corrupt. I would reinstall expat and see if that solves the problem.

  • Problem: Invalid BTree Header

    I don't use 9.2.2 much but could it be a problem for 10.4.7? on 9.2.2 I get: Problem: Invalid BTree Header all the time after running Disk first aid again and again. It says it fixed the problem but the error keeps comming back.
    I know this has been disscussed elsewhere but I could not find a definite answer on what to do. I will not use Norton. Please help.
    W.W.

    Hi Walter;
    If DW can touch the problem, about the only solution left is to reformat and reinstall now.
    One question, you did run DW while booted from another disk? If not, DW is not able to repair the disk that the operating system is running from.
    Allan

  • Getting "java.io.StreamCorruptedException: invalid stream header"

    When creating a self made Stream (MacInputStream) and then using an ObjectInputStream over it to read Objects from a socket, I get this error:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
         at TServidor.run(TServidor.java:32)
    Is there any special feature that the "self-made" streams have to implement to be possible to use ObjectInput streams over them :P ?
    Here is the MacInputStream.java code:
    import java.io.Closeable;
    import java.io.FilterInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Arrays;
    import javax.crypto.Mac;
    public class MacInputStream extends FilterInputStream implements Closeable{
         private Mac mac; // algorithm
         private byte [] mmac; //message MAC
         private boolean FIRST_TIME;
         public MacInputStream(InputStream is,Mac mac) {
              super(is);
              this.mac=mac;
              FIRST_TIME=true;
    public int read() throws IOException{
              if(FIRST_TIME){
                   mmac = new byte [mac.getMacLength()];
                   super.read(mmac);
              if(super.in.available()==0){
                   FIRST_TIME=true;
                   return -1;
              int rbyte = super.in.read();
              FIRST_TIME=false;
              mac.update((byte)rbyte);
              System.out.println("available: "+super.in.available());          
              if(super.in.available()==0){
                   byte [] macres =mac.doFinal();
                   System.out.println("message MAC: "+new String(mmac));
                   System.out.println("calculated MAC: "+new String(macres));
                   if(!Arrays.equals(macres, mmac)){
                        throw new IOException("violated integrity");
              return rbyte;
    public int read(byte [] b) throws IOException{
         if(FIRST_TIME){
              mmac = new byte [mac.getMacLength()];
              super.in.read(mmac);          
         if(super.available()==0){
              FIRST_TIME=true;
              return -1;
         int rbytes = super.in.read(b);
         FIRST_TIME=false;
         mac.update(b);
         if(super.available()==0){
              byte [] macres =mac.doFinal();
              if(!Arrays.equals(macres, mmac)){
                   throw new IOException("violated integrity");
         return rbytes;
    }And here is the "main" function where the exception gets thrown:
    public void run() {
         try {
              ObjectOutputStream oos = new ObjectOutputStream(s.getOutputStream());
              Mac mac = Mac.getInstance("HmacMD5");
              Key key = KeyGenerator.getInstance("HmacMD5").generateKey();          
              oos.writeObject(key);
              oos.flush();
              mac.init(key);          
              ObjectInputStream cis = new ObjectInputStream(new MacInputStream(s.getInputStream(),mac));
             String test;
             try {
                   while (true) {
                        test = (String)cis.readObject();
                        System.out.println(ct + " : " + test);
              } catch (EOFException e) {
                   System.out.println("["+ct + "]");
              } finally {
              if (cis!=null) cis.close();
              if (oos!=null) oos.close();
         } catch (Exception e) {
             e.printStackTrace();
        }It's exactly in the line: ObjectInputStream cis = new ObjectInputStream(new MacInputStream(s.getInputStream(),mac));Any ideas?
    I'm starting to desperate :P

    (a) I still don't see where you are writing the MAC that you're reading. You're reading something, but it's all or part of the Object stream header I described above, which is why ObjectInputStream' constructor is throwing that exception.
    (b) You don't need to override read(byte[] b) when you extend FilterInputStream, but you do need to override read(byte[] b, int offset, int length), and you need to do it like this:
    public int read(byte[] buffer, int offset, int length) throws IOException
      int count = 0;
      do
        int c = read();
        if (c < 0)
            break;
        buffer[offset+count++] = (byte)c;
      } while (count < length && available() > 0);
      return count > 0 ? count : -1;
    }This way the read() method gets to see every byte that's read and to do its MAC thing or whatever it does. The above is one of only two correct uses of available() in existence: it ensures that you only block once while reading, which is the correct behaviour e.g. on a network.

  • Java.io.StreamCorruptedException: invalid stream header

    I am having a problem with sending two objects (over a socket). I have read in other posts that this could be due to trying to receive incompatible data types but my applications work fine if I send my objects synchronously rather than asynchronously.
    I will try my best to describe what my problem is as my code is very long.
    I have a server and a client application (2 apps). Multiple clients connect to the server and send their details (as an object) to the server. The server then amends the object (adds some more data) and sends it back to the clients. Both the SendObject and ReceiveObject class are threads and I have created a Listener (within the client) that activates when an object is received (asynchronous communication). The Listener method looks to see if the event is an instance of a particular class and casts is as appropriate (as per below).
    public void receivedObject(ReceivedObjectEvent e) {
         ReceiveObjectThread obj = (ReceiveObjectThread) e.getObject();
         if(obj.getObject() instanceof Player) {
              thePlayer = (Player) obj.getObject();
              theTable.setHandData(thePlayer.getHand());
         if(obj.getObject() instanceof GameData) {
              gameData = (GameData) obj.getObject();
              theTable.setPlayerList(gameData.getOpponents());
    }The objects that are passed between applications both implement Serializable.
    This all works fine synchronously object passing. However, if I try and spawn two sendObject threads within the server and the corresponding two receive threads within the client and wait for the Listener to activate (asynchronously) I get the following error:
    java.io.StreamCorruptedException: invalid stream header: 00057372
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at ReceiveObjectThread.run(ReceiveObjectThread.java:84)
    java.io.StreamCorruptedException: invalid stream header: ACED0006
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
         at ReceiveObjectThread.run(ReceiveObjectThread.java:84)
    I am sure that this problem is due to my limited knowledge on socket and data transfer. Therefore any help on this one will be gratefully received.

    Hello ejp, your reply is very much appreciated.
    If I explain how I have implemented my sockets you may be able to see where I wrong.
    When a player connects, the client sends the server a �player� object. The server receives the �player� object and passes the socket from which it connected (within the server) to a socket property within the �player� class. Whenever the server needs to send an object to that client (player), it sends the output stream from the socket property within that �player� object. ( player.getSocket().getOutputStream() ).
    Below is the code from the �SendObjectThread� class.
    * This class allows an object to be passed over a Socket
    * @author Harold Clements
    * @version 1.0.1 12-Jun-2007 (12-Jul-2007)
    //http://www.seasite.niu.edu/cs580java/Object_Serialization.html
    public class SendObjectThread extends Thread {
         private OutputStream out;
         private Object obj;
          * This constructor allows the user to passes the two parameters for transmitting.
          * @param out The data stream that the object is going to be sent to.
          * @param obj The object to be sent.
         public SendObjectThread(OutputStream out, Object obj) {
              this.out = out;
              this.obj = obj;
          * The main thread
         public void run() {
              try {
                   ObjectOutputStream objOut = new ObjectOutputStream(out);
                   objOut.writeObject(obj);
                   objOut.flush();
              } catch (IOException e) {
                   e.printStackTrace();
    }The client only has one socket which is defined when the client first makes a connection with the server. The �getOutputStream()� and �getInputStream()� are used for all communication from the client.
    Is this what you described in your first option?
    The funny thing about it all is if I create a new �receiveObjectTread� and wait for that to finish, then create another �receiveObjectTread� both objects in question (Player and GameData) are received correctly and the application works. I only have the problem when I set both threads off and leave it for the �ReceivedObjectEvent� listener to pick them up and cast them (as per my first post).
    Thanks again for your help,
    Harold Clements

  • Java.util.zip.ZipException: invalid END header

    I get this error when I run the code:
    try {
    jFile = new JarFile(jarBuildFile.getAbsolutePath());
    } catch (IOException ex) {
    System.out.println("Got exception: "+ex);
    but only on very large jar files - about 2.5GB in size.
    With JDK 1.4, I get the error, jar file too large.
    With JDK 1.5, I get the above error (invalid END header).
    With JDK 1.6, it reads the file for about 5 seconds, then reports that the file cannot be opened.
    Smaller jar files work fine. This jar file has two files in it, a small XML file and a large video file.
    I'm running under windows XP.
    Doing a jar -tvf (jdk 1.5) on the large jar file works fine.
    The file was built with the jar command (jdk 1.5).
    Is this a bug in the JDK?
    Thank you!
    -Joe
    http://www.lovehorsepower.com

    Sp0ttedD0g wrote:
    I ran into this problem today too and found out it was due to the fact that I had a jar in my war that I was trying to deploy that had a file format of unicode instead of binary (it had been checked into source control system incorrectly). After updating the jar with the proper format (binary), the problem went away.The other reported problems are due to file size, not content.

  • It takes 5 minutes to startup and i have "invalid volume directory count"

    I have tried 'restore disk' with install disk, does not work.
    Now it takes 5 minutes to start leopard.....
    Please help....
    This is when i startup:
    12-04-09 21:05:59 com.apple.launchd[107] (0x109840.Locum[197]) Exited: Terminated
    12-04-09 21:06:04 com.apple.loginwindow[24] Shutdown NOW!
    12-04-09 21:06:04 com.apple.loginwindow[24] System shutdown time has arrived
    12-04-09 21:06:05 com.apple.SystemStarter[17] Stopping HP Trap Monitor
    12-04-09 21:06:05 com.apple.SystemStarter[17] Stopping HP IO Monitor
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:18 com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/dashboardadvisoryd.plist
    12-04-09 21:11:18 com.apple.launchd[1] (com.apple.blued) Unknown key for boolean: EnableTransactions
    12-04-09 21:11:18 com.apple.launchd[1] (org.cups.cupsd) Unknown key: SHAuthorizationRight
    12-04-09 21:11:18 com.apple.launchd[1] (org.ntp.ntpd) Unknown key: SHAuthorizationRight
    12-04-09 21:11:40 org.ntp.ntpd[14] Error : nodename nor servname provided, or not known
    12-04-09 21:11:43 com.apple.SystemStarter[17] Starting HP IO Monitor
    12-04-09 21:11:43 com.apple.SystemStarter[17] Starting HP Trap Monitor
    12-04-09 21:12:12 com.apple.launchd[1] (com.apple.UserEventAgent-LoginWindow[101]) Exited: Terminated
    12-04-09 21:12:12 com.apple.launchd[110] (com.apple.AirPortBaseStationAgent) Unknown key for boolean: EnableTransactions

    kennmoo wrote:
    I have tried 'restore disk' with install disk, does not work.
    what exactly doesn't work?
    boot from the leopard install DVD and repair the startup disk (repair disk, not permissions) using disk utility.
    Now it takes 5 minutes to start leopard.....
    Please help....
    This is when i startup:
    12-04-09 21:05:59 com.apple.launchd[107] (0x109840.Locum[197]) Exited: Terminated
    12-04-09 21:06:04 com.apple.loginwindow[24] Shutdown NOW!
    12-04-09 21:06:04 com.apple.loginwindow[24] System shutdown time has arrived
    12-04-09 21:06:05 com.apple.SystemStarter[17] Stopping HP Trap Monitor
    12-04-09 21:06:05 com.apple.SystemStarter[17] Stopping HP IO Monitor
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Missing thread record (id = 7726336)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume directory count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 62222 instead of 62224)
    12-04-09 21:11:16 com.apple.launchctl.System[2] Invalid volume file count
    12-04-09 21:11:16 com.apple.launchctl.System[2] (It should be 269114 instead of 269128)
    12-04-09 21:11:18 com.apple.launchctl.System[2] launchctl: Please convert the following to launchd: /etc/mach_init.d/dashboardadvisoryd.plist
    12-04-09 21:11:18 com.apple.launchd[1] (com.apple.blued) Unknown key for boolean: EnableTransactions
    12-04-09 21:11:18 com.apple.launchd[1] (org.cups.cupsd) Unknown key: SHAuthorizationRight
    12-04-09 21:11:18 com.apple.launchd[1] (org.ntp.ntpd) Unknown key: SHAuthorizationRight
    12-04-09 21:11:40 org.ntp.ntpd[14] Error : nodename nor servname provided, or not known
    12-04-09 21:11:43 com.apple.SystemStarter[17] Starting HP IO Monitor
    12-04-09 21:11:43 com.apple.SystemStarter[17] Starting HP Trap Monitor
    12-04-09 21:12:12 com.apple.launchd[1] (com.apple.UserEventAgent-LoginWindow[101]) Exited: Terminated
    12-04-09 21:12:12 com.apple.launchd[110] (com.apple.AirPortBaseStationAgent) Unknown key for boolean: EnableTransactions

  • Invalid volume file count and directory count

    My wife's macbook pro started shutting down by itself randomly, so i performed Disk Utility Verify Disk and found these errors:
    Invalid volume file count
    (It should be 800651 instead of 800653)
    Invalid volume directory count
    (It should be 191005 instead of 191003)
    The volume Macintosh HD needs to be repaired.
    Error: Filesystem verify or repair failed.
    As i do not have the Mac OS Leopard disks physically with me, I target-disk started her mac on my mac, and use my mac to run Disk Utility on her hard-disk, and repaired the disk without problems.
    However, this is the 3rd or 4th time this has happened. After the 1st time, i figured something is causing it, so i checked this forum, and found that for some, the Blackberry Messenger app causes programs, so i promptly uninstalled it fully (including associated system files) and this problem didnt come back for a while.
    Or could this be a sign the hard disk is physically failing soon? It is out of warranty now. We have regular TimeMachine backups. We are actually kinda waiting out until the new line of macbook pro's come out.. (hopefully in June at WWDC)
    Any suggestions as to how else to address this? Thanks!
    Laptop stats: MacBook Pro 15"
    2.4 GHZ Intel Core 2 Duo
    2 GB RAM
    HDD: 250GB
    Graphics: NVDIA GeForce 9400M VRAM 256MB
    OS: Mac OS Leopard

    Well, the disk errors are due to corruption caused by the random power downs, so focus on getting that issue solved first. What's the stats on the battery?

Maybe you are looking for

  • How many Apps can i have on my iPod Touch, is there a limit?

    Is there a limit on how many Apps i can have on my iPod Touch? Thanks in advance.

  • Open interface error ...Preventing us from closing May-11

    Hi All we are running ERP 12.0.6 on solaris machines. IT was not allowing us to close MAY-11. Reason was there were some 22 error records in TRANSACTION OPEN INTERFACE. I cloned the PRODUCTION INSTANCE to TES to reproduce the problem and deleted all

  • Auto delete sysfail (Permanent error in BPE inbound processing)

    Hi, We have a few BPE processes that get stuck in the queues for various reasons.  Since these are only sent EOIO, they will be stuck in the queue.  We would like to be able to delete these automatically and reactivate/unlock the queue so these error

  • Oracle Argus Study material

    Hi All, I am newbie to Oracle Argus. I would like to become Oracle Argus developer. Argus was not installed in my computer to get the comlete informationa bout Argus. Can any one please share the links for Complete reference for Oracle Argus. Thanks,

  • Have you installed Source Connect?

    Platform:  Windows.   Audition CS6.   iLok key registered.  Source Connect Standard 3.1 on 15-Day Free Trial. Here's where I am with it: The SC software appears to have downloaded correctly and I'm able to see it on the VST listing in my Audition mul