java - RAD 中的 Websphere Liberty server.xml 在密钥库上提供 cvc-complex-type.2.4.a
问题描述
我们安装了 WebSphere Liberty,并将服务器添加到 RAD/Eclipse。server.xml 已创建并且开箱即用,featuremanager 节点抱怨没有密钥库。所以我添加了我在在线示例中看到的密钥库:
但该节点也得到一个错误:
cvc-complex-type.2.4.a:发现以元素“keyStore”开头的无效内容。需要“{include, variable, featureManager, executor, config, fileset, logging, zosLogging}”之一。
因此,如果密钥库无效,但它是必需的……该怎么办?
这是完整的 server.xml
<?xml version="1.0" encoding="UTF-8"?>
<server description="new server">
<!-- Enable features -->
<featureManager>
<feature>javaee-7.0</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. -->
<keyStore id="defaultKeyStore" password="keyStorePwd"/>
<!--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="yourUserName" password="" /> -->
</basicRegistry>
<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint id="defaultHttpEndpoint"
httpPort="9080"
httpsPort="9443" />
<!-- Automatically expand WAR files and EAR files -->
<applicationManager autoExpand="true"/>
</server>
解决方案
更新运行时后,您可能需要刷新 Eclipse 缓存的服务器元数据。转到首选项 | 服务器 | 运行时环境 | 选择 19006 运行时 | 编辑... | 高级选项 | 刷新。
推荐阅读
- python - 在 asyncio/Quart 中安全地等待两个事件源
- arrays - MASM x86 如何按升序对数组进行排序?
- node.js - 在循环中重复传递给函数的值
- vaadin14 - Vaadin 14:如何设置关闭用户交互的通知?
- java - Amazon Connect + Amazon S3 以及拨打电话号码的可能性
- python - 如何解决这个同步问题 discord.py?
- bash - 在合并一列时将 .csv 文件与 BASH 进行比较
- flutter - Flutter 应用程序在尝试添加谷歌帐户然后返回应用程序屏幕后显示黑屏
- tensorflow - CNN + LSTM 图像模型在验证数据集上表现不佳
- python - 使用 python 从 ID 列表中获取多个 Twitter 屏幕名称