Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SonarQube - Unable to load the Wrapper's native library 'wrapper.dll'

I'm installing SonarQube v5.0.

I'm running Windows Server 2012 64-bit (a virtual OS), Java 1.8 64-bit, and the SonarQube windows-x86-64 wrapper.

SonarQube, whether run via StartSonar.bat using Command Prompt as Administrator or as a Windows Service, keeps throwing the following warning:

WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
      The file is located on the path at the following location but
      could not be loaded:
        C:\sonarqube-5.0.1\bin\windows-x86-64\.\lib\wrapper.dll
      Please verify that the file is readable by the current user
      and that the file has not been corrupted in any way.
      One common cause of this problem is running a 32-bit version
      of the Wrapper with a 64-bit version of Java, or vica versa.
      This is a 32-bit JVM.
      Reported cause:
        C:\sonarqube-5.0.1\bin\windows-x86-64\lib\wrapper.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
      System signals will not be handled correctly.

The only info that I've found on the web is some JIRA's from 2010 that don't really help me. I can't create a sonar user on this Windows installation. All my other tools in my CI environment are running on Java 1.8 64-bit, which means that JAVA_HOME is set to JDK 1.8 64-bit. I really don't want to have to run Java 32-bit and the 32-bit Wrapper. That means that the JRE bin/java path at the top of wrapper.conf will have to specify the 32-bit JRE.

What can I do to get rid of this warning?

like image 439
Chris Harris Avatar asked Mar 17 '23 18:03

Chris Harris


1 Answers

Not all applications use JAVA_HOME variable, so you can have JAVA_HOME pointing on your 64 bits version while you are using a 32 bits. Note: the 'Java_Home' key in the registry is not the JAVA_HOME variable.

Well, one way to be sure is to uninstall the current service, with ..\windows-x86-64\UninstallNTService.bat and install the 32 bits version with ..\windows-x86-32\InstallNTService.bat.

If it works, you definitively have a 32 bits JVM.

like image 186
Qualilogy Avatar answered Apr 08 '23 22:04

Qualilogy