In my RAD workspace, I have an EAR project. Now I have a WAS 6.1 instance which i created from inside RAD. When I right click the WAS 6.1 instance and do 'Add Remove projects' and select the EAR, I get error:
Cannot add an EAR project to the server unless it contains a Web, EJB, or Connector module.
Now this is not true because in my EAR project there is META-INF/application.xml and it has the contents:
<?xml version="1.0" encoding="UTF-8"?>
<application id="Application_ID" version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>
someEAR</display-name>
<module id="EjbModule_1291759813449">
<ejb>someEJB.jar</ejb>
</module>
<module>
<web>
<web-uri>someWeb.war</web-uri>
<context-root>someWeb</context-root>
</web>
</module>
</application>
So clearly it has a <web>
and <ejb>
module. Why is RAD complaining?
A couple of potential solutions:
Uninstall your application, stop the server, reinstall your application, start the server.
right click on the EAR and check "Deployment Assembly" and make sure your modules are being exported. if so, it is a good idea to remove them and re add them.
Check "Project References" and make sure they are checked.