Very strange serialization problem(in what should be a simple solution)

I'm trying to serialize a hashTable. And i'm trying to do it the same way that I serialized my binaryTree(which had no problems)
But, for some reason it isn't working. I'm getting a SER file of only 3kb, and when I try to read the file after writing it my hashTable is coming out null.
Here is a few code snippets:
public class DictionaryController implements Serializable
     private static final long serialVersionUID = 1L;
     private HashTable hash;
     private Input inputer;
     private RandomAccessFile raf;
     public DictionaryController()
          if(checkDictionary() == true)
               try
                    FileInputStream inFile = new FileInputStream("res/dictionaryHash.ser");
                    ObjectInputStream inStream = new ObjectInputStream(inFile);
                    hash = (HashTable) inStream.readObject();
                    inStream.close();
               catch(IOException ioe)
               catch(ClassNotFoundException cnfe)
          else
               hash = new HashTable(50000, 0.8);
               createRandomDictionary();
     }This is where I try to open it. when I say hash = new HashTable, hash is coming as null when I debug it.
     public void save()
          try
               FileOutputStream outFile = new FileOutputStream("res/dictionaryHash.ser");
               ObjectOutputStream outStream = new ObjectOutputStream(outFile);
               outStream.writeObject(hash);
               outStream.close();
          catch(IOException ioe)
     }That is the save. It only writes the file to the hard drive when I close the GUI.
I've got all of my other classes implementing serializable, so I really can't figure out what is wrong.
Anyone have any ideas? I have long values being stored in my hashTable, but all primitives are already Serializable right??
argg. this seems like it should be such a simple problem but it just won't work. And its almost exactly the same as what I did before...

Yeah, my fault for leaving the catch statements empty.
Anyway, it is the output stream IO that is throwing the exception
What do you mean by: You're probably hiding an instance variable with a member variable, but it's impossible to tell from the little bit of code you've shown.
I can print out more code just need to know what stuff to post.
Here is what i get from the printstacktrace:
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: hashTable.HashTable$TableEntry
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
     at dictionary.DictionaryController.<init>(DictionaryController.java:50)
     at dictionary.MainClass.main(MainClass.java:11)
Caused by: java.io.NotSerializableException: hashTable.HashTable$TableEntry
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
     at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
     at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
     at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
     at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
     at dictionary.DictionaryController.save(DictionaryController.java:157)
     at dictionary.DictionaryGUI$ButtonHandler.actionPerformed(DictionaryGUI.java:91)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
     at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
     at java.awt.Component.processMouseEvent(Component.java:5100)
     at java.awt.Component.processEvent(Component.java:4897)
     at java.awt.Container.processEvent(Container.java:1569)
     at java.awt.Component.dispatchEventImpl(Component.java:3615)
     at java.awt.Container.dispatchEventImpl(Container.java:1627)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
     at java.awt.Container.dispatchEventImpl(Container.java:1613)
     at java.awt.Window.dispatchEventImpl(Window.java:1606)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Similar Messages

  • I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    Hi ..
    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    If that doesn't help, tap Settings > General > Reset > Reset Network Settings
    You may have to re enter your Wi-Fi password.
    If nothing above has helped, try here >  iOS: Troubleshooting Wi-Fi networks and connections

  • OK, here is my problem...i leave my ipod classic charging for 2 days and it still has the 'Please wait, very low battery" sign! what should i do? Please answer!

    OK, here is my problem...i leave my ipod classic charging for 2 days and it still has the 'Please wait, very low battery" sign! what should i do? Please answer!

    When you connect the iPod to the adapter or PC, you should see either of these signs on the iPod Screen .
    If you just get
    It may mean that your Adapter is not giving enough juice, because
    the adapter or the cable  is defective or
    your bottom dock connector is dirty with lint or dirt.
    Have a nice day!

  • Very Strange Internet Problems

    I own a MacBook Pro 15.4 Inch that I purchased about a year and a half ago. I recently upgraded to Leopard and have all the latest updates. I am from the US, and when I am home my internet works fine. However, I am on travel to Seoul, South Korea right now and am having a very strange internet problem.
    As far as I can tell, the URLs that I type in to my browser are, sparodially, not translated correctly into the webpages that they are supposed to represent. This problem is probably effective 75% of the time, and the rest of the time my internet works roughly correctly. For instance, when I enter http://www.google.com, instead of being taken to the Google homepage, I am taking to the homepage of Jammin Beats DJ Service, an obscure website about a company in northern Pennsylvania. The actual URL of this website is http://www.jamminbeats.com, but when my internet is malfunctioning, 'jamminbeats' is for all intensive purposes replaced by 'google' (that is, it applies not only to the main page, but to sub pages, so "http://www.google.com/weddings" takes you to "http://www.jamminbeats.com/weddings" and etc). For most other webpages, one of two things happens. Either I am taken to the correct page but it is displayed without any images or frames (just the html text and links), or I am taken to a blank page with the header "Under Construction", which I assume is the default for a page that doesn't exist. This is why it seems as though the URLs are simply being interpretted erroneously.
    This problem occurs when connecting both to the wireless and the wired internet at my hotel, and it occurs on both Safari and Firefox, so it is not a connection-specific or browser-specific problem. It may be a problem with the hotel's internet, and as of yet I have not had a chance to test the computer at another location. However, a colleague using an IBM computer has had no problems, and I am currently on a Samsung machine in the business center of the hotel and it is working correctly as well. I have searched extensively online for a similar problem but have come up empty handed, and more than anything, I am confused about what might be causing this problem. The strangest thing is that a fraction of the time, the internet functions normally, but it is usually roughly 15 minutes out of every hour, and eventually I am inevitably taken back to Jammin Beats.
    I am a computer science graduate but I still have no idea what would cause this problem. At first I thought it might be a hacker, but if it is, he or she has been at it consistently for 3 days now, and only seems to be targeting my computer. Any ideas or solutions would be greatly appreciated, as I have been forced to resort to the hotel's business center for checking email, doing work, etc. Thanks in advance.

    I did consider that, as I was in Beijing last week and there are a number of censored sites. However, in Korea I have had problems with very basic sites like facebook, wall street journal, google, yahoo, Korean google, my hotel's webpage, etc. Further, I have successfully gotten all of these sites to load seemingly at random, and can access them without problems on other computers. The only disconnect seems to be between my MBP and the internet, not between Korean internet and the web. I have toyed around with the network settings, and although sometimes after switching from "Automatic" to a fixed connection I get some sites to work, it usually only lasts a short time and eventually the same sites stop working. I reset my cache regularly to make sure I'm not getting sent to cached sites, but this also doesn't help. Further, my Apple Mail, Skype and AIM accounts jump between being connected and disconnected randomly as well. Again, this is isolated to my own computer, which is why I'm so confused.

  • Very strange power problem...

    Hey guys (and girls ofcourse),
    I'm having a very strange power problem with my late 2007 2.2Ghz santa rosa macbook.
    Can you guys help me determine what the problem could be?
    Here's what happened prior, when the macbook was still working. I got home from work, plugged my adapter into the wall, and it started charging. I left it on the table, and when I came back from the diner table I continued working, but suddenly noticed my macbook wasn't charging anymore. (the orange/green led wasn't lighting up but i was able to work on battery power)
    I thought it was the poweradapter, so I went to the apple store the next day to lend one to test it. That didn't work, so it's not the adapter.
    So then I started thinking it must be the magnetic DC connector. So I ordered that from the guys at ifixit, (since it's out of warranty) but I replaced it and it's not working.
    I don't think it's the logic board, because I was able to continue working until I ran out of battery power. And I also don't think it's the battery connector, because if i'm not mistaking, the macbook can run without battery as well, but mine can't anymore.
    Now I can't get any life out of my mac anymore...
    Might there be something I overlooked?
    Any suggestions are definately welcome!
    Thanks a lot.
    Timo from Belgium.

    Hi Timo,
    I think i have the same problem, my mac is not working without battery in it. and it wont charge it.
    i wrote a post here http://discussions.apple.com/thread.jspa?threadID=2105648&tstart=0
    let me know if you have fixed the problem
    thanks

  • Very strange MRP Problem

    HI ALL
    I am having a very strange mrp problem and that is
    I created a material with all mrp1and mrp2 requirement,created the info record and source list for that material.I created a reservation for that material which in turn created the deficiency when I did the MD04.I run the MD03,as per re-order point and fix lot size two Preqs created( vendor was not shown in the Preqs even though I established the source list for the material?).I change these Preqs into PurOrds and did the Gr.Every thing fine till here all changes happened in material requirement list(MD04).Now I did one more reservation and created the deficiency again and run MD03 again with a message that mrp done but this time when I went back and checked MD04, there is no Preqs shown and deficiency remained  same as was before. I did the same exercise on several material and every time I am having the same problem as the 2nd time the Preqs don't show in MD04. Please help me as I check upto my knowledge but unable to resolve this one.

    what is the control parameter of the MRP run that you select.

  • Very Strange Bluetooth Problem

    Hi There
    My mac seems to have developed a very strange bluetooth problem. When i try to connect my mighty mouse, it 'connects' then a couple seconds later disconnects, then connects and disconnects etc. during the time that it is apparently connected, the LED on the bottom of the mouse keeps flashing in the way it does when it's searching for a connection, which tells me it ain't connected at all.
    Thinking this was just a mighty mouse problem i try connect my iPhone, same problem. This time I do it with the bluetooth preferences open i notice that the status of the iPhone connection has gone funny (like it has not connected on top of the word connected in the status, one atop the other) this weirdness happens irrespective of what you connect, and only to the iPhone status, even if it's bluetooth is off.
    This weird status thing has happened before, when i was messing about with bluetooth tethering on my iPhone. So, naturally, i assume the iPhone's buggered up the system somehow. I remove it from the list of paired things and try the mouse again, no luck. I try to re add the mouse, but the pairing process doesn't complete itself before the mouse drops signal again. I can't re-pair my iPhone either for the same reason.
    how can i fix this?
    Cheers, Joe

    Hey there,
    Navigate to HD > Users > Your Account > Library > Preferences.
    Locate, and move to the Trash, this file com.apple.Bluetooth.plist.
    If still no luck, try zapping the PRAM to see if that helps. Instructions on how to do that can be found [HERE|http://support.apple.com/kb/HT1379].
    B-rock

  • After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    After installing the new Yosemite OS on my iMac I can no longer send email. I can receive email, but not send. I use gmail and can send email on the gmail (google) site, but not on "mail" on my iMac. Any others with this problem? What should we do?

    My gmail, which is correctly configured for Mail with gmail SMTP and Google IMAP, works for awhile on Mail, which I leave open while working on other applications. But several times a day I get msg from Google: "We recently blocked a sign-in attempt to your Google Account" . . . and requiring me to verify my account details, re-enter passwords, confirm security settings (or change them from "disable" to "enable less secure methods" and so on). In Mail I also have tried "taking all accounts online", and re-entering my gmail password inside Mail account settings. These steps successfully re-set comms between gmail and Mail ... for awhile, then it happens again. Enough occurrences over a work day that I just quit Mail and revert to accessing gmail directly. Apple Care advisor and an Apple knowledge base article say that Apple can't deal with this, as gmail is third-party app, and they refer me to gmail, and so far I've found nothing helpful there.
    From today I also have several instances of a window saying "Mail has unexpectedly closed" and asking me to Re-open it.
    I also use Yahoo mail, which stops working with Mac Mail at the same time as gmail, but I do not receive notices to re-verify from Yahoo.
    I recently upgraded from Mavericks to Yosemite. The Mail problem happened occasionally with Mavericks but is far more frequent with Yosemite.

  • After installing the new Yosemite OS on my Macbook pro late 2013 touch trap has its own mind. Any others with this problem? What should we do?

    After installing the new Yosemite OS on my Macbook pro late 2013 touch trap has its own mind. Any others with this problem? What should we do?
    Even I tried to get back to Maverick but the touch pad doesn't work again. well, it works for a couple hours then start doing things but its own. it is so annoying.

    Hello josefromlaie,
    Thank you for using Apple Support Communities. 
    The following article provides some effective steps to troubleshoot trackpad issues:
    Intel-based Mac notebooks: Troubleshooting unresponsive trackpad issues
    Regards,
    Jeff D. 

  • My "other" in my itunes in over 12GB, I have restored my phone but encountered the same problem.   What should i do?

    My "other" in my itunes in over 12GB, I have restored my phone but encountered the same problem.   What should i do?

    Have you got any apps that have large amounts of data, e.g. 3rd party video players?
    tt2

  • HT3965 i put an emoji in my ipod name , and itunes will not recongize my ipod. could the emoji be the cause to my problem? what should i do?

    i put an emoji in my ipod name , and itunes will not recongize my ipod. could the emoji be the cause to my problem? what should i do?

    If you think the emoji is the cause of the problem, why not remove the emoji from your name?

  • Ever since I downloaded this latest version, my browser is not loading the page. Says can't find the server error. This is very frustrating and slow. What should I do.

    Ever since I downloaded this latest version, my browser is not loading the page. Says can't find the server error. This is very frustrating and slow. What should I do.

    That file might have moved to a different location on the server. I think you'll need to check with RefWorks support or your local IT department on why the install page links do not work.

  • My iPad (new 16gb) is often high temp and makes many times restarts. Is this problem? What should I do?

    My iPad (new 16gb) is often high temp and makes many times restarts. Is this problem? What should I do?

    Take it back. Dont try to trouble shoot. I just upgraded to the new ipad last week. Mine doesnt do that. It doesnt even get that "hot" like people say. A little warmer, yes. It should no way keep restarting due to temperature. If someone here says its normal, they are full of crap. Dont screw around with it, just take it back asap and explain it to apple. You will get another one.

  • Very Strange Focus problem

    I've encountered a very strange focus problem that I hope someone can help me
    with. In my frame, I have a toolbar and some JTextFields. When I press one of
    the toolbar buttons, I do whatever and at the very end I use requestFocusInWindow()
    to set the focus to one of the JTextFields. Now here's the strange part. If I don't
    touch the keyboard or the mouse, I can see the caret in the JTextField as expected.
    As soon as I move the mouse or touch any key, the focus changes to the next
    toolbar button. Makes no sense to me. By the way, I'm running 1.4 on Windows NT.

    Create a new class ToolbarButton extends JButton where you have the following method:
         * Identifies whether or not this component can receive the focus.
         * A disabled button, for example, would return false.
         * @return true if this component can receive the focus
        public boolean isFocusTraversable() {
           return false;
        }This prevents the buttons from getting keyboard focus, this makes only sense for toolbar buttons.
    Cheers,
    Taoufik

  • TS1368 Can't sign-in to my own account. I'm very sure my user id and password are correct. Is it temporary problem? What should I do?

    I've tried to connect to iTune store and my account from both iPhone4 and MacBook Air but it's unsuccessful. I'm very sure my user id and password are correct. Is there ny temporary server problem?
    Please advise what should I do?

    There are currently problems with the iTunes Store affecting 20% of people : https://www.apple.com/support/systemstatus/
    You could occasionally check that page, and when it says it's fixed try again and if you still have problems then post back.

Maybe you are looking for