One Star

Error when Checking REST Service after deployment

I'm using TOS for ESB 6.1.1; What I'm doing is just to create a simple REST Service, built this Service and check it in the browser at the address on which it has been published. But i have an error.
1/Create a simple REST Service: this Service simply explore the data of a table of database
The job works correctly in the studio.

2/Deployment
I deployed the REST Service in the Talend Runtine Contenair. When i type the list command, i saw the Service with the statut Active. The Service was correctly deployed.

3/Checking the REST Service
When i check the Service at this endpoint address: , i get the following error:
Please, can someone help me? my research has not been conclusive.
thank you in advance.
6 REPLIES
Employee

Re: Error when Checking REST Service after deployment

Hi
When you run the job in Karaf it is a servlet container which is used, you have "/services/services" - the 1st segment is a CXF servlet context, the 2nd segment is "/services" too and by default CXF thinks it is a request to display a services page which is an HTML showing the links to the deployed services.
Try have either "/" in a studio inside a job or set an "org.apache.cxf.servlet.service-list-path" property in KARAF_HOME/etc/org.apache.cxf.osgi.cfg to something different such as "services-list", etc...
HTH, Sergey
One Star

Re: Error when Checking REST Service after deployment

HI Sberyozkin,
Thanks for yor reply. Sorry I'm new in TOS ESB and in your answer i don't realy understand the way to correct this error.
Please can you help me step by step from my example to solve this problem?
Regards,
Employee

Re: Error when Checking REST Service after deployment

Please ignore the previous comment, Your request URI does not end with "/services/services". I wonder if you need to drop one "/services" when it is deployed in Karaf, try it please.
One Star

Re: Error when Checking REST Service after deployment

Sberyozkin,
With my previous example, the service is available (first Endpoint) in the section Available RESTFul services in the screen below.
Endpoint REST of t_RESTrequest in my example is:"/services";  i don't know if it 's wrong or not and if it's the cause of my error.

Regards,
Employee

Re: Error when Checking REST Service after deployment

It is not clear where the endpoint with '/services' only is created. Looks like the one with "/services/services" corresponds to your job - AFAIK during the deployment of jobs "/services" is appended to the job URI thus you have "/services/services". But the one with "/services" only looks strange...
One Star

Re: Error when Checking REST Service after deployment

Sberyozkin,
I saw why i couldn't check the Service at the endpoint address. The error was about oracle jdbc driver.
I solved it by setting the Path in the environment variable and now it works well.
Regards,