Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39183

CONNECT Engine JDBC - JVM is loaded from bin\client on Windows

    XMLWordPrintable

Details

    Description

      Running connect.jdbc on Windows fails because jvm.dll cannot be found when only OpenJDK is present on the system and JAVA_HOME is defined.
      Run: https://buildbot.mariadb.org/#/builders/234/builds/47745/steps/13/logs/stdio

      From the log:

      ..
      JAVA_HOME=C:\Program Files\OpenJDK\jdk-22.0.2
      ..
      mysqltest: At line 31: query 'CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=JDBC TABNAME=t2 CONNECTION='jdbc:mysql://localhost:$PORT/connect?user=root&useSSL=false'' failed: ER_UNKNOWN_ERROR (1105): Error 126 loading module jvm.dll: The specified module could not be found. 
      

      Did several checks of latest Java, the jvm.dll is present in bin\server, not bin\client; See javaconn.cpp
      Someone with more knowledge on the history of Java might know why Connect Engine was configured to search it in bin\client.

      Oracle Java JDK 26.0.0 -> https://www.oracle.com/java/technologies/downloads/
      "C:\Program Files\Java\jdk-26\bin\server\jvm.dll"

      Oracle Java JRE 8.0.481
      "C:\Program Files\Java\jre1.8.0_481\bin\server\jvm.dll"

      OpenJDK 25.0.0
      "C:\Program Files\OpenJDK\jdk-25\bin\server\jvm.dll"

      When JRE is installed, jvm.dll can be found, my guess is that the installation of Oracle Java JRE writes some Registry entries that are expected by the Connect Engine.

      My suggestion would be to update the search path to bin\server in: https://github.com/MariaDB/server/blob/685e0f8170a6da1c35e110c9016e8fa7859e6c54/storage/connect/javaconn.cpp#L245
      but I have no Java expertise to measure its impact or correctness.

      As for some history, the only relevant bug I could find is dated 03-2015: https://bugs.openjdk.org/browse/JDK-8075410

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rvarzaru Varzaru Razvan-Liviu
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.