View Issue Details

IDProjectCategoryView StatusLast Update
0004965SymmetricDSBugpublic2021-04-28 19:10
Reportersymds-tryout Assigned Toelong  
Prioritynormal 
Status closedResolutionfixed 
Product Version3.12.8 
Target Version3.12.9Fixed in Version3.12.9 
Summary0004965: AndroidSymmetricEngine: (re)start after stop fails
DescriptionRefers to Android version of SymmetricDS!


Trying to start AndroidSymmetricEngine again after stop was called fails with a NotImplementedException.

This is due to clearCaches calling getMonitorService which is not implemented on AndroidSymmetricEngine:

    public IMonitorService getMonitorService() {
        throw new NotImplementedException();
    }


Not-implemented-services should not lead to a failure on start / in clearCaches of AbstractSymmetricEngine.
Steps To ReproduceStart Engine as normal in an Activity:

startService(intent);


In onPause, call

AndroidSymmetricEngine.findEngineByName(ENGINE_NAME).stop();


In onResume, call

        ISymmetricEngine engine = AndroidSymmetricEngine.findEngineByName(ENGINE_NAME);

        if (engine != null) {
            engine.start();
        }

-> leads to above mentioned error
Additional Information    org.apache.commons.lang3.NotImplementedException
        at org.jumpmind.symmetric.android.AndroidSymmetricEngine.getMonitorService(AndroidSymmetricEngine.java:229)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.clearCaches(AbstractSymmetricEngine.java:1046)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:715)
        at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:649)
        at com.xx.xxxxxxx.MainActivity.onResume(MainActivity.java:133)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1412)
        at android.app.Activity.performResume(Activity.java:7292)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3776)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3816)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Tagsdialect: android

Activities

symds-tryout

2021-04-24 14:17

reporter   ~0001927

Above mentioned stacktrace is followed by:

I/o*.j*.s*.AbstractSymme*: Stopping SymmetricDS externalId=AS-Emu-000 version=development database=sqlite
I/o*.j*.s*.AbstractSymme*: SymmetricDS Node NOT STARTED:
         nodeId=AS-Emu-000
         groupId=mobile
         type=android
         subType=null
         name=xxxxxxxxxx
         softwareVersion=development
         databaseName=sqlite
         databaseVersion=3.0
         driverName=android
         driverVersion=1.0
         uptime=30 sec.

Related Changesets

SymmetricDS: 3.12 3eb75463

2021-04-26 18:12:35

admin

Details Diff
0004965: monitor service not available on android Affected Issues
0004965
mod - symmetric-client/src/main/java/org/jumpmind/symmetric/ClientSymmetricEngine.java Diff File
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/AbstractSymmetricEngine.java Diff File

Issue History

Date Modified Username Field Change
2021-04-24 14:14 symds-tryout New Issue
2021-04-24 14:17 symds-tryout Note Added: 0001927
2021-04-26 18:13 elong Assigned To => elong
2021-04-26 18:13 elong Status new => resolved
2021-04-26 18:13 elong Resolution open => fixed
2021-04-26 18:13 elong Fixed in Version => 3.12.9
2021-04-26 18:13 elong Target Version => 3.12.9
2021-04-26 18:13 elong Tag Attached: dialect: android
2021-04-26 19:00 admin Changeset attached => SymmetricDS 3.12 3eb75463
2021-04-28 19:10 admin Status resolved => closed