Deployment 使用部署计划覆盖weblogic.xml配置

Deployment 使用部署计划覆盖weblogic.xml配置,deployment,weblogic,weblogic-10.x,Deployment,Weblogic,Weblogic 10.x,我有以下问题。我正在将WAR应用程序部署到多个环境。每个环境都有自己的主体名称,我希望使用部署计划将其提供给WAR。WAR应用程序包含默认用户和用于将角色映射到主体的weblogic.xml,如下所示: ... <run-as-role-assignment> <role-name>sampleRole</role-name> <run-as-principal-name>defaultUser</run-as-principal

我有以下问题。我正在将WAR应用程序部署到多个环境。每个环境都有自己的主体名称,我希望使用部署计划将其提供给WAR。WAR应用程序包含默认用户和用于将角色映射到主体的weblogic.xml,如下所示:

...
<run-as-role-assignment>
   <role-name>sampleRole</role-name>
   <run-as-principal-name>defaultUser</run-as-principal-name>
</run-as-role-assignment>
...
<deployment-plan>
    ...
    <variable-definition>
        <variable>
            <name>runAsIdentity</name>
            <value>someEnvironmentSpecificUser</value>
        </variable>
    </variable-definition>
    <module-override>
        <module-descriptor external="false">
            <root-element>weblogic-web-app</root-element>
            <uri>WEB-INF/weblogic.xml</uri>
            ...
            <variable-assignment>
                <name>runAsIdentity</name>
                <xpath>/weblogic-web-app/run-as-role-assignment/run-as-principal-name</xpath>
                <operation>replace</operation>
            </variable-assignment>          
        </module-descriptor>
    </module-override>
</deployment-plan>
正如我在上面所写的,用户是存在的,xpath是正确的,但覆盖不起作用。如果我更正weblogic.xml中的用户,并将替换的someEnvironmentSpecificUser直接放在那里,那么一切都会正常工作

有人知道为什么会这样吗?是否存在一些限制,例如,我无法覆盖run as principal name元素?看起来用户在实际更换之前已经过验证(如果部署计划执行了)

欢迎提供任何帮助/建议。Thx

weblogic.management.DeploymentException: [HTTP:101256]The run-as user: defaultUser for the servlet: spring-ws for Web application: /sampleApp could not be resolved to a valid user in the system. Verify the user exists.