Synapse Pipeline cannot fid jvm.dll despite presence of Visual C++ and OpenJDK (JAVA_HOME correctly set)

Oleary, Benjamin 1 Reputation point
2022-12-05T16:35:20.037+00:00

I created a VM with a CustomScriptExtension to perform the following:

  1. 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.
  2. silently install the Visual C++ redistributable
  3. extract OpenJDK and set JAVA_HOME appropriately
  4. 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?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,737 Reputation points Microsoft Employee Moderator
    2022-12-07T02:20:44.903+00:00

    Hello @Oleary, Benjamin ,

    Thanks for the question and using MS Q&A platform.

    Though installed the JDK, it could be a mismatch in the JRE version vs Registry key version. Could you please verify and confirm the below:

    1. Double-check that the IR and JRE match bit-wise (e.g., both 64-bit)
    2. Check that JAVA_HOME is set correctly in the environment variables
    3. Check the registry key – HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment should have a Current Version entry that shows the current JRE version

    Let us know how it goes.

    Thank you


  2. Wang, Sandy 21 Reputation points
    2023-05-08T01:00:21.5733333+00:00

    What I found working for us is to set JAVA_HOME to jre installation location and set PATH to firstly search jre bin folder instead of jdk bin folder. jvm.dll is located in jre bin\server.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.