Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-5188

[ONOS-YMS-TEST] While Decoding xml , YOB fails to load the class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
    • Environment:

      Latest YMS code

    • Story Points:
      1

      Description

      1] Test Code

      String xml = "<filter xmlns=\"ydt.filter-type\" type=\"subtree\"><network xmlns=\"urn:TBD:params:xml:ns:yang:nodes\"><name>My name</name><surname>My Surname</surname><isHappy>false</isHappy></network></filter>";

      List<Object> yangModuleDecodedList = yangCodecHandler.decode(xml, YangProtocolEncodingFormat.XML_ENCODING);

      Please find the Attached Yang File

      Output :
      Exception:

      onos> exception-display
      java.lang.NullPointerException
      at org.onosproject.yms.app.yob.YobSingleInstanceLeafHandler.setObjectInParent(YobSingleInstanceLeafHandler.java:59)
      at org.onosproject.yms.app.yob.YobListener.exitYdtNode(YobListener.java:79)
      at org.onosproject.yms.app.yob.YobListener.exitYdtNode(YobListener.java:91)
      at org.onosproject.yms.app.ydt.DefaultYdtWalker.walkTree(DefaultYdtWalker.java:66)
      at org.onosproject.yms.app.ydt.DefaultYdtWalker.walk(DefaultYdtWalker.java:96)
      at org.onosproject.yms.app.yob.DefaultYobBuilder.getYangObject(DefaultYobBuilder.java:43)
      at org.onosproject.yms.app.ych.DefaultYangCodecHandler.getObjectList(DefaultYangCodecHandler.java:241)
      at org.onosproject.yms.app.ych.DefaultYangCodecHandler.decode(DefaultYangCodecHandler.java:199)
      at org.onosproject.ymstest.cli.YmsTestCommand.execute(YmsTestCommand.java:90)
      at org.onosproject.cli.AbstractShellCommand.doExecute(AbstractShellCommand.java:150)
      at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.5]
      at Proxy2c8c95a2_4d2b_4472_930d_0a4e362aadfd.execute(Unknown Source)[:]
      at Proxy2c8c95a2_4d2b_4472_930d_0a4e362aadfd.execute(Unknown Source)[:]
      at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.5]
      at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
      at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:210)
      at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
      at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_101]
      at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.5]
      at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)[27:org.apache.karaf.shell.console:3.0.5]

      onos>

      ***********************************

      Module Having Problem :

      YobHandler.java

      createYangBuilderObject

      try

      { yangDefaultClass = Class.forName(qualifiedClassName); }

      catch (ClassNotFoundException e)

      { log.error("YOB: failed to load class for class " + className); }

      try {

      Confirmed by : Bharat

        Attachments

        1. network.yang
          0.8 kB
          antony silvester
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            bsaraswal bharat saraswal
            Reporter:
            antonysilvester antony silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: