[NETCONF-116] odl-mdsal-apidocs swagger UI does not load correctly if odl-restconf is installed first Created: 05/Jan/16  Updated: 15/Mar/19  Resolved: 10/Nov/16

Status: Resolved
Project: netconf
Component/s: restconf-nb
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Ryan Goulding Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4879

 Description   

If one installs features in the following order:

> feature:install odl-restconf
> feature:install odl-mdsal-apidocs

Then swagger UI produces 500 server error and karaf log contains:
2016-01-05 11:13:19,997 | ERROR | qtp369408453-100 | ContainerResponse | 71 - com.sun.jersey.jersey-server - 1.17.0 | Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A message body writer for Java class org.opendaylight.netconf.sal.rest.doc.swagger.ResourceList, and Java type class org.opendaylight.netconf.sal.rest.doc.swagger.ResourceList, and MIME media type application/json was not found
at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)[71:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)[71:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)[71:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)[71:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)[199:com.sun.jersey.servlet:1.17.0]

Workaround is to install features on the same line:
> feature:install odl-restconf odl-mdsal-apidocs
OR
> feature:install odl-mdsal-apidocs
since that feature installs odl-restconf itself.

This is likely an issue with the jackson message body writer libraries.



 Comments   
Comment by Miroslav Kovac [ 12/Oct/16 ]

I don`t seem to be able to replicate this problem any more. It either got fixed by something else or I am doing something wrong.
I installed

feature:install odl-restconf
feature:install odl-mdsal-apidocs

in that order and no error was logged. Than I tried to create some request and it went through as well. Could you please check if it is still giving you an error?

Comment by Michael Vorburger [ 15/Jan/18 ]

FTR: we hit a similar issue hit again in NEUTRON-154 ...

Generated at Wed Feb 07 20:14:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.