Menu

#360 Supports HSQLDb GraalVM native-image for Android device

open
nobody
graalvm (1)
5
2021-07-29
2021-07-27
No

GraalVM is a new technology coming toward Java world.

And in GraalVM a new more technology is native-image which is becoming popular too.

Please completely supports HSQLDb for GraalVM native-image.

Have test it using javafx, gluonfx-maven-plugin, maven & graalvm on Android device with errors:

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02)
OpenJDK 64-Bit Server VM GraalVM 21.2.0-dev (build 11.0.11+8-jvmci-21.2-b02, mixed mode, sharing)

com.gluonhq:gluonfx-maven-plugin:1.0.3

Let me know if any more info is needed.

Discussion

  • Fred Toussi

    Fred Toussi - 2021-07-27

    For normal Android use, you need to use an HSQLDB jar compiled with JDK 6. This is available from hsqldb.org.

    You can report the errors that you are getting with your setup.

     
    • Abid Maqbool

      Abid Maqbool - 2021-07-28

      Noop using HSQLDb jar file for jdk6 e.g. hsqldb-2.6.0-jdk6.jar (www.hsqldb.org) same problem is happening.
      I have made a sample project here. Will upload logs file latter.

       

      Last edit: Abid Maqbool 2021-07-28
  • Abid Maqbool

    Abid Maqbool - 2021-07-28

    this error is showing:

    org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@2f1bbba9[file =/storage/emulated/0/Document/HsqlDb Database/hsqldb-database.lck, exists=false, locked=false, valid=false, ] method: openRAF reason: java.io.FileNotFoundException: /storage/emulated/0/Document/HsqlDb Database/hsqldb-database.lck (Operation not permitted)
    

    Logs files: client-debug0.log (github.com) & client-debug0.log.1

     
  • Fred Toussi

    Fred Toussi - 2021-07-28

    The error indicates your native image application does not have access permission to create the hsqldb-database.lck file in that location. You need to give the application the necessary permissions.

     
    • Abid Maqbool

      Abid Maqbool - 2021-07-29

      I have assigned permission to external storage in AndroidManifest.xml file too, but still same error is happening.
      I am un-sure what could be problem with GraalVM native-image (Apk) however desktop version works just fine

       
  • Abid Maqbool

    Abid Maqbool - 2021-07-29

    @fredt Thanks for your support. I have finally solved the problem, It was related to permission related for Android 10 / 11 (latest).
    This helps to fix it: https://stackoverflow.com/a/64368904/10606381
    Update HSQLDb sample project for reference of others guys.

     

Log in to post a comment.

MongoDB Logo MongoDB