无法在 Windows 2012 上 运行 Sonatype Nexus Repository Manager 3.0

Cannot run Sonatype Nexus Repository Manager 3.0 on Windows 2012

我无法启动 Sonatype Nexus Repository Manager 3.0.0 Milestone 7 Release (nexus-3.0.0-b2016011501)。解压缩 Windows 存档后:

然后,nexus.exe /运行

ERROR: Bundle com.sun.jna [5] Error starting mvn:net.java.dev.jna/jna/4.0.0 (org.osgi.framework.BundleException: Unable to resolve com.sun.jna [5](R 5.0): missing requirement [com.sun.jna [5](R 5.0)] osgi.native; (|(&(osgi.native.osname~=win32)(osgi.native.processor~=x86))(&
... ... ... ...
(osgi.native.processor~=ppc))))]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)

您问题的解答

  1. Sonatype Nexus Repository Manager 3.0.0 Milestone 7 Release 需要来自 Oracle 的 Java 8 运行时环境 (JRE)。 OSX 和 Windows 的发行版包括适用于特定操作系统的运行时环境。
  2. 请通过执行此命令确认您已安装 Java。

$ java -version
java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

  1. 请在此处 Link 找到描述

事实证明这是一个错误。请在此处查看解释和解决方法:

https://issues.sonatype.org/browse/NEXUS-9787?focusedCommentId=346263&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-346263

这将在 3.0 版本中修复。

这里打开了一个问题:

The error message means the OSGi framework (Apache Felix) hasn’t been able to match the OS and processor names to one of the available JNA native libraries.

You should be able to workaround this by adding the following line to NEXUS_HOME/etc/custom.properties

felix.native.osname.alias.windowsserver2012=windows server 2012,win32

Where “win32” is the generic alias used by Felix for any Windows OS (the processor name is then used to decide whether to install a 32 or 64 bit native library).

功劳归于 S。 McCulloch 的解决方案,加上 @manfred-moserR。 Seddon 来自 Sonatype 的快速回答。

我在版本 3.37.1-01 中遇到了同样的问题,并通过更改以下内容修复了它:

应用端口8085

在文件 etc\nexus-default.properties