Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-65

getting node details with JSON gets exception

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • restconf
    • None
    • Operating System: Mac OS
      Platform: Macintosh

    • 172

    Description

      Trying to get detailed resources for a node in JSON format results in an exception.

      The URL is, for example:
      http://192.168.4.1:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:3

      The Accept header is: application/vnd.yang.api+json

      You can see the following exception:

      <html>
      <head>
      <title>Apache Tomcat/7.0.32 - Error report</title>
      <style>
      <!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      -->
      </style>
      </head>
      <body>
      <h1>HTTP Status 500 - Value in SimpleNode should be type String</h1>
      <HR size="1" noshade="noshade">
      <p>
      <b>type</b> Exception report
      </p>
      <p>
      <b>message</b>
      <u>Value in SimpleNode should be type String</u>
      </p>
      <p>
      <b>description</b>
      <u>The server encountered an internal error that prevented it from fulfilling this request.</u>
      </p>
      <p>
      <b>exception</b>
      <pre>java.lang.IllegalStateException: Value in SimpleNode should be type String
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeValueOfNodeByType(JsonMapper.java:152)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeLeaf(JsonMapper.java:146)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeChildrenOfParent(JsonMapper.java:79)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeList(JsonMapper.java:120)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeChildrenOfParent(JsonMapper.java:67)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.writeList(JsonMapper.java:125)
      org.opendaylight.controller.sal.rest.impl.JsonMapper.write(JsonMapper.java:34)
      org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider.writeTo(StructuredDataToJsonProvider.java:53)
      org.opendaylight.controller.sal.rest.impl.StructuredDataToJsonProvider.writeTo(StructuredDataToJsonProvider.java:26)
      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)
      </pre>
      </p>
      <p>
      <b>note</b>
      <u>The full stack trace of the root cause is available in the Apache Tomcat/7.0.32 logs.</u>
      </p>
      <HR size="1" noshade="noshade">
      <h3>Apache Tomcat/7.0.32</h3>
      </body>
      </html>

      Steps to reproduce:
      1. Start mininet
      2. Connect the controller to mininet
      3. In restconf, try to get flow-node details in JSON format,

      and the problem will occur

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jmedved@cisco.com Jan Medved
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: