Can't map roles to groups using ibm-application-bnd.xml

一笑奈何 提交于 2019-12-05 07:55:26

WebSphere Application Server uses XML for EE 5+ only, and that decision is made on a per-deployment descriptor basis. If ibm-application-bnd.xmi is being used, then I suspect your application.xml has version="1.4" or lower, so try again after updating to an EE 5 XML header (remove doctype, add xmlns, add xmlns:xsi, add xsi:schemaLocation, update version attribute).

I had to change the version in my ear POM maven-ear-plugin. Because default it generates a 1.3 application.xml so the Websphere server only expect a ibm-application-bnd.xmi file and not a ibm-application-bnd.xml file

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
    <version>6</version>
    <security>
        <security-role>
            <role-name>manager</role-name>
        </security-role>
    </security>
    <modules>
        <webModule>
            <groupId>${project.groupId}</groupId>
            <artifactId>my-war</artifactId>
            <contextRoot>/my-app</contextRoot>
        </webModule>
    </modules>
</configuration>

Thanks to bkail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!