AbtPst
AbtPst

Reputation: 8018

IBM Bluemix: Watson Q&A service setup

i am trying to run the example java code for the Q&A starter application from

https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/getting_started/gs-full-java.shtml

i see this error in my project's Markers view

enter image description here

note that i am still able to run the application but when i hit the Ask button, i get

enter image description here

Please advise on how i can properly set up my project.

EDIT

i can see that i have liberty installed

enter image description here

is this the correct plugin i should be installing?

also in my targeted runtimes for the project

enter image description here

and my project facets

enter image description here

finally, my java build path

enter image description here

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

enter image description here

in the server view, when i try to add a new server, i see these options

enter image description here

is that how it should be ?

further, do i need to enable any of the following websphere options in my project facets?

enter image description here

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

enter image description here

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

enter image description here

and here is a view of my targeted runtimes

enter image description here

and here is my build path

enter image description here

Am i missing something? Could this be causing the aforementioned NoClassDefFound error ?

Server.xml

enter image description here

How can i get all the requisite features in my server?

Upvotes: 1

Views: 212

Answers (1)

German Attanasio
German Attanasio

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

Related Questions