have problem with Firebird. I have never work with DB. DB on server firebird 1.5.
Add lib:
firebird-full-2.2.4
to libs folderAdd this to Gradle:
implementation fileTree('libs')
Add this to MainActivity:
Class.forName("org.firebirdsql.jdbc.FBDriver") val connection = DriverManager.getConnection( "jdbc:firebirdsql://jdbc:firebirdsql:193.###.###.13/3050:Scool", "###", "###") connection.close()
After start I have this:
E/AndroidRuntime: FATAL EXCEPTION: main Process: success.kneu, PID: 12219 java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/resource/Referenceable; at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:400) at java.lang.Class.forName(Class.java:326) at success.kneu.LoginActivity$onCreate$1.onClick(LoginActivity.kt:48) at android.view.View.performClick(View.java:5647) at android.view.View$PerformClick.run(View.java:22465) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6238) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) Caused by: java.lang.ClassNotFoundException: javax.resource.Referenceable at java.lang.VMClassLoader.findLoadedClass(Native Method) at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742) at java.lang.ClassLoader.loadClass(ClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:400) at java.lang.Class.forName(Class.java:326) at success.kneu.LoginActivity$onCreate$1.onClick(LoginActivity.kt:48) at android.view.View.performClick(View.java:5647) at android.view.View$PerformClick.run(View.java:22465) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6238) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/naming/Referenceable; at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:400) at java.lang.Class.forName(Class.java:326) at success.kneu.LoginActivity$onCreate$1.onClick(LoginActivity.kt:48) at android.view.View.performClick(View.java:5647) at android.view.View$PerformClick.run(View.java:22465) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6238) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) Caused by: java.lang.ClassNotFoundException: Didn't find class "javax.naming.Referenceable" on path: DexPathList[[zip file "/data/app/success.kneu-1/base.apk", zip file "/data/app/success.kneu-1/split_lib_dependencies_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_0_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_1_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_2_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_3_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_4_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_5_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_6_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_7_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_8_apk.apk", zip file "/data/app/success.kneu-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/success.kneu-1/lib/arm64, /system/lib64, /vendor/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:380) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:400) at java.lang.Class.forName(Class.java:326) at success.kneu.LoginActivity$onCreate$1.onClick(LoginActivity.kt:48) at android.view.View.performClick(View.java:5647) at android.view.View$PerformClick.run(View.java:22465) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6238) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823) 2019-07-14 17:37:03.815 12219-12219/? I/Process: Sending signal. PID: 12219 SIG: 9
firebird-full-2.2.4.jar
, it could be a jar from a questionable source, because the normal distribution calls itjaybird-full-2.2.4.jar
. – Mark Rotteveel