在尝试“ ant -deploy”后如何修复“ BUILD FAILED”?

问题描述 投票:0回答:1

我在尝试在UBUNTU 18.04上安装EJBCA时收到此“ BUILD FAILED”。以下消息出现在“ BUILD FAILED”下面:

/opt/ejbca_ce_6_15_2_1/build.xml:1323: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/build.xml:260: The following error occurred while executing this line:
/opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build.xml:16: Compile failed; see the compiler error output for details.

在Build Failed消息上方,共有39个“ javac”错误,指明了问题。其中一些是:

jar: 
[mkdir] Created dir: /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
    [javac] Compiling 1 source file to /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/build
    [javac] /opt/ejbca_ce_6_15_2_1/modules/cesecore-p11/src/sun/security/pkcs11/CESeCoreUtils.java:15: error: package sun.security.pkcs11.wrapper is not visible
    [javac] import static sun.security.pkcs11.wrapper.PKCS11Constants.CKA_SENSITIVE;
    [javac]                                  ^
    [javac]   (package sun.security.pkcs11.wrapper is declared in module jdk.crypto.cryptoki, which is not in the module graph)

其他类似:

137: error: cannot find symbol
    [javac]             if ( e.getErrorCode()==CKR_ATTRIBUTE_READ_ONLY ) {
    [javac]                                    ^
    [javac]   symbol:   variable CKR_ATTRIBUTE_READ_ONLY
    [javac]   location: class CESeCoreUtils

此链接https://pastebin.com/LMzDhdKn中的错误的完整列表

ubuntu-18.04 javac ejbca
1个回答
0
投票

最有可能您未使用受支持的JDK版本之一。在构建日志的开头(您没有在此处粘贴),它会打印系统使用的Java版本。确保这是受支持的(来自EJBCA文档)。由于您使用的是Ubuntu,因此建议您安装OpenJDK 8软件包,并通过使用'update-java-alternatives'命令配置Ubuntu以使用它来确保使用该软件包。然后,应该在使用OpenJDK 8(具有特定的内部版本号)的开头打印构建日志。

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