We use MyEclipse 7.0 Blue Edition together with WebSphere 6.1.
Our application defines some j2ee security roles in its application.xml.
MyEclipse updates this application.xml automatically as defined in the EAR project’s settings. But unfortunately it always generates an invalid application.xml, as it places the security-role section before the module sections. Thereafter the WebSphere deployment fails because of xml validtion errors.
Valid application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
<display-name>SomeEAR</display-name>
<module id="myeclipse.1233924967857">
<ejb>Some.jar</ejb>
</module>
<security-role id="SecurityRole_1200812849770">
<description>Security role that protects access to ...</description>
<role-name>UserRole</role-name>
</security-role>
</application>
Invalid application.xml (after automatic MyEclipse application.xml update):
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
<display-name>SomeEAR</display-name>
<security-role id="SecurityRole_1200812849770">
<description>Security role that protects access to ...</description>
<role-name>UserRole</role-name>
</security-role>
<module id="myeclipse.1233924967857">
<ejb>Some.jar</ejb>
</module>
</application>