Hi Thilini,

It seems that some services are getting register before all the carbon
transports get registered.  Could you please create a github issue for this.
We'll look into this.

Thanks
Thusitha

On Tue, Jan 10, 2017 at 4:55 PM, Thilini Shanika <thili...@wso2.com> wrote:

> Hi all,
>
> We are experiencing an issue while loading swagger definition via
> SwaggerDefinitionService. Intermittently, after a server restart, we are
> getting 'Swagger definition not found ' error while loading a given
> swagger definition by path.
>
> For example, if we are loading http://localhost:9090/
> swagger?path=/api/am/store/v0.10/apis definition (by
> /api/am/store/v0.10/apis
> <http://localhost:9090/swagger?path=/api/am/store/v0.10/apis> base path),
> intermittently the definition cannot be retrieved and getting following
> error.
>
> {"error": "Swagger definition not found for path /api/am/store/v0.10/apis"}
>
> But after one or more server restarts, we can load the swagger definition 
> with the given base path, successfully.
>
> When we were debugging, getSwaggerDefinition implementation in 
> SwaggerDefinitionService, we observed that intermittently 
> serviceRegistry.getServiceWithBasePath(path) [1] turned to be empty. So that 
> the swagger definition could not be loaded.
>
> Any clue on this behavior of not having a service registered with a given 
> base path, intermittently?
>
> [1] 
> https://github.com/wso2/msf4j/blob/v2.1.0/swagger/src/main/java/org/wso2/msf4j/swagger/SwaggerDefinitionService.java#L75
>
>
>
>
> --
> Thilini Shanika
> Senior Software Engineer
> WSO2, Inc.; http://wso2.com
> 20, Palmgrove Avenue, Colombo 3
>
> E-mail: tgtshan...@gmail.com
>
>


-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog      alokayasoya.blogspot.com
About    http://about.me/thusithathilina
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to