2

我正在尝试从本指南安装 ejbca:http ://ejbcacentos.blogspot.gr/2014/04/how-to-install-ejbca-611-on-centos-65.html

当我键入命令 sudo -u jboss ant deploy (它在安装 EJBCA/指南的初始部署一章中)时,我收回了这个 java 错误:

/opt/ejbca_ce_6_1_1/build.xml:79:执行失败:java.io.IOException:无法运行程序“java”:java.io.IOException:错误=2,没有这样的文件或目录

我已经在 /etc/profile 中设置了 java home

我不知道是什么导致了这个错误,我在谷歌上找不到与此相关的东西。如果有人知道可能导致此错误的原因,我非常感谢您提供的任何帮助。

这是完整的终端输出:

[root@localhost ejbca]# sudo -u jboss ant deploy
Buildfile: build.xml

customejbca.message:
         [echo] No custom changes to merge.

appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

deprecated:check:

customejbca.message:

appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    deprecated:notify:

    cleanDistDir:

    customejbca.message:
         [echo] No custom changes to merge.

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    dependecy-check-clean:

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    -pre-init:

    -init-private:

    -pre-init-libraries:

    -init-private-libraries:

    -init-libraries:

    -init-user:

    -init-project:

    -init-macrodef-property:

    -do-init:

    -post-init:

    -init-check:

    -init-ap-cmdline-properties:

    -init-macrodef-javac-with-processors:

    -init-macrodef-javac-without-processors:

    -init-macrodef-javac:

    -init-macrodef-junit:

    -init-debug-args:

    -init-macrodef-nbjpda:

    -init-macrodef-debug:

    -init-macrodef-java:

    -init-presetdef-jar:

    -init-ap-cmdline-supported:

    -init-ap-cmdline:

    init:

    -deps-clean-init:

    deps-clean:
        [mkdir] Created dir: /opt/ejbca_ce_6_1_1/modules/batchenrollment-gui/build

    -warn-already-built-clean:
    [propertyfile] Updating property file: /opt/ejbca_ce_6_1_1/modules/batchenrollment-gui/build/built-clean.properties

    -check-call-dep:

    -maybe-call-dep:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    -do-clean:
       [delete] Deleting directory /opt/ejbca_ce_6_1_1/modules/batchenrollment-gui/build

    -post-clean:

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    cesecore-common.clean:

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    cesecore-common.clean:

    cesecore-entity.clean:

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    cesecore-common.clean:

    cesecore-entity.clean:

    cesecore-ejb-interface.clean:

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    clean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    validationtoolclean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    statedumpclean:

    customejbca.message:

    appserver.error.message:
         [echo] jndi.properties.file: /opt/ejbca_ce_6_1_1/conf/jndi.properties.jboss7

    ctclean:

    failinproduction-deprecation:

    fail-unless-appserver-detected:
         [echo] appserver.home: /opt/jboss
         [echo] appserver.type: jboss
         [echo] appserver.subtype: jboss7

    testforgnujava:

    BUILD FAILED
    /opt/ejbca_ce_6_1_1/build.xml:79: Execute failed: java.io.IOException: Cannot run program "java": java.io.IOException: error=2, No such file or directory 
4

1 回答 1

0

尝试在您的个人资料中设置 APPSRV_HOME=$JBOSS_HOME。

于 2017-01-31T19:26:41.667 回答