TouchDB Android - Not working on Nexus S

57 views
Skip to first unread message

ucfknight

unread,
Oct 1, 2012, 10:22:10 AM10/1/12
to mobile-c...@googlegroups.com
The app runs fine on Samsung Galaxy Y, while it throws the following error when I try to run on Nexus S :

D/dalvikvm(24054): Trying to load lib /data/data/com.allogy.capillary/lib/libcom_couchbase_touchdb_TDCollateJSON.so 0x416b60b0
D/dalvikvm(24054): Added shared lib /data/data/com.allogy.capillary/lib/libcom_couchbase_touchdb_TDCollateJSON.so 0x416b60b0
E/TDCollateJSON(24054): Can't find SQLiteDatabase.mNativeHandle
E/TDDatabase(24054): Exception in TDRouter
E/TDDatabase(24054): java.lang.reflect.InvocationTargetException
E/TDDatabase(24054): at java.lang.reflect.Method.invokeNative(Native Method)
E/TDDatabase(24054): at java.lang.reflect.Method.invoke(Method.java:511)
E/TDDatabase(24054): at com.couchbase.touchdb.router.TDRouter.start(TDRouter.java:390)
E/TDDatabase(24054): at com.couchbase.touchdb.ektorp.TouchDBHttpClient.executeRequest(TouchDBHttpClient.java:211)
E/TDDatabase(24054): at com.couchbase.touchdb.ektorp.TouchDBHttpClient.post(TouchDBHttpClient.java:116)
E/TDDatabase(24054): at org.ektorp.http.RestTemplate.post(RestTemplate.java:65)
E/TDDatabase(24054): at org.ektorp.impl.StdCouchDbInstance.replicate(StdCouchDbInstance.java:86)
E/TDDatabase(24054): at com.allogy.capillary.touchdb.TouchDBReplicationService.onHandleIntent(TouchDBReplicationService.java:109)
E/TDDatabase(24054): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/TDDatabase(24054): at android.os.Handler.dispatchMessage(Handler.java:99)
E/TDDatabase(24054): at android.os.Looper.loop(Looper.java:137)
E/TDDatabase(24054): at android.os.HandlerThread.run(HandlerThread.java:60)
E/TDDatabase(24054): Caused by: java.lang.NoSuchFieldError: no field with name='mNativeHandle' signature='I' in class Landroid/database/sqlite/SQLiteDatabase;
E/TDDatabase(24054): at com.couchbase.touchdb.TDCollateJSON.nativeRegisterCustomCollators(Native Method)
E/TDDatabase(24054): at com.couchbase.touchdb.TDCollateJSON.registerCustomCollators(TDCollateJSON.java:11)
E/TDDatabase(24054): at com.couchbase.touchdb.TDDatabase.open(TDDatabase.java:235)
E/TDDatabase(24054): at com.couchbase.touchdb.router.TDRouter.do_POST_replicate(TDRouter.java:530)
E/TDDatabase(24054): ... 12 more
D/dalvikvm(24054): GC_CONCURRENT freed 450K, 7% free 8488K/9031K, paused 12ms+18ms, total 65ms
W/System.err(24054): org.ektorp.DbAccessException: com.couchbase.touchdb.ektorp.TouchDBHttpResponse@416d5fe0
W/System.err(24054): URI: touchdb:///_replicate
W/System.err(24054): Response Body: 
W/System.err(24054): null
W/System.err(24054): at org.ektorp.http.StdResponseHandler.createDbAccessException(StdResponseHandler.java:44)
W/System.err(24054): at org.ektorp.http.StdResponseHandler.error(StdResponseHandler.java:62)
W/System.err(24054): at org.ektorp.http.RestTemplate.handleResponse(RestTemplate.java:110)
W/System.err(24054): at org.ektorp.http.RestTemplate.post(RestTemplate.java:65)
W/System.err(24054): at org.ektorp.impl.StdCouchDbInstance.replicate(StdCouchDbInstance.java:86)
W/System.err(24054): at com.allogy.capillary.touchdb.TouchDBReplicationService.onHandleIntent(TouchDBReplicationService.java:109)
W/System.err(24054): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
W/System.err(24054): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err(24054): at android.os.Looper.loop(Looper.java:137)
W/System.err(24054): at android.os.HandlerThread.run(HandlerThread.java:60)
D/dalvikvm(24077): Late-enabling CheckJNI

Any hunch as to what I could be doing wrong?

Marty Schoch

unread,
Oct 1, 2012, 10:36:51 AM10/1/12
to mobile-c...@googlegroups.com
Do you have the latest version?  I updated the code to work with 4.1 a few weeks back.  If you already have the latest, it's possible the API changed again.

We have a patch pending review that will eliminate the need for native code.  Once we merge this patch this type of problem should go away.

Marty

Sent from my iPhone
--
 
 

ucfknight

unread,
Oct 1, 2012, 11:28:53 AM10/1/12
to mobile-c...@googlegroups.com
Thanks for the reply. I updated and the app is now working fine.

--
Pramod
Reply all
Reply to author
Forward
0 new messages