I created a VM with a CustomScriptExtension to perform the following:
- download the Visual C++ redistributable, an OpenJDK version 19 ZIP, and a PowerShell script to install the Self-Hosted Integration Runtime software
(https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe, https://download.java.net/java/GA/jdk19.0.1/afdd2e245b014143b62ccb916125e3ce/10/GPL/openjdk-19.0.1_windows-x64_bin.zip, https://raw.githubusercontent.com/Azure/Azure-DataFactory/main/SamplesV2/SelfHostedIntegrationRuntime/AutomationScripts/script-update-gateway.ps1) - all reasonable sources, which I found in official Microsoft documentation.
- silently install the Visual C++ redistributable
- extract OpenJDK and set JAVA_HOME appropriately
- install the self-hosted integration runtime
Java definitely works (e.g. the following works in PowerShell: "& $env:JAVA_HOME\bin\java -version"), Apps & Programs lists Microsoft Visual C++ 2010 x64 Redistibutable, and the integration runtime works for Synapse Pipelines as long as the pipeline does not try to write a file in Parquet format.
However, if I build a pipeline which should write a parquet file, the pipeline fails with an error that jvm.dll cannot be found.
Operation on target Copy data1 failed: ErrorCode=JreNotFound,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Java Runtime Environment cannot be found on the Self-hosted Integration Runtime machine. It is required for parsing or writing to Parquet/ORC files. Make sure Java Runtime Environment has been installed on the Self-hosted Integration Runtime machine.,Source=Microsoft.DataTransfer.Common,''Type=System.DllNotFoundException,Message=Unable to load DLL 'jvm.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E),Source=Microsoft.DataTransfer.Richfile.HiveOrcBridge,'
The file jvm.dll is definitely there, in C:\openjdk-19.0.1_windows-x64_bin\jdk-19.0.1\bin\server, and JAVA_HOME has been set correctly to C:\openjdk-19.0.1_windows-x64_bin\jdk-19.0.1.
I have also tried with the Microsoft Build of OpenJDK (version 17). When I downloaded the ZIP and set JAVA_HOME, I got the same result (I re-started the SHIR). When I downloaded the MSI file and installed using the GUI from double-clicking the MSI (and re-starting the SHIR), that worked. Why does the MSI work and the ZIPs do not?