B4J Question sqlite missuse - library used incorrectly - out of memory

le_toubib

Active Member
Licensed User
Longtime User
hi all
merry christmas 🎅
happy hanuka
in my project (too big to upload) i m using table view to load data from a list of map sent buy a php server to mysql DB ,, works like a charm ..
when i shifted to B4xtable (reasonable, delayed upgrade), it worked beautifully but, i got this error :
B4X:
java.sql.SQLException: [SQLITE_MISUSE]  Library used incorrectly (out of memory)
    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.NativeDB.prepare(Native Method)
    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$2.run(SQL.java:264)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
indeed i'm not using sqlite ,
there is NO queries in this front end .
i couldnt find where the error was originated since the post request is in a loop with a wait for jobdone, and the error appears t the end of the loop , and data are loaded correctly .
it s too late to shift to jrdc2 ... it s already too big for that.
thanks jingle bells
 

le_toubib

Active Member
Licensed User
Longtime User
I found the error , it's my mistake , was loading records onto the same row..
Not sure why would this be an incorrect use of library .
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
I found the error , it's my mistake , was loading records onto the same row..
Not sure why would this be an incorrect use of library .
Glad you found the issue and resolved it.
However, without the code and "just" a brief explanation of your problem - it causes many to "read and ignore" - since few of us are mind readers...
We are tired of posting - "Supply Some Code" - so we can see where you at at with an issue. (@Erel - We need another option along with -Like, Reply - SUPPLY RELEVANT CODE!)

Frankly, too many of these posts are of this nature and result in cluttering the forum with useless distractions.
I, like many others, read topics of interest and hope to gain some knowledge - and help resolve problems when we can.

I also see that many "jump the gun" - post an issue without taking the time to think it thru prior to posting - and resolve it themselves within short order.

Not a dis - just an observation, of which I am sure I have ranted on, many times previously.

Thanks
 
Upvote 0
Top