When creating a new database, after naming the file (in this instance, New Database Wed 2) and saving, I get this message. The connection to the data source "New Database Wed 2" could not be established. The driver class 'org.hsqldb.jdbcDriver' could not be loaded.The additional driver class path is 'vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar vnd.sun.star.expand:$LO_JAVA_DIR/sdbc_hsqldb.jar'. I have Java 12.0.1 installed and it is showing and selected in Libre Office preferences.
@JE1 : 1) you're not using an external hsqldb.jar, by any chance ? If so, have you added the path to this via the Add Archive dialog under Preferences > Advanced > Java ? 2) does it work properly if you use JDK11 ? I don't have a problem with creating embedded hsqldb-ODB files with OpenJDK11 for example in LO6152.
Never mind, I can confirm this. The error message I see : La classe de pilote 'org.hsqldb.jdbcDriver' n'a pas pu être chargée.Le chemin de classe du pilote supplémentaire est 'vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar vnd.sun.star.expand:$LO_JAVA_DIR/sdbc_hsqldb.jar'. and expanding the error message : Code d'erreur: -1 java.lang.NullPointerException seems to be the same as the one you report. As OpenJDK11 works for me just fine, it would appear that Oracle has changed something again in its latest release that LO doesn't know how to handle. @sberg : any ideas ?
Tested also with Version: 6.2.2.2 Build ID: 2b840030fec2aae0fd2658d8d4f9548af4e3518d Threads CPU : 8; OS : Mac OS X 10.14.3; UI Render : par défaut; VCL: osx; Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR Calc: threaded where I could reproduce the problem. If I remove OpenJDK12 from my system, LO automatically switches back to OpenJDK11 and all is well again with the embedded hsqldb.
Thanks for the responses. Removing Java seems like a nightmare for someone not tech-friendly like me. Is there a way of installing JDK11 and telling the Mac to choose this one instead of JDK12?
(In reply to JE1 from comment #0) > The connection to the data source "New Database Wed 2" could not be > established. > > The driver class 'org.hsqldb.jdbcDriver' could not be loaded.The additional > driver class path is 'vnd.sun.star.expand:$LO_JAVA_DIR/hsqldb.jar > vnd.sun.star.expand:$LO_JAVA_DIR/sdbc_hsqldb.jar'. > > I have Java 12.0.1 installed and it is showing and selected in Libre Office > preferences. That sounds very much like the issue fixed with <https://gerrit.libreoffice.org/plugins/gitiles/core/+/27c6d1dbdb3dcad02a244ab942adb9222a461e44%5E!/> "Avoid calling java.lang.Class.newInstance()". I have requested a backport to LO 6.2.x now at <https://gerrit.libreoffice.org/#/c/71347/> "Avoid calling java.lang.Class.newInstance()". (But not sure why Alex flagged this as "regression"?) (In reply to JE1 from comment #4) > Is there a way of installing JDK11 and telling the Mac to choose this one > instead of JDK12? There should be no issue installing multiple JDKs on macOS. Then, in LO, go to "LibreOffice - Preferences... - LibreOffice - Advanced" to select a specific Java version to use.
(I just see that the corresponding Java 12 bug I had filed has now been published at <https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8223014> "Calling java.lang.Class.newInstance from JNI Invocation API causes NPE" as a duplicate of <https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8221530> "Field::get and reflective member access not handling caller = null when invoked by JNI code with no java frames on stack", where the latter is stated as fixed in JDK 12.0.2. So an eventual update of JDK 12 should fix this issue, too.)
Thanks. I'm wary of installing another version of JDK as there is conflicting information about this. Hopefully, the update of Java will help me eventually.
(In reply to Stephan Bergmann from comment #5) > (But not sure why Alex flagged this as "regression"?) Ah, my bad, I couldn't remember whether this was the same thing as the one you put a fix in for, because the error message seemed different, and because I didn't have an issue with JDK11 being recognized. > There should be no issue installing multiple JDKs on macOS. Then, in LO, go > to "LibreOffice - Preferences... - LibreOffice - Advanced" to select a > specific Java version to use. Unfortunately, with current LO6222 or 6152, I could only see OpenJDK12 in the Preferences - Advanced - Java dialog, even if I had both OpenJDK11 and OpenJDK12 installed. Once I removed OpenJDK12 from my system, LO picked up OpenJDK11 automatically on next startup. Bizarrely enough, Java 1.8 still appears in that Java dialog, in the various flavours I have installed in my Library/Java folder.
(In reply to Stephan Bergmann from comment #5) > That sounds very much like the issue fixed with > <https://gerrit.libreoffice.org/plugins/gitiles/core/+/ > 27c6d1dbdb3dcad02a244ab942adb9222a461e44%5E!/> "Avoid calling > java.lang.Class.newInstance()". I have requested a backport to LO 6.2.x now > at <https://gerrit.libreoffice.org/#/c/71347/> "Avoid calling > java.lang.Class.newInstance()". ...which is included in libreoffice-6-2 towards LO 6.2.4 as <https://gerrit.libreoffice.org/plugins/gitiles/core/+/bfdae9412f6dfbbf961d462debeab392abe447f9%5E%21> "Avoid calling java.lang.Class.newInstance()" now