Hi,
I've been using externalizable objects and whatever is in Storage I read them and put them in a Vector object ie
Vector<Proprietary Object>=(Vector<Proprietary Object>)Storage.getInstance().readObject("storeName");
This has been working without a hitch but when I try the method shown in Steve Hannah's
blog ie;
ProprietaryObject po=(ProprietaryObject )Storage.getInstance().readObject("storeName");
Object po stores user details eg.UserId,role ,Name etc.
The code works for the first time but when i re-run the program (after successfully logging in and working with Object po, during the first time), it seems nothing was stored because I have to log in again, and I also get an EOF exception:
java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197)
at java.io.DataInputStream.readUTF(DataInputStream.java:609)
at java.io.DataInputStream.readUTF(DataInputStream.java:564)
at com.codename1.io.Util.readUTF(Util.java:969)
at com.sematime.bulksms.userinfo.UserInfo.internalize(UserInfo.java:70)
at com.codename1.io.Util.readObject(Util.java:624)
at com.codename1.io.Storage.readObject(Storage.java:236)
at com.sematime.bulksms.Main.start(Main.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.codename1.impl.javase.Executor$1.run(Executor.java:95)
at com.codename1.ui.Display.processSerialCalls(Display.java:1075)
at com.codename1.ui.Display.mainEDTLoop(Display.java:897)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
What could be the issue? Any help will be greatly appreciated. Find attached the relevant source code.
Regards,
Steve.