user1622343
user1622343

Reputation: 969

Storing nested objects using codenameone storage

I am using Codenameone Storage to store a hashtable. The Hashtable contains a vector of hash tables. The hash table in the vector contains different objects including other hash tables. When I try to save by using

Storage.getInstance.write("myCache",hash);

I get this error

java.io.IOException: Object type not supported: java.util.LinkedList value: [com.apiomat.frontend.reportyamain.Service@65d9e279] at com.codename1.io.Util.writeObject(Util.java:367) at com.codename1.io.Util.writeObject(Util.java:213) at com.codename1.io.Util.writeObject(Util.java:200) .....

Is it that some objects or objects types cannot be written to Storage? Are there specific types of objects that can be written?

Upvotes: 0

Views: 267

Answers (1)

Shai Almog
Shai Almog

Reputation: 52770

You need to use Vector and Hashtable at this time other util classes aren't supported by default for persistence.

Upvotes: 0

Related Questions