0

I received this "BUILD FAILED" while trying to install EJBCA on UBUNTU 18.04. The following messages appeared below "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.

Above the Build Failed message there were a total of 39 "javac" errors, specifying the problem. Some of those are:

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)

Others are like:

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

The complete list of errors in this link https://pastebin.com/LMzDhdKn

Calvin Nunes
  • 6,376
  • 4
  • 20
  • 48

1 Answers1

0

Most likely you are not using one of the supported JDK versions. In the beginning of your build log (which you haven't pasted here) it prints what java version is used by your system. Make sure this is a supported one (from the EJBCA documentation). Since you are using Ubuntu, I'd recommend installing the OpenJDK 8 packages, and making sure this is used by configuring Ubuntu to use this, with the 'update-java-alternatives' command. The build log should then print in the beginning that OpenJDK 8 (with some specific build number) is being used.

primetomas
  • 524
  • 2
  • 5
  • Ok this is the history, i used these links in the following order: 1. 2. 3. Then lastly i tried installing EJBCA with these links: 1. 2. 3. – Gilberto L Morillo A Feb 11 '20 at 19:34
  • I changed to OPenJDK 8 and only one error showed now. https://pastebin.com/TNXU42bP – Gilberto L Morillo A Feb 11 '20 at 19:42
  • Some of those links are several years old, one of the youtube videos are from 2013. There is official installation documentation, which is up to date. https://doc.primekey.com/ejbca6152/ejbca-installations/ejbca-main-installation There is also a quick start guide, which should get you up and running in minutes: https://doc.primekey.com/ejbca6152/tutorials-and-guides/quick-start-guide For an even faster test drive, you can run the docker image, up and running in 30 seconds: https://hub.docker.com/r/primekey/ejbca-ce It's linked from the projects homepage: https://www.ejbca.org/ – primetomas Feb 13 '20 at 07:54
  • Oh, and the last error you have is because you are not using the latest version of EJBCA Community. There were changes in Java that caused that issue but the latest version are fixed to support both older and newer java 8 versions. Download the latest version (6.15.2.5 right now) from the official download link: https://www.ejbca.org/download/ – primetomas Feb 13 '20 at 07:59
  • Alright! Wow , thank you so much. I'll mount that up as soon as i can. Best regards for all the help. – Gilberto L Morillo A Feb 16 '20 at 22:01