0
votes

I am trying to complete this introduction to java apps on IBM Bluemix:

github.com/IBM-Bluemix/get-started-java

When I get to step 4.4 'Run your application locally on Liberty' I get the following error message:

"Server Error: The selection did not contain any resources that can run on a server."

I have followed the guide step-by-step and this is the first issue I encounter. I am new to Bluemix, eclipse and Liberty, so I am not really sure where to look for the solution to this problem.

I have to restart eclipse to reproduce this problem since I only have the option of "Run as -> Run on Server" the first time I attempt.

EDIT:


This is where I click to "Run on server":

Trying to do step 4.1 - Run on server

This is the error:

Error message I get

Thanks for the answers, guys!

EDIT 2:


If I do "Run -> Run Configurations..." and select Liberty Server it looks like it goes through the same steps as when you run:

mvn install liberty:run-server

in the terminal. But if I do this and go to localhost:9080/GetStartedJava/ I get the following message:

Context Root Not Found

Does this help anyone as to the source of my problems?

2
Did running the app locally from command line work properly (Step 2)? - F Rowe
I just tried these steps with no issues. One possibility is the maven import of get-started failed. You could try deleting the project from eclipse, checking the "Delete project contents on disk" option and re-importing, making certain to select the top-level directory of the project (get-started-java) - F Rowe
@FRowe Thank you for your answer. I have just completely reinstalled eclipse and followed the same guide again and I still get the same error. - Jonathan Hansen
@FRowe I have also deleted and imported the project. Running the app locally from command line works fine. - Jonathan Hansen
Can you post a screenshot of your Eclipse and tell us where you're right clicking? - Ram Vennam

2 Answers

0
votes

Try this. Right click on the Liberty server in the Servers view and select Add and Remove. Then, move the application from the left side to the right side. enter image description here

If you don't see your GetStartedJava project in your Add and Remove windows, then this is likely a problem with the Eclipse project import. A screenshot of your Eclipse window will help

0
votes

This question remained unanswered and I had the same issue;

File > Properties > Project Facets > Select Dynamic Web Module

Select OK

Right click on the server and select Add Remove and you should be able to add your WAR file there.