Problem in loading Objects using ObjectInputStream

Hello,

*This method load data from the secondary memory*/

public void load() throws Exception

{

//File dataFile = new File(".\\center.dat");

//if (dataFile.exists())

//{

ObjectInputStream in = null;

in = new ObjectInputStream(new

FileInputStream("center.dat"));

System.out.println("Open file for reading");

if(in == null)

System.out.println("File does not open correctly");

//Load courses

courses = (CourseList)in.readObject();

System.out.println("Successfully read courses of the system");

//Load Modules

modules = (ModuleList)in.readObject();

System.out.println("Successfully read modules of the system");

//Load Batches

batches = (BatchList)in.readObject();

System.out.println("Successfully read batches of the system");

//Load Candidates

candidates = (CandidateList)in.readObject();

System.out.println("Successfully read candidates of the system");

in.close();

System.out.println("Close objects file");

//}

}

As i print the message of the exception it printCode excepting

I get this exception when i call readObject method and i had checked Object of ObjectInputStream i.e.in is not null.

Please help me

[1316 byte] By [crazybird_2005a] at [2007-10-1 20:27:54]
# 1
1) Stick to your thread: http://forum.java.sun.com/thread.jspa?threadID=6512472) What's the stack trace?
CeciNEstPasUnProgrammeura at 2007-7-13 2:27:44 > top of Java-index,Java Essentials,Java Programming...
# 2
3) "Code excepting": This is most certainly not what the message is.
CeciNEstPasUnProgrammeura at 2007-7-13 2:27:44 > top of Java-index,Java Essentials,Java Programming...