How to recover from java.lang.OutOfMemoryError

The connection to the data source “store” could not be established.

error in script file line: 117 \SSESIGSTORE-PC\Store\database\mydb java.lang.OutOfMemoryError: Java heap space in statement [SET TABLE PUBLIC.“store” INDEX ‘281841 291945 0 0 5902’]

After this error i can’t get to open my database. how to recover my database as it has no backup.

windows 10

LibreOffice Version: 6.0.2.1 (x64)

java-Version 8

HSQLDB-2.4.0

found one solution on search to reduce size of database — shutdown compact;

and combined to be used with micro. its also helps in loading data faster

Sub Backup (oEvent As Object) 'Button > Execute > event

Dim Context

Dim DB

Dim Conn

Dim Stmt

Dim Result

Dim sSQL As String

Context=CreateUnoService(“com.sun.star.sdb.DatabaseContext”) '< get the database context(This for odt form database name)

DB=Context.getByName(“database name”) '<- change database name

Conn=DB.getConnection("","") '<- username & password pair - HSQL default blank

Stmt=Conn.createStatement()

sSQL = “shutdown compact”

Stmt.executeUpdate(sSQL)

End Sub