Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to update mongo drivers to 3.2 #367

Open
tzachi-dar opened this issue Jul 27, 2016 · 8 comments
Open

Need to update mongo drivers to 3.2 #367

tzachi-dar opened this issue Jul 27, 2016 · 8 comments

Comments

@tzachi-dar
Copy link
Collaborator

Starting September 27 at 10:00 am PDT / 5:00 pm UTC, we'll be upgrading all free Sandbox plan databases running MongoDB 3.0 to MongoDB 3.2.

As last year, there are no official drivers for android.

[email protected] has promised to create such drivers soon.

More info on http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility

@tzachi-dar
Copy link
Collaborator Author

Based on a version from [email protected] I have crearted a branch that works on the 3.4 snapshot drivers.
Started running with it.

Any other brave people are welcomed to start testing.

Real testing however will start once we have a db with 3.2 version.
Currently, this is not the case.

Tzachi

@JohanDegraeve
Copy link
Contributor

This would on be for people who use the direct MongoDB upload ?
I'm using the Nightscout REST API

@tzachi-dar
Copy link
Collaborator Author

Anyone using the NS API will not be influenced by this.
But I guess that one will have to update the NS site itself.

@tzachi-dar
Copy link
Collaborator Author

Tough luck, does not seem to work on android 6.

Just found a strange thing:
When running this on a 6.0.1 android device it crashes on start with the following message on logcat:

08-03 14:07:22.269 484 2676 D audio_hw_primary: disable_audio_route: reset and update mixer path: spkr-vi-record
08-03 14:07:22.271 484 2676 I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x2 of type 0 for Event 0
08-03 14:07:22.436 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler>
08-03 14:07:22.436 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler>
08-03 14:07:22.437 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler>
08-03 14:07:22.437 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$WriteCompletionHandler>
08-03 14:07:22.438 14308 14308 I art : Rejecting re-init on previously-failed class java.lang.Class<com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler>
08-03 14:07:22.438 14308 14308 D AndroidRuntime: Shutting down VM
--------- beginning of crash
08-03 14:07:22.444 14308 14308 E AndroidRuntime: FATAL EXCEPTION: main
08-03 14:07:22.444 14308 14308 E AndroidRuntime: Process: com.eveningoutpost.dexdrip.viewer, PID: 14308
08-03 14:07:22.444 14308 14308 E AndroidRuntime: java.lang.NoClassDefFoundError: com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.Class.classForName(Native Method)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.Class.forName(Class.java:324)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.scanForModel(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ModelInfo.(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.Cache.initialize(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.activeandroid.content.ContentProvider.onCreate(Unknown Source)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5158)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4753)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4693)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.-wrap1(ActivityThread.java)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5422)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
08-03 14:07:22.444 14308 14308 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
08-03 14:07:22.452 874 2842 W ActivityManager: Force finishing activity com.eveningoutpost.dexdrip.viewer/com.eveningoutpost.dexdrip.Home
08-03 14:07:22.506 874 11804 I OpenGLRenderer: Initialized EGL, version 1.4
08-03 14:07:22.955 874 887 W ActivityManager: Activity pause timeout for ActivityRecord{1831caf u0 com.eveningoutpost.dexdrip.viewer/com.eveningoutpost.dexdrip.Home t33 f}
08-03 14:07:22.983 5383 5418 W LocationOracle: No location history returned by ContextManager
08-03 14:07:27.595 14308 14308 I Process : Sending signal. PID: 14308 SIG: 9

Since things are working on 4.4 I believe that I'm not doing directly an AsynchronousSocketChannelStream call.

@tzachi-dar
Copy link
Collaborator Author

Looking at the logs, the problem is on active android, which makes the change even more frightening.

Compiled that from source and also created a fix for the issue.
This seems to be working with xdrip, although more testing will be needed.

@kimberlieskandis-gpsw
Copy link

@tzachi-dar , have you found a workaround for this problem on Android 6? I am seeing it on Sony SmartWatch 3 running Android 6.0.1 with Wear. I'm using the mongodb 3.4.0 driver from xDrip+.

09-26 10:20:46.012 29473-29473/com.eveningoutpost.dexdrip E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.eveningoutpost.dexdrip, PID: 29473
java.lang.NoClassDefFoundError: com.mongodb.connection.AsynchronousSocketChannelStream$BaseCompletionHandler
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source)
at com.activeandroid.ModelInfo.scanForModel(Unknown Source)
at com.activeandroid.ModelInfo.(Unknown Source)
at com.activeandroid.Cache.initialize(Unknown Source)
at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
at com.eveningoutpost.dexdrip.Models.Sensor.InitDb(Sensor.java:150)
at com.eveningoutpost.dexdrip.ListenerService$DataRequester.(ListenerService.java:92)
at com.eveningoutpost.dexdrip.ListenerService.sendData(ListenerService.java:310)
at com.eveningoutpost.dexdrip.ListenerService.requestData(ListenerService.java:305)
at com.eveningoutpost.dexdrip.ListenerService.onStartCommand(ListenerService.java:354)

@tzachi-dar
Copy link
Collaborator Author

Did you also update the active android jar?

On Mon, Sep 26, 2016 at 5:30 PM, kimberlieskandis-gpsw <
[email protected]> wrote:

@tzachi-dar https://github.com/tzachi-dar , have you found a workaround
for this problem on Android 6? I am seeing it on Sony SmartWatch 3 running
Android 6.0.1 with Wear. I'm using the mongodb 3.4.0 driver from xDrip+.

09-26 10:20:46.012 29473-29473/com.eveningoutpost.dexdrip
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.eveningoutpost.dexdrip, PID: 29473
java.lang.NoClassDefFoundError: com.mongodb.connection.
AsynchronousSocketChannelStream$BaseCompletionHandler
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:324)
at com.activeandroid.ModelInfo.scanForModelClasses(Unknown Source)
at com.activeandroid.ModelInfo.scanForModel(Unknown Source)
at com.activeandroid.ModelInfo.(Unknown Source)
at com.activeandroid.Cache.initialize(Unknown Source)
at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
at com.activeandroid.ActiveAndroid.initialize(Unknown Source)
at com.eveningoutpost.dexdrip.Models.Sensor.InitDb(Sensor.java:150)
at com.eveningoutpost.dexdrip.ListenerService$DataRequester.
(ListenerService.java:92)
at com.eveningoutpost.dexdrip.ListenerService.sendData(
ListenerService.java:310)
at com.eveningoutpost.dexdrip.ListenerService.requestData(
ListenerService.java:305)
at com.eveningoutpost.dexdrip.ListenerService.onStartCommand(
ListenerService.java:354)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#367 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHkw5OUQ5C2V63gtIUWtByQi-a3_3S4Bks5qt9cdgaJpZM4JWQTX
.

@kimberlieskandis-gpsw
Copy link

Sorry, I only just saw your response:( Yes, that was the problem, I needed to update the ActiveAndroid.jar! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants