java.lang.NullPointerException

JIRA | sivachidambaram subramanian | 2 weeks ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    onos> get-flow-stats -a -i OUTPUT of:0000000000000001/2 deviceId=of:0000000000000001, show ALL flows, liveType=ALL, instruction type=OUTPUT Error executing command: java.lang.NullPointerException KARAF LOG: 2017-02-03 12:11:34,864 | ERROR | sh for user onos | ShellUtil | 27 - org.apache.karaf.shell.console - 3.0.8 | Exception caught while executing command java.lang.NullPointerException at org.onosproject.net.statistic.impl.FlowStatisticManager.loadAllPortInternal(FlowStatisticManager.java:290) at org.onosproject.net.statistic.impl.FlowStatisticManager.loadAllByType(FlowStatisticManager.java:151) at org.onosproject.cli.net.GetFlowStatisticsCommand.execute(GetFlowStatisticsCommand.java:185) 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.8] at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.8] at Proxyaa370def_b193_419e_845b_726060d74566.execute(Unknown Source)[:] at Proxyaa370def_b193_419e_845b_726060d74566.execute(Unknown Source)[:] at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.8] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.8] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.8] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.8] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.8] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.8] 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.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[47:org.apache.karaf.shell.ssh:3.0.8] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133) at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_77] at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.8] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[47:org.apache.karaf.shell.ssh:3.0.8] Even filtering by livetype is not working.

    JIRA | 2 weeks ago | sivachidambaram subramanian
    java.lang.NullPointerException
  2. 0

    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

    JIRA | 6 months ago | antony silvester
    java.lang.NullPointerException
  3. 0

    Example: onos> netcfg get Error executing command: java.lang.NullPointerException Stacktrace: {noformat} 2016-12-07 21:05:55,111 | ERROR | ssh for user sdn | ShellUtil | 27 - org.apache.karaf.shell.console - 3.0.5 | Exception caught while executing command java.lang.NullPointerException at org.onosproject.cli.cfg.NetworkConfigCommand.execute(NetworkConfigCommand.java:64) 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 Proxy5bdb8089_443c_40e2_8ad0_f18e77eb671e.execute(Unknown Source)[:] at Proxy5bdb8089_443c_40e2_8ad0_f18e77eb671e.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.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[157:org.apache.karaf.shell.ssh:3.0.5] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133) 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.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[157:org.apache.karaf.shell.ssh:3.0.5] {noformat}

    JIRA | 2 months ago | Jon Hall
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Test Step : Send a invalid XML Test XML: String invalidXml = "<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(invalidXml, YangProtocolEncodingFormat.XML_ENCODING); --- Output : Exception onos> exception-display java.lang.NullPointerException at org.onosproject.yms.app.ych.codecutils.YchYangDataTreeCodec.decodeProtocolDataToYdt(YchYangDataTreeCodec.java:187) at org.onosproject.yms.app.ych.DefaultYangCodecHandler.decode(DefaultYangCodecHandler.java:195) 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 Proxy5204d04d_d874_45f6_a4b9_92aaf7f5cf24.execute(Unknown Source)[:] at Proxy5204d04d_d874_45f6_a4b9_92aaf7f5cf24.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 : YchYangDataTreeCodec.java public YdtBuilder decodeProtocolDataToYdt(String protocolData, Object schemaRegistry) { YdtExtendedBuilder ydtExtendedBuilder = null; Document document = null; try { document = DocumentHelper.parseText(protocolData); } catch (DocumentException e) { // TODO } XmlWalker walker = new DefaultXmlCodecWalker(); XmlCodecListener listener = new XmlCodecListener(); findRootElement(document.getRootElement()); Confirmed By Shankar

    JIRA | 6 months ago | antony silvester
    java.lang.NullPointerException
  6. 0

    Sometimes we'll see the following exception when running 'netcfg': {code} onos> log:exception-display java.lang.NullPointerException at org.onosproject.store.config.impl.DistributedNetworkConfigStore.lambda$getConfigClasses$15(DistributedNetworkConfigStore.java:210) at java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649)[:1.8.0_74] at java.util.Collections$SetFromMap.forEach(Collections.java:5476)[:1.8.0_74] at org.onosproject.store.config.impl.DistributedNetworkConfigStore.getConfigClasses(DistributedNetworkConfigStore.java:208) at org.onosproject.net.config.impl.NetworkConfigManager.getConfigs(NetworkConfigManager.java:192) at org.onosproject.cli.cfg.NetworkConfigCommand.addSubject(NetworkConfigCommand.java:96) at org.onosproject.cli.cfg.NetworkConfigCommand.lambda$addSubjectClass$88(NetworkConfigCommand.java:92) at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_74] at org.onosproject.cli.cfg.NetworkConfigCommand.addSubjectClass(NetworkConfigCommand.java:92) at org.onosproject.cli.cfg.NetworkConfigCommand.lambda$addAll$87(NetworkConfigCommand.java:85) at java.lang.Iterable.forEach(Iterable.java:75)[:1.8.0_74] at org.onosproject.cli.cfg.NetworkConfigCommand.addAll(NetworkConfigCommand.java:83) at org.onosproject.cli.cfg.NetworkConfigCommand.execute(NetworkConfigCommand.java:58) 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 Proxy98b2b41f_ccbe_4e1d_9273_b42b75486629.execute(Unknown Source)[:] at Proxy98b2b41f_ccbe_4e1d_9273_b42b75486629.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.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[150:org.apache.karaf.shell.ssh:3.0.5] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133) at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_74] 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.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[150:org.apache.karaf.shell.ssh:3.0.5] {code} I don't know of a way to reproduce this, it sometimes randomly appears. Once this happens the user can no longer view the network configuration.

    JIRA | 9 months ago | Jonathan Hart
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.onosproject.net.statistic.impl.FlowStatisticManager.loadAllPortInternal()
    2. org.onosproject.net
      FlowStatisticManager.loadAllByType
      1. org.onosproject.net.statistic.impl.FlowStatisticManager.loadAllPortInternal(FlowStatisticManager.java:290)
      2. org.onosproject.net.statistic.impl.FlowStatisticManager.loadAllByType(FlowStatisticManager.java:151)
      2 frames
    3. org.onosproject.cli
      AbstractShellCommand.doExecute
      1. org.onosproject.cli.net.GetFlowStatisticsCommand.execute(GetFlowStatisticsCommand.java:185)
      2. org.onosproject.cli.AbstractShellCommand.doExecute(AbstractShellCommand.java:150)
      2 frames
    4. Apache Karaf :: Shell :: Console
      AbstractCommand.execute
      1. org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)[27:org.apache.karaf.shell.console:3.0.8]
      2. org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)[27:org.apache.karaf.shell.console:3.0.8]
      2 frames
    5. Unknown
      Proxyaa370def_b193_419e_845b_726060d74566.execute
      1. Proxyaa370def_b193_419e_845b_726060d74566.execute(Unknown Source)[:]
      2. Proxyaa370def_b193_419e_845b_726060d74566.execute(Unknown Source)[:]
      2 frames
    6. Apache Felix Gogo Runtime
      CommandSessionImpl.execute
      1. org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[27:org.apache.karaf.shell.console:3.0.8]
      2. org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[27:org.apache.karaf.shell.console:3.0.8]
      3. org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[27:org.apache.karaf.shell.console:3.0.8]
      4. org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[27:org.apache.karaf.shell.console:3.0.8]
      5. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[27:org.apache.karaf.shell.console:3.0.8]
      6. org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[27:org.apache.karaf.shell.console:3.0.8]
      7. org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
      7 frames
    7. Apache Karaf :: Shell :: Console
      ConsoleImpl.run
      1. org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:210)
      1 frame
    8. org.apache.karaf
      ShellFactoryImpl$ShellImpl$1$1.run
      1. org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.runConsole(ShellFactoryImpl.java:158)[47:org.apache.karaf.shell.ssh:3.0.8]
      2. org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1$1.run(ShellFactoryImpl.java:133)
      2 frames
    9. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)[:1.8.0_77]
      1 frame
    10. Karaf
      JaasHelper.doAs
      1. org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)[28:org.apache.karaf.jaas.modules:3.0.8]
      1 frame
    11. org.apache.karaf
      ShellFactoryImpl$ShellImpl$1.run
      1. org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$1.run(ShellFactoryImpl.java:129)[47:org.apache.karaf.shell.ssh:3.0.8]
      1 frame