Title: Java Reflection fail on thread · Issue #735 · NativeScript/android · GitHub
Open Graph Title: Java Reflection fail on thread · Issue #735 · NativeScript/android
X Title: Java Reflection fail on thread · Issue #735 · NativeScript/android
Description: Hi Guys WHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed). platform: android tns-core-modules 2.5.0 version Runtime version: 2.5.0 version My Plugin : 1.0.0 version (https://github.com/nabil...
Open Graph Description: Hi Guys WHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed). platform: android tns-core-modules 2.5.0 version Runtime version: 2.5.0 version My Plugin :...
X Description: Hi Guys WHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed). platform: android tns-core-modules 2.5.0 version Runtime version: 2.5.0 version My Plugin :...
Opengraph URL: https://github.com/NativeScript/android/issues/735
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Java Reflection fail on thread","articleBody":"Hi Guys\r\nWHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed). \r\n\r\nplatform: android\r\ntns-core-modules 2.5.0 version\r\nRuntime version: 2.5.0 version\r\nMy Plugin : 1.0.0 version (https://github.com/nabil-mansouri/nativescript-couchbaselite)\r\n\r\nI am trying to create a couchbase plugin that make available all features. But when i am trying to create view , i need to emit keys. This is done in couchbase in a separate thread. When my emit bloc is called, it throws a \"ClassnotfoundException\" on tns runtime. But when i try to get java.lang.Class.forName(\"com.couchbase.lite.store.SQLiteViewStore$AbstractMapEmitBlock\") on main thread , **it works**! It seems that runtime is not looking on the same classloader?\r\n\r\nHere are my unit tests (npm run test-android): \r\nhttps://github.com/nabil-mansouri/nativescript-couchbaselite/blob/master/tests/app/tests/couchbase.ts \r\n\"should live query\" failed\r\n\r\nOn adb logcat i have this stacktrace:\r\n```\r\n03-24 07:19:19.067 2366 2441 V View : Re-indexing view: users_live\r\n03-24 07:19:19.069 2366 2441 V View : users_live last indexed at #0\r\n03-24 07:19:19.069 2366 2441 V View : Updating indexes of (users_live) from #0 to #4 ...\r\n03-24 07:19:19.164 2366 2441 V View : #1: map '1' for view users_live...\r\n03-24 07:19:19.166 2366 2440 W System.err: java.lang.ClassNotFoundException: com.couchbase.lite.store.SQLiteViewStore$AbstractMapEmitBlock\r\n03-24 07:19:19.185 2366 2440 W System.err: at java.lang.Class.classForName(Native Method)\r\n03-24 07:19:19.185 2366 2440 W System.err: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)\r\n03-24 07:19:19.185 2366 2440 W System.err: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\r\n03-24 07:19:19.185 2366 2440 W System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)\r\n03-24 07:19:19.185 2366 2440 W System.err: at com.tns.Runtime.getTypeMetadata(Runtime.java:719)\r\n03-24 07:19:19.185 2366 2440 W System.err: at com.tns.Runtime.callJSMethodNative(Native Method)\r\n03-24 07:19:19.185 2366 2440 W System.err: at com.tns.Runtime.access$2400(Runtime.java:33)\r\n03-24 07:19:19.185 2366 2440 W System.err: at com.tns.Runtime$3.run(Runtime.java:1214)\r\n03-24 07:19:19.185 2366 2440 W System.err: at android.os.Handler.handleCallback(Handler.java:739)\r\n03-24 07:19:19.185 2366 2440 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)\r\n03-24 07:19:19.185 2366 2440 W System.err: at android.os.Looper.loop(Looper.java:148)\r\n03-24 07:19:19.185 2366 2440 W System.err: at android.os.HandlerThread.run(HandlerThread.java:61)\r\n03-24 07:19:19.185 2366 2440 W System.err: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available\r\n```\r\n\r\nEdit: proper formatting to help readability","author":{"url":"https://github.com/nabil-mansouri","@type":"Person","name":"nabil-mansouri"},"datePublished":"2017-03-24T09:44:02Z","url":"https://github.com/NativeScript/android/issues/735"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8bafd75d-aaca-1ac6-e55f-8d54dca01480 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8F2:37820D:196FB0D:21B8D3B:6B013BC1 |
| html-safe-nonce | c58038161e485eaf0b22b4ae49afbcd0c882733aa7c88a6b67c02c9a108bf913 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEYyOjM3ODIwRDoxOTZGQjBEOjIxQjhEM0I6NkIwMTNCQzEiLCJ2aXNpdG9yX2lkIjoiOTE1OTUwODIyODYwMDU3Njk2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 323b94cbfc784f9ed35343ce6f3e9ef0d27a1a641967d56084f89437cb07b902 |
| hovercard-subject-tag | issue:216719289 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/android/735/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4c89901893f1783342428606bd38a95257c004beaa156cb94656af06ed3fa94/NativeScript/android/issues/735 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4c89901893f1783342428606bd38a95257c004beaa156cb94656af06ed3fa94/NativeScript/android/issues/735 |
| og:image:alt | Hi Guys WHEN USING ANDROID THREAD, SOME CLASSES ARE NOT FOUND BY CLASSLOADER (tns.Runtime.callJS failed). platform: android tns-core-modules 2.5.0 version Runtime version: 2.5.0 version My Plugin :... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nabil-mansouri |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width