在RAD中,我们的Websphere Liberty server.xml显示红色错误,其描述是:
启用的功能要求在服务器配置中定义keyStore元素和用户注册表。 使用服务器配置编辑器添加这些项目。
但是,我们确实有这些东西。密码不是真实的密码。同样,这不是整个server.xml,而是相关部分。
server.xml
<!-- Enable features -->
<featureManager>
<feature>localConnector-1.0</feature>
<feature>javaee-8.0</feature>
<feature>jaxws-2.2</feature>
</featureManager>
<!-- This template enables security. To get the full use of all the capabilities, a keystore and user registry are required. -->
<!-- For the keystore, default keys are generated and stored in a keystore.
To provide the keystore password, generate an
encoded password using bin/securityUtility encode and add it below in
the password attribute of the keyStore element.
Then uncomment the keyStore element. -->
<sslDefault outboundSSLRef="alternateSSLSettings"/>
<ssl id="defaultSSLConfig" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore"/>
<keyStore id="defaultKeyStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>
<keyStore id="defaultTrustStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>
<ssl id="alternateSSLSettings" keyStoreRef="alternateKeyStore" trustStoreRef="alternateTrustStore"/>
<keyStore id="alternateKeyStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>
<keyStore id="alternateTrustStore" location="C:\Temp\ARO\ServerKeyFile.jks" password="{xor}MTArbQg2LDo=" type="JKS"/>
<!--For a user registry configuration, configure your user registry. For
example, configure a basic user registry using the
basicRegistry element. Specify your own user name below in the name
attribute of the user element. For the password,
generate an encoded password using bin/securityUtility encode and add it
in the password attribute of the user element.
Then uncomment the user element. -->
<basicRegistry id="basic" realm="BasicRealm">
<user name="admin" password="zzzzzz"/>
</basicRegistry>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>
<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>
<library id="DB2JCCLib">
<fileset dir="C:\Program Files\IBM\SQLLIB\java" includes="db2jcc4.jar db2jcc.jar db2jcc_license_cu.jar"/>
</library>
<dataSource id="aroDataSource" jndiName="jdbc/aro" type="javax.sql.DataSource">
<jdbcDriver libraryRef="DB2JCCLib"/>
<properties.db2.jcc databaseName="DBNAME" password="zzz" portNumber="60000" serverName="1.2.3.4" user="catsapp"/>
</dataSource>
<applicationMonitor updateTrigger="mbean"/>
<application id="AROEAR" location="AROEAR.ear" type="ear"/>
我在这里想念什么?
[当我将以下行添加到server.xml
时,它为我消除了错误。
<keyStore id="defaultKeyStore" password="keypassword"/>