In order to increase thread-safety, I have replaced an ArrayList by a CopyOnWriteArrayList as an attribute of a class.
The issue is that now Berkeley DB JE (4.0.17) does not work with that object.
Just creating an index is now rejected:
java.lang.IllegalArgumentException: Class could not be loaded or is not persistent: java.util.concurrent.CopyOnWriteArrayList'
Do you know it there is a mean to use CopyOnWriteArrayList with Berkeley DB?
To answer your question we need a little more information. If you created a PersistentProxy for CopyOnWriteArrayList and you registered it properly, then it should work in JE 3.3 and 4.0. Perhaps there is something you were doing wrong, but it just happened to work in 3.3, and it no longer works in 4.0.
Could you please post the details on what your proxy class looks like and how you are registering it?
In the object I want to save with BerkeleyDB, I used to have that attribute "ArrayList<String> myList = new ArrayList<String>(); "
Save was ok.
The issue came when I replaced ArrayList by CopyOnWriteArrayList, said everywhere to be equivalent but thread-safe.
"CopyOnWriteArrayList<String> myList = new CopyOnWriteArrayList<String>(); "
does not work
It seems that that class is nor really equivalent.
What shall I do?