B4J Question Raspberry Pi SQLite Files WAL & SHM not created


Well-Known Member
Licensed User
Hi All,

on a Raspberry Pi a SQLite webapp is running. During start, the database is created if not found BUT both sqlite db-wal and db-shm files are not created. Running the same webapp under Windows 8.1, both files are created. On the RPi SQLite 3.7.13 is running.

This is the code to create the files:
    If gSQL.ExecQuerySingleResult( _
        "SELECT count(name) FROM sqlite_master WHERE type='table' AND name='" & TblScribblesName & "'") = 0 Then
            'best mode for multithreaded apps.
            gSQL.ExecNonQuery("PRAGMA journal_mode = wal")
            ' Add the columnname and type to the columns map
            For i = 0 To TblScribblesColCount - 1
                columns.Put(TblScribblesColNames(i), TblScribblesColTypes(i))
            DBUtils.createTable(gSQL, TblScribblesName, columns, TblScribblesColNames(0))
            AppLog("> Created Table: " & TblScribblesName)
    End If
Any hint(s) appreciated.
Last edited:


Active Member
Licensed User
sudo java -jar yourjar.jar
'if using b4j-bridge
sudo java -jar /home/b4j-bridge.jar


Well-Known Member
Licensed User
Hi billzhan,

thanks for help = did try that indeed as well - but files are not created. Will explore further.

For those interrested in this B4J HowTo Project, download here.
This B4J webapp shows the usage of jQuery Mobile (jQM) Widgets NavBar, ListView, Pages and Buttons.
Read scribbles.b4j, scribbles.bas and www/index.html for detailed information.
It runs so far fine on a RPi. Still working on exploring how to improve jQM NavBar behaviour on some mobile devices.


Staff member
Licensed User
@rwblinn have you find a solution for this?

I'm using this code:
sql.ExecNonQuery("PRAGMA journal_mode = wal") 'best mode for multithreaded apps.
Log("journal mode: " & sql.ExecQuerySingleResult("PRAGMA journal_mode"))
It returns "delete". This means that it failed to set the jounral mode to wal.

My guess is that the file system doesn't support this mode.


Well-Known Member
Licensed User
Hi Erel,

Log("Connect to the Database...")
sql.InitializeSQLite(File.DirApp, DatabaseFile, True)
Log("Set the journal mode...")
sql.ExecNonQuery("PRAGMA journal_mode = wal") 'best mode for multithreaded apps.
Log("journal mode: " & gSQL.ExecQuerySingleResult("PRAGMA journal_mode"))
On Windows: using sqlite-jdbc-3.8.6, 3.8.7, and results in Journal Mode = wal and the additional files are created.
On Raspberry Pi:
using sqlite-jdbc-3.8.6 and 3.8.7 results in Journal Mode = wal, but the additional files are NOT created.
using sqlite-jdbc- and results in application crashes:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V

Thanks for coming back on this.