cancel
Showing results for 
Search instead for 
Did you mean: 

Android UltraliteJ DatabaseManager.release() == No implementation found for native

Former Member
5,177

I'm working on a simple MonoDroid -> Java -> UltraliteJ sample, and have found that calling DatabaseManager.release() causes an error.

The actual error is: "No implementation found for native Lcom/ianywhere/ultralitejni12/implementation/JniDbMgr;.release ()V".

I noticed that Android sample doesn't call it at all, so maybe this is not needed and should not be called? The help file does make it sound useful though.

Java Code:

public static void disconnectDB()
{
    Log.v(TAG, "disconnectDB: E");
    if (null != conn_) {
        Log.v(TAG, "disconnectDB: DatabaseManager.release");                
        try {
            DatabaseManager.release();          
        } catch (ULjException e) {
            Log.v(TAG, "disconnectDB: **catch** DatabaseManager.release");          
        }
        conn_ = null;
    }
    Log.v(TAG, "disconnectDB: X");
}

Stack dump from DDMS:

05-03 16:10:54.616: VERBOSE/jni_helper(26001😞 disconnectDB: E
05-03 16:10:54.616: VERBOSE/jni_helper(26001😞 disconnectDB: DatabaseManager.release
05-03 16:10:54.616: WARN/dalvikvm(26001): No implementation found for native Lcom/ianywhere/ultralitejni12/implementation/JniDbMgr;.release ()V
05-03 16:10:58.947: DEBUG/dalvikvm(1392): GC_EXPLICIT freed 4362 objects / 232648 bytes in 93ms
05-03 16:11:02.426: DEBUG/WifiService(1054😞 ACTION_BATTERY_CHANGED pluggedType: 1
05-03 16:11:07.457: DEBUG/dalvikvm(25588): GC_EXPLICIT freed 91 objects / 4600 bytes in 59ms
05-03 16:11:09.757: INFO/MonoDroid(26001😞 UNHANDLED EXCEPTION: Java.Lang.UnsatisfiedLinkError: Exception of type 'Java.Lang.UnsatisfiedLinkError' was thrown.
05-03 16:11:09.757: INFO/MonoDroid(26001): at Android.Runtime.JNIEnv.CallStaticVoidMethod (intptr,intptr) [0x00022] in /home/jpobst/Desktop/mondroid/Mono.Android/src/Runtime/JNIEnv.cs:1059
05-03 16:11:09.757: INFO/MonoDroid(26001😞 at MonoUltralite.MonoUltraliteHelper.disconnectDB () [0x0001b] in 😧\\IGG\\MonoUltralite\\MonoUltralite\\UltraliteActivity1.cs:28
05-03 16:11:09.757: INFO/MonoDroid(26001😞 at MonoUltralite.UltraliteActivity1.<OnCreate>b__2 (object,System.EventArgs) [0x0000d] in 😧\\IGG\\MonoUltralite\\MonoUltralite\\UltraliteActivity1.cs:70
05-03 16:11:09.757: INFO/MonoDroid(26001): at Android.Views.View/IOnClickListenerImplementor.OnClick (Android.Views.View) [0x0000b] in /home/jpobst/Desktop/mondroid/Mono.Android/platforms/android-8/src/generated/Android.Views.View.cs:632
05-03 16:11:09.757: INFO/MonoDroid(26001): at Android.Views.View/IOnClickListenerAdapter.n_OnClick_Landroid_view_View_ (intptr,intptr,intptr) [0x00010] in /home/jpobst/Desktop/mondroid/Mono.Android/platforms/android-8/src/generated/Android.Views.View.cs:565
05-03 16:11:09.757: INFO/MonoDroid(26001😞 at (wrapper dynamic-method) object.59879d76-a089-4e7d-aaa8-f1f7691b5920 (intptr,intptr,intptr) <IL 0x00012, 0x00033>
05-03 16:11:09.757: INFO/MonoDroid(26001😞   --- End of managed exception stack trace ---
05-03 16:11:09.757: INFO/MonoDroid(26001😞 java.lang.UnsatisfiedLinkError: release
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at com.ianywhere.ultralitejni12.implementation.JniDbMgr.release(Native Method)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at com.ianywhere.ultralitejni12.implementation.JniDbMgr.Release(Unknown Source)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at com.ianywhere.ultralitejni12.DatabaseManager.release(Unknown Source)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at monoultralite.helper.jni_helper.disconnectDB(jni_helper.java:47)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at mono.android.view.view.IOnClickListenerAdapter.n_onClick(Native Method)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at mono.android.view.view.IOnClickListenerAdapter.onClick(IOnClickListenerAdapter.java:9)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.view.View.performClick(View.java:2408)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.view.View$PerformClick.run(View.java:8816)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.os.Handler.handleCallback(Handler.java:587)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.os.Handler.dispatchMessage(Handler.java:92)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.os.Looper.loop(Looper.java:123)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at android.app.ActivityThread.main(ActivityThread.java:4627)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at java.lang.reflect.Method.invokeNative(Native Method)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at java.lang.reflect.Method.invoke(Method.java:521)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-03 16:11:09.757: INFO/MonoDroid(26001😞     at dalvik.system.NativeStart.main(Native Method)

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member

Yes, this is a bug. The purpose of DatabaseManager.release() is to release any open Connection's and shut down the database. Right now, this will happen automatically when the application terminates. In an upcoming EBF we will implement DatabaseManager.release() so that your application can call it.

Thanks.

jeff_albion
Product and Topic Expert
Product and Topic Expert
0 Kudos

This issue has been fixed in CR #668820, build 12.0.1.3345: http://search.sybase.com/kbx/changerequests?bug_id=668820


Description: Calling the method DatabaseManager.release() would have caused the error: "No implementation found for native Lcom/ianywhere/ultralitejni12/implementation/JniDbMgr;.release ()V". This has been corrected by implementing the method DatabaseManager.release().

Note that prior to this fix, UltraLiteJ for Android would have done the equivalent of DatabaseManager.release() when the UltraLiteJ application terminated. Now it is possible for the application to execute DatabaseManager.release() at a specific point in time.

Former Member
0 Kudos

Using 12.0.1.3324.

VolkerBarth
Contributor

Just as a small recommendation: You can easily add such short answers as comments to the according answer (here from Philippe) by using the "add new comment" button - or edit your question (in case the rep count does allow for that). It helps to understand the context:)

philippefbertrand
Participant
0 Kudos

We are investigating but on the surface it appears like there is a bug. Could you please post the full version number (including build number) you are using?

As a work around, you should just release the connection.