B4J Question [Server] Run the ServerExampleNoMySQL on Synology

Elric

Well-Known Member
Licensed User
Hello everybody,

while I try to understand my errors to run ServerExample with MariaDB, I've tried to run ServerExampleNoMySQL (https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content) on my NAS Synology.

I've run the ServerExampleNoMySQL code in release mode and copied on web folder the ServerExampleNoMySQL.jar and the "www" folder.

Then I opened the chosen port (51053) on router and start the ServerExampleNoMySQL.jar from the command line with "sudo su" (from the task scheduler it was interrupted and I've gotten "ERR_CONNECTION_REFUSED" in browser).

So, I've get the following nohup.out:
B4X:
2020-12-16 09:49:25.543:INFO::main: Logging initialized @11790ms to org.eclipse.jetty.util.log.StdErrLog
main._createdbutilsexampletables (java line: 151)
java.sql.SQLException: [SQLITE_NOTADB]  File opened that is not a database file (file is encrypted or is not a database)
    at org.sqlite.DB.newSQLException(DB.java:383)
    at org.sqlite.DB.newSQLException(DB.java:387)
    at org.sqlite.DB.throwex(DB.java:374)
    at org.sqlite.NestedDB.prepare(NestedDB.java:134)
    at org.sqlite.DB.prepare(DB.java:123)
    at org.sqlite.PrepStmt.<init>(PrepStmt.java:42)
    at org.sqlite.Conn.prepareStatement(Conn.java:404)
    at org.sqlite.Conn.prepareStatement(Conn.java:399)
    at org.sqlite.Conn.prepareStatement(Conn.java:383)
    at anywheresoftware.b4j.objects.SQL.ExecQuery2(SQL.java:365)
    at anywheresoftware.b4j.objects.SQL.ExecQuerySingleResult2(SQL.java:420)
    at anywheresoftware.b4j.objects.SQL.ExecQuerySingleResult(SQL.java:409)
    at b4j.example.main._createdbutilsexampletables(main.java:151)
    at b4j.example.main._appstart(main.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
    at b4j.example.main.main(main.java:28)

Why "java.sql.SQLException: [SQLITE_NOTADB] File opened that is not a database file (file is encrypted or is not a database)"?

Thank you for your support!
 
Last edited:

Elric

Well-Known Member
Licensed User
It should be the "dbutils.db" that, together to "push.db", are created.

So, thank you Erel. Your question put a doubt in my mind: I've copied on NAS not only the ServerExampleNoMySQL.jar and www folder but also the file created when I've launched in release mode.

So, I try to delete any file except the ServerExampleNoMySQL.jar and www folder and (at moment!) everything seems working!

Thank you!
 
Upvote 0
Top