在 Linux 上部署 install_dir/samples/webservices/security 範例 (basicSSl) 時,並未建立憑證,並且丟出如下類似錯誤:
generate_certs: [echo] ***Exporting certificate from NSS database [exec] Result: 1 [echo] ***Generating Java Keystore from generated certificate [exec] keytool error: java.lang.Exception: Input not an X.509 certificate [exec] Result: 1 [echo] ***Generating Java trust store from generated certificate [exec] keytool error: java.lang. Exception: Input not an X.509 certificate [exec] Result: 1 . . . generate_certs: [echo] ***Exporting server certificate from NSS database to a PKCS12 certificate file [exec] /opt/sun/appserver/lib/pk12util: /usr/lib/ libnss3.so: version `NSS_3.9' not found (required by /opt/sun/appserver/lib/ pk12util) [exec] /opt/sun/appserver/lib/pk12util: /usr/lib/libnss3.so: version `NSS_3.6' not found (required by /opt/sun/appserver/lib/pk12util) [exec] /opt/sun/appserver/lib/pk12util: /usr/lib/libnss3.so: version `NSS_3.7' not found (required by /opt/sun/appserver/lib/pk12util) [exec] Result: 1 |
問題是 NSS 程式庫在 Linux 安裝中的位置與在 Solaris 安裝中的位置不同。當在 Linux 上進行部署時,您需要確認 LD_LIBRARY_PATH 指向正確的 NSS 程式庫。在您的環境中,或在 install_dir/bin/asant shell 包裝程式程序檔中設定 LD_LIBRARY_PATH。