13
votes

I have installed the "WebSphere Application Server Developer Tools for Eclipse V8.5.1" as well as "WebSphere Application Server for Developers V8.5" from here: https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en.

I am using Eclipse Juno.

I used the First Steps tool to create a profile for application development.

I added a "WebSphere Application Server v8.5" server to the Server view, pointing it at that profile.

When I right click on the Server in the Servers View and select "Add and Remove..." I get a dialog saying "There are no resources that can be added or removed from the server."

I CAN add my project to a Tomcat server or a "WebSphere Application Server V8.5 Liberty Profile" (I need to use the "real" WebSphere for a host of reasons beyond the scope of this question - Liberty isn't good enough).

What am I missing to get it to let me add my project to the server?

4
What type of an Eclipse project is the project you try to add to WAS?Jacek Laskowski
What information would you like? It's an Eclipse project with the "Dynamic Web Module" and Java facets. It contains a pom.xml which builds a .war.Jared
I have exactly the same problem, with older Java technologies. A parent folder containing numerous sub-projects, some of those projects generate EAR files using ANT build files. The application server does not see the EAR files. None of the suggestions here work. The closest I get is an EAR file of the parent folder, which is not what I want. Eclipse JEE Oxygen, WebSphere Application Server Developer Tools 8.5, WAS 8.5.1 Developer.Bertrand_Szoghy

4 Answers

17
votes

I use IBM RSA/RDi/Rational Developer for i (which is built off of Eclipse, and has changed names many times) with WAS 8.0 so not sure if this will apply directly to your situation but what you've written sounds very similar to the trouble I've had in the past...

We setup a "parent" sort of project that contains the EAR that will deploy to WAS and then we have a corresponding "web" application that contains the WAR.

In the parent project, under properties -> deployment assembly, add your "web" project. Also check off your "web" project under Project References.

Hopefully this will cause your app to be deployable to WAS...

Edit I
This is how I created my EAR "parent" project using IBM RSA (which is built off of Eclipse - you may have to adjust some of these settings to apply to your version of Eclipse)
1. Go to File -> New -> Project... and choose Java EE -> Enterprise Application Project
2. Put in an appropriate project name and choose your WebSphere App Server as your target runtime
3. I get prompted with a list of Java EE module dependencies and I choose the web app that will be packaged in the ear; I also choose to "Generate application.xml deployment descriptor"

I'm then able to add the ear to my WAS server.

4
votes

WebSphere Application Server Developer Tools Only let you deploy EARs and not WARs on a standard WAS (on Liberty it let you deploy WARs as well) even though it is possible to deploy WARs using the Admin Console. I got no idea why they have that restriction but it is like that in RAD (Rational Application Developer) as well.

3
votes

1 .right click on project name in «Package Explorer» view. 2. select «Properties» 3. Select «Project Facets» 4. Click on «Runtimes» tab 5. check server 6. Click on «OK»

now

  1. right click on server name in «Servers» view
  2. click on «Add and Remove ...»
  3. move resources to the right column
1
votes

You can't deploy a .war, so create a JavaEE Project and include your web project in it. Then you can deploy your name_JavaProjectEE with the war module inside.