You need to enable JavaScript to run this app. 通过domain template builder.jar创建域后WebLogic启动报config.xml Schema校验错误
优惠活动
大模型
产品
解决方案
定价
更多

通过domain template builder.jar创建域后WebLogic启动报config.xml Schema校验错误

启动WebLogic Admin Server时的报错日志如下:

<Jul 20, 2021 9:44:51 AM EDT>    <Schema validation errors while parsing /oracle/user_projects/domains/awt-dv/config/config.xml<43:7> - Invalid xsi:type qname: 'ext:ashland-authenticatorType' in element realm@http://xmlns.oracle.com/weblogic/domain.>
<Jul 20, 2021 9:44:51 AM EDT>    <Schema validation errors while parsing /oracle/user_projects/domains/awt-dv/config/config.xml - /oracle/user_projects/domains/awt-dv/:43:7: error: failed to load java type corresponding to t=ashland-authenticatorType@http://www.ashland.com/weblogic12c/security/extension.>
<Jul 20, 2021 9:44:51 AM EDT>    <Schema validation errors while parsing /oracle/user_projects/domains/awt-dv/config/config.xml<53:7> - Invalid xsi:type qname: 'ext:ashland-authorizerType' in element realm@http://xmlns.oracle.com/weblogic/domain.>
<Jul 20, 2021 9:44:51 AM EDT>    <Schema validation errors while parsing /oracle/user_projects/domains/awt-dv/config/config.xml - /oracle/user_projects/domains/awt-dv/:53:7: error: failed to load java type corresponding to t=ashland-authorizerType@http://www.ashland.com/weblogic12c/security/extension.>
错误原因
  • 该报错核心是WebLogic启动加载域配置文件config.xml时,无法识别自定义的安全提供商配置:
    1. 原始域中配置了第三方开发的ashland-authenticator(自定义身份认证器)和ashland-authorizer(自定义权限授权器),这两个组件不属于WebLogic原生内置的安全模块
    2. 使用domain template builder.jar打包域模板时,未将这两个自定义组件对应的实现Jar包、XMLSchema校验文件一同纳入模板,导致新域创建后缺少对应依赖
    3. 新域的类加载路径中没有放置自定义安全组件的Jar包,启动时无法加载ashland-authenticatorType、ashland-authorizerType对应的Java类,触发Schema校验失败
修复方案
  • 常规修复步骤:
    1. 从原始正常运行的域中,找到自定义安全组件对应的依赖Jar包、XMLSchema定义文件(.xsd后缀)
    2. 将Jar包复制到新域的$DOMAIN_HOME/lib目录下;如果是自定义安全提供商,建议放到WebLogic专属的安全扩展目录$WL_HOME/server/lib/mbeantypes,该目录的Jar会被优先加载用于安全组件初始化
    3. 检查新域config.xml头部的命名空间声明,确保已正确引入自定义安全组件的命名空间,示例配置如下:
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain"
            xmlns:ext="http://www.ashland.com/weblogic12c/security/extension"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/domain/1.0/domain.xsd
            http://www.ashland.com/weblogic12c/security/extension ashland-security-extension.xsd">
    
    1. 重启Admin Server即可正常加载配置
  • 模板复用场景优化:
    重新使用domain template builder.jar打包域模板,在添加文件步骤将自定义安全组件的Jar、xsd文件添加到模板对应目录下,后续通过该模板创建的新域会自动携带依赖,无需手动修改
  • 临时应急方案:
    若暂时不需要使用该自定义安全组件,可直接编辑config.xml,删除ashland-authenticator和ashland-authorizer对应的配置段,替换为WebLogic原生的DefaultAuthenticator配置即可直接启动

内容的提问来源于stack exchange,提问作者Harish

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.11 06:06:03