SonarQube - 无法加载Wrapper的本机库'wrapper.dll'

问题描述 投票:2回答:4

我正在安装SonarQube v5.0。

我正在运行Windows Server 2012 64位(虚拟操作系统),Java 1.8 64位和SonarQube windows-x86-64包装器。

SonarQube,无论是使用命令提示符作为管理员还是作为Windows服务通过StartSonar.bat运行,都会不断发出以下警告:

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.

我在网上找到的唯一信息是2010年的一些JIRA,它们并没有真正帮助我。我无法在此Windows安装上创建声纳用户。我的CI环境中的所有其他工具都在Java 1.8 64位上运行,这意味着JAVA_HOME设置为64位JDK 1.8。我真的不想运行Java 32位和32位Wrapper。这意味着wrapper.conf顶部的JRE bin / java路径必须指定32位JRE。

我该怎么做才能摆脱这个警告?

sonarqube sonarqube-5.0
4个回答
6
投票

并非所有应用程序都使用JAVA_HOME变量,因此当您使用32位时,可以将JAVA_HOME指向64位版本。注意:注册表中的“Java_Home”键不是JAVA_HOME变量。

好吧,一种方法是使用.. \ windows-x86-64 \ UninstallNTService.bat卸载当前服务,并使用.. \ windows-x86-32 \ InstallNTService.bat安装32位版本。

如果它工作,你肯定有一个32位JVM。


0
投票

在\ sonarqube-5.1.2 \ bin \ windows-x86-64中安装SonarQube服务。

我刚刚访问了Windows服务中的SonarQube - >转到属性 - >登录选项卡--->选择'本地服务'(输入系统密码)。而已!

问题已经解决。

希望这可以帮助那些无法解决上述帖子的人。


0
投票

我在Windows 7上遇到了与SonarQube 5.6.4相同的问题。编辑sonar.properties文件以添加wrapper.java.command = ...无效。但是,编辑我的路径语句就可以了。

路径语句中的前两个文件夹是

C:\ProgramData\Oracle\Java\javapath;C:\dev\sdks\jdk1.8.0_112\bin;....

第一个(C:\ ProgramData \ Oracle \ Java \ javapath)中的java.exe是32位。我刚刚在路上切换了两个:

C:\dev\sdks\jdk1.8.0_112\bin;C:\ProgramData\Oracle\Java\javapath;...

突然SonarQube开始在C:\ dev \ sdks \ jdk1.8.0_112 \ bin中使用64位java.exe

进行此更改后,我可以毫无困难地重启Firefox。


0
投票

在我的例子中,在窗口7或窗口10上运行SonarQube 7.3,我必须将Java版本更新为java 8以传递此错误。

© www.soinside.com 2019 - 2024. All rights reserved.