Reputation: 8018
i am trying to run the example java code for the Q&A starter application from
i see this error in my project's Markers view
note that i am still able to run the application but when i hit the Ask button, i get
Please advise on how i can properly set up my project.
EDIT
i can see that i have liberty installed
is this the correct plugin i should be installing?
also in my targeted runtimes for the project
and my project facets
finally, my java build path
i know its a lot of information but i am really struggling with the set up here.
any help is appreciated.
EDIT2
here is what i see in my project servers
in the server view, when i try to add a new server, i see these options
is that how it should be ?
further, do i need to enable any of the following websphere options in my project facets?
ok, so after much struggle i was able to set up my liberty profile correctly. but now when i hit the Ask button, i get
and here is the piece of code that causes it
JSONObject questionJson = new JSONObject();
but why, i have all the imports properly set up and i do not see any compilation errors?
Another EDIT
Please tell me if i am missing anything
here is a view of my servers
and here is a view of my targeted runtimes
and here is my build path
Am i missing something? Could this be causing the aforementioned NoClassDefFound error ?
Server.xml
How can i get all the requisite features in my server?
Upvotes: 1
Views: 212
Reputation: 23705
The problem is that you don't have liberty installed. The project is expecting that has target.
Here you have a guide on how to install liberty profile in eclipse: https://developer.ibm.com/wasdev/downloads/liberty-profile-using-eclipse/
Once you have it installed you will need to create a server and deploy the app in that server.
Eclipse has a good guide on how to create servers.
UPDATE: If you have liberty installed, set it as server and make sure it is as target runtime too. See this animated gif.
Upvotes: 1