The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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 D:\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 D:\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)

asked 03 May '11, 17:28

Mike%20T's gravatar image

Mike T
31223
accept rate: 0%


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.

permanent link

answered 04 May '11, 10:36

Andy%20Quick's gravatar image

Andy Quick
2.1k2436
accept rate: 43%

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.

permanent link

answered 04 May '11, 10:12

PhilippeBertrand%20_SAP_'s gravatar image

PhilippeBert...
1.4k41733
accept rate: 22%

Using 12.0.1.3324.

permanent link

answered 05 May '11, 09:33

Mike%20T's gravatar image

Mike T
31223
accept rate: 0%

1

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:)

(05 May '11, 10:45) Volker Barth

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.

permanent link

answered 18 May '11, 12:52

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×128
×75

question asked: 03 May '11, 17:28

question was seen: 2,225 times

last updated: 18 May '11, 12:52