Uploaded image for project: 'OpenAM'
  1. OpenAM
  2. OPENAM-3789

JAVA_HOME wrongly set in ampassword tool

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Expired
    • Affects Version/s: 11.0.0
    • Fix Version/s: None
    • Component/s: CLI
    • Labels:
      None
    • Environment:
      CentOS 6.5 64 bits
      OpenAM 11.0
      OpenAM tools (ssoadm, ampassword ...) 11.0
      Oracle/Sun JDK 1.7.0_51
    • Rank:
      1|hzoct3:

      Description

      In spite I've JAVA_HOME exported and correctly set in my environment, when I run the tools setup script, the ampassword script ends up with a wrong JAVA_HOME value (which doesn't exist by the way):

      1. sudo su tomcat -c 'cd /opt/openam/OpenAMTools/ssoAdminTools && export JAVA_HOME=/opt/java/jdk1.7.0_51/jre && ./setup -p /opt/openam'
        + '[' -z /opt/java/jdk1.7.0_51/jre ']'
        + '[' '!' -x /opt/java/jdk1.7.0_51/jre/bin/java ']'
        ++ which awk
        + AWK=/bin/awk
        + '[' -z /bin/awk ']'
        ++ /bin/awk '-F"' ' {print $2}

        '
        ++ /opt/java/jdk1.7.0_51/jre/bin/java -version
        + JAVA_VER=1.7.0_51
        + case $JAVA_VER in
        + '[' -p = -h -o -p = --help ']'
        + '[' -p = -l -o -p = --log ']'
        + '[' -p = -d -o -p = --debug ']'
        + '[' -p = -p -o -p = --path ']'
        + path_AMConfig=/opt/openam
        + '[' '' = -l -o '' = --log ']'
        + '[' '' = -d -o '' = --debug ']'
        + '[' '' = -p -o '' = --path ']'
        + '[' '' = -l -o '' = --log ']'
        + '[' '' = -d -o '' = --debug ']'
        + '[' '' = -p -o '' = --path ']'
        + CLASSPATH=
        + CLASSPATH=:lib/opendj-server-2.6.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar:lib/openam-shared-11.0.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar:lib/openam-shared-11.0.0.jar:lib/openam-dtd-schema-11.0.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar:lib/openam-shared-11.0.0.jar:lib/openam-dtd-schema-11.0.0.jar:lib/openam-rest-11.0.0.jar
        + CLASSPATH=:lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar:lib/openam-shared-11.0.0.jar:lib/openam-dtd-schema-11.0.0.jar:lib/openam-rest-11.0.0.jar:resources
        + /opt/java/jdk1.7.0_51/jre/bin/java -Dload.config=yes -Dhelp.print= -Dpath.AMConfig=/opt/openam -Dpath.debug= -Dpath.log= -cp :lib/opendj-server-2.6.0.jar:lib/forgerock-util-1.1.0.jar:lib/json-20090211.jar:lib/xalan-2.7.1.jar:lib/xercesImpl-2.10.0.jar:lib/xml-apis-1.4.01.jar:lib/xmlsec-1.3.0.jar:lib/openam-core-11.0.0.jar:lib/openam-shared-11.0.0.jar:lib/openam-dtd-schema-11.0.0.jar:lib/openam-rest-11.0.0.jar:resources com.sun.identity.tools.bundles.Main
        Les scripts sont correctement configurés dans le répertoire : /opt/openam/OpenAMTools/ssoAdminTools/opensso
        Le répertoire de débogage est /opt/openam/OpenAMTools/ssoAdminTools/debug.
        Le répertoire des journaux est /opt/openam/OpenAMTools/ssoAdminTools/log.
        La version de ce tools.zip est : OpenAM 11.0.0
        La version de votre instance de serveur est : OpenAM 11.0.0 (2013-December-12 17:16)

      2. grep ^JAVA_HOME /opt/openam/OpenAMTools/ssoAdminTools/opensso/bin/ampassword
        JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64/jre"

      So, it makaes the ampassword script fails:

      /opt/openam/OpenAMTools/ssoAdminTools/opensso/bin/ampassword: line 53: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: Aucun fichier ou dossier de ce type

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cgrosjean Cyril Grosjean
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: