Just trying out the new SQLCipher 4, for now with an unencrypted database.
SQLCipher 4 can connect to this database fine, but there is a problem with Spatialite.
Spatialite connects to it's own (so a different database file) database, which is unaltered.
Not sure now what the interaction is between SQLCipher and Spatialite.
This is the error I get:
java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__)
at jsqlite.Database.internal_init(Native Method)
at jsqlite.Database.<clinit>(Database.java:1016)
at uk.co.martinpearman.b4a.spatialite.Database.Initialize(Database.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)
at b4a.sqlitelight1.spatialsqlite._opendb(spatialsqlite.java:1625)
at b4a.sqlitelight1.spatialsqlite._initialize(spatialsqlite.java:71)
at b4a.sqlitelight1.main$ResumableSub_Activity_Create.resume(main.java:9029)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1746)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6981)
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:1445)
Any idea what the problem could be here?
RBS
SQLCipher 4 can connect to this database fine, but there is a problem with Spatialite.
Spatialite connects to it's own (so a different database file) database, which is unaltered.
Not sure now what the interaction is between SQLCipher and Spatialite.
B4X:
Sub Class_Globals
Private SPL_Constants As Spatialite_Constants
Private SPL_DB As Spatialite_Database
Private SPLCallBack As Spatialite_Callback
Public strSpatialiteDBName As String
Public strSpatialiteFolder As String
Public strSpatialiteDB As String
End Sub
Public Sub OpenDB
SPL_DB.Initialize '<<<< error here when using new SQLCipher 3.25.2
SPL_DB.Open(strSpatialiteFolder, strSpatialiteDBName, SPL_Constants.SQLITE_OPEN_READWRITE)
End Sub
This is the error I get:
java.lang.UnsatisfiedLinkError: No implementation found for void jsqlite.Database.internal_init() (tried Java_jsqlite_Database_internal_1init and Java_jsqlite_Database_internal_1init__)
at jsqlite.Database.internal_init(Native Method)
at jsqlite.Database.<clinit>(Database.java:1016)
at uk.co.martinpearman.b4a.spatialite.Database.Initialize(Database.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.debug.Debug.delegate(Debug.java:262)
at b4a.sqlitelight1.spatialsqlite._opendb(spatialsqlite.java:1625)
at b4a.sqlitelight1.spatialsqlite._initialize(spatialsqlite.java:71)
at b4a.sqlitelight1.main$ResumableSub_Activity_Create.resume(main.java:9029)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at anywheresoftware.b4a.keywords.Common$14.run(Common.java:1746)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6981)
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:1445)
Any idea what the problem could be here?
RBS