RAD does not add EAR project to WAS instance

In my RAD workspace, I have an EAR project. I now have a WAS 6.1 instance that I created from RAD. When I right click on the WAS 6.1 instance and do "Add Remove Projects" and select EAR, I get the error:

Cannot add an EAR project to the server unless it contains a Web, EJB, or Connector module.

      

Now this is not the case because my EAR project has META-INF / application.xml and it has the following content:

<?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>

      

Thus, it has a module <web>

and <ejb>

. Why is RAD complaining?

+3


source to share


2 answers


Several possible solutions:



  • Uninstall the app, stop the server, reinstall the app, and start the server.

  • right click on the EAR and check the "Deploy assembly" checkbox and make sure your modules are exported. if so, it is advised to remove them and add them.

  • Check the Project References and make sure they are checked.

+5


source


To add the project back to the server,



  • Right click on your jar project and go to properties, select Java EE module dependencies. Check the boxes for the jar project under Available Java EE Modules. This will return the project.
  • Now right click on your server and try adding / removing a project. It will appear in the left pane for selection.
0


source







All Articles