chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inouye, Brian" <Brian.Ino...@xerox.com>
Subject Is Android client library thread-safe
Date Wed, 08 Oct 2014 21:10:58 GMT
Hi,

We are using the Android client library (OpenCMIS version 0.10.0) to develop a CMIS Consumer
App.  If a user uses the App to upload a document and, while the upload is progressing, views
another object's properties, the App sometimes crashes with a java.util.ConcurrentModificationException.
 We believe it is caused by multiple threads accessing org.apache.chemistry.opencmis.client.api.ObjectType.
 Is this because the class is not thread-safe?  Is there anything we can do to protect our
App from this exception while being able to access the library from multiple threads?  Would
upgrading to version 0.11 or 0.12 help?

10-01 22:44:45.981: E/AndroidRuntime(27060): FATAL EXCEPTION: main
10-01 22:44:45.981: E/AndroidRuntime(27060): java.util.ConcurrentModificationException
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:347)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:376)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:374)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.HashMap.writeObject(HashMap.java:993)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invokeNative(Native
Method)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invoke(Method.java:525)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1053)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:979)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1074)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.HashMap.writeObject(HashMap.java:995)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invokeNative(Native
Method)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invoke(Method.java:525)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1053)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:979)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1074)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:979)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1074)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:979)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1074)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.util.HashMap.writeObject(HashMap.java:995)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invokeNative(Native
Method)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.lang.reflect.Method.invoke(Method.java:525)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1053)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
10-01 22:44:45.981: E/AndroidRuntime(27060): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
...

... Brian ...


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message