[CONTROLLER-121] Exception when accessing Topology via RESTCONF Created: 19/Jan/14  Updated: 25/Jul/23  Resolved: 23/Jan/14

Status: Resolved
Project: controller
Component/s: restconf
Affects Version/s: None
Fix Version/s: None

Type: Improvement
Reporter: Ed Warnicke Assignee: Ladislav Borak
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC



 Description   

When running the openflowplugin distribution and

sudo mn --topo tree,2 --controller 'remote,ip=10.0.2.2:6633' --switch ovsk,protocols=OpenFlow13

I can see the Topology via the Adapter to the AD-SAL, but

When I attempt to access
GET
http://localhost:8080/restconf/operational/network-topology:network-topology/topology/flow:1/

I get an exception:

java.lang.NullPointerException
org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.writeValueByType(XmlDocumentUtils.java:157)
org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.createXmlRootElement(XmlDocumentUtils.java:89)
org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.createXmlRootElement(XmlDocumentUtils.java:110)
org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.createXmlRootElement(XmlDocumentUtils.java:110)
org.opendaylight.yangtools.yang.data.impl.codec.xml.XmlDocumentUtils.toDocument(XmlDocumentUtils.java:73)
org.opendaylight.controller.sal.rest.impl.XmlMapper.write(XmlMapper.java:58)
org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider.writeTo(StructuredDataToXmlProvider.java:61)
org.opendaylight.controller.sal.rest.impl.StructuredDataToXmlProvider.writeTo(StructuredDataToXmlProvider.java:33)
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1479)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
org.apache.catalina.filters.CorsFilter.handleNonCORS(CorsFilter.java:440)
org.apache.catalina.filters.CorsFilter.doFilter(CorsFilter.java:179)



 Comments   
Comment by Vaclav Demcak [ 22/Jan/14 ]

Sorry, but I'm not able to reproduce same behavior.

(tested builds from today morning and today evening[16:45] of openflowplugin distribution [proj. synchr. yangtools, openflowjava, controller, openflowplugin])

(Env. debian7, Open vSwitch 2.0.0, Mininet 2.0.1, postman v.0.8.4.3, all run in localhost and both controller's ports have been tested [6633 and 6653])

Comment by Ladislav Borak [ 23/Jan/14 ]

I am not able to reproduce this bug. All rest operations work correctly.

Comment by Martin Sunal [ 23/Jan/14 ]

It has been fixed in https://git.opendaylight.org/gerrit/#/c/4452/

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