简体   繁体   中英

Azure Purview & Self-hosted integration runtime - Java not found error

I am following the guide here to register and scan a Hive Metastore from Azure Purview.

However I get the following error when I run the scan:

Error: (3913) JavaException: Java cannot be found. Please install and add to Path

This is the error shown in the Event Viewer:

System error while attempting to launch datascan process. ActivityId: 882a48d1-1fc1-4aed-80c2-16a4b0687e81 Exception:'Type=Microsoft.DataTransfer.Execution.Core.ExecutionException,Message=JavaException: Java cannot be found. Please install and add to Path,Source=Microsoft.DataTransfer.Execution.DataScanExecutor,StackTrace= at Microsoft.DataTransfer.Execution.DataScan.Helpers.JavaEnforcer.GetJavaVersion() at Microsoft.DataTransfer.Execution.DataScan.Helpers.JavaEnforcer.Enforce() at Microsoft.DataTransfer.Execution.DataScan.DataScanExecutor.d__20.MoveNext(),' Job ID: a0525370-ad15-4132-99b1-069527015834 Log ID: Error

However I have correctly installed Java on the Windows VM as shown with these cmds and outputs:

C:\Users\admin>where java
C:\Program Files\Java\jdk-11.0.11\bin\java.exe

C:\Users\admin>java -version
java version "11.0.11" 2021-04-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)

C:\Users\admin>echo %JAVA_HOME%
C:\Program Files\Java\jdk-11.0.11

C:\Users\admin>echo %Path%
C:\Program Files\Java\jdk-11.0.11\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\admin\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Java\jdk-11.0.11\bin;

Is there anything else that I might have missed to correctly install Java? I also followed the instructions to add to the Path under User variables for admin and System variables.

Here's a few solutions:

  1. Ensure all components use the same architecture (x86 or x64): Java, Visual Studio C++ Redistributable, and SHIR

  2. Ensure the JDBC driver installed (ie ojdbc7.jr) has Full File Permissions added to it for the "NT Service\DiaHostService" (Ensure when searching the user the "From this Location" is set to the local PC not an AD domain).

  3. Ensure _JAVA_OPTION environment variable is not set

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM