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

NullPointerException thrown by md-sal for routed RPCs

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • mdsal
    • None
    • Operating System: Linux
      Platform: PC

    • 279

    Description

      Stack trace:
      java.lang.NullPointerException
      at org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator$3$1$1.process(RuntimeCodeGenerator.java:234)
      at org.opendaylight.controller.sal.binding.codegen.util.JavassistUtils.implementMethodsFrom(JavassistUtils.java:111)
      at org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator$3$1.process(RuntimeCodeGenerator.java:307)
      at org.opendaylight.controller.sal.binding.codegen.util.JavassistUtils.createClass(JavassistUtils.java:129)
      at org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator$3.call(RuntimeCodeGenerator.java:332)
      at org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator$3.call(RuntimeCodeGenerator.java:191)
      at org.opendaylight.yangtools.concepts.util.ClassLoaderUtils.withClassLoaderAndLock(ClassLoaderUtils.java:42)
      at org.opendaylight.controller.sal.binding.codegen.impl.RuntimeCodeGenerator.getRouterFor(RuntimeCodeGenerator.java:344)
      at org.opendaylight.controller.sal.binding.impl.RpcProviderRegistryImpl.getRpcRouter(RpcProviderRegistryImpl.java:123)
      at org.opendaylight.controller.sal.binding.impl.RpcProviderRegistryImpl.addRoutedRpcImplementation(RpcProviderRegistryImpl.java:62)
      at org.opendaylight.controller.sal.binding.impl.OsgiProviderContext.addRoutedRpcImplementation(OsgiProviderContext.java:43)
      at org.opendaylight.protocol.integration.pcep.PcepRpcServicesRoutingTest$7.onSessionInitiated(PcepRpcServicesRoutingTest.java:206)
      at org.opendaylight.controller.sal.binding.impl.BindingAwareBrokerImpl.registerProvider(BindingAwareBrokerImpl.java:96)
      at org.opendaylight.protocol.integration.pcep.PcepRpcServicesRoutingTest.testRoutedRpcTopologyTunnelPcepProgrammingService(PcepRpcServicesRoutingTest.java:214)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:67)
      at org.ops4j.pax.exam.invoker.junit.internal.ContainerTestRunner.runChild(ContainerTestRunner.java:37)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.invokeViaJUnit(JUnitProbeInvoker.java:123)
      at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.findAndInvoke(JUnitProbeInvoker.java:96)
      at org.ops4j.pax.exam.invoker.junit.internal.JUnitProbeInvoker.call(JUnitProbeInvoker.java:72)
      at org.ops4j.pax.exam.nat.internal.NativeTestContainer.call(NativeTestContainer.java:108)
      at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.invoke(EagerSingleStagedReactor.java:109)
      at org.ops4j.pax.exam.junit.impl.ProbeRunner$2.evaluate(ProbeRunner.java:278)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:112)
      at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

      This exception only occurs if the definition of yang structures used for routing is located in other yang module than the rpcs.

      Routing structures:

      grouping topology-identifier {
      leaf topology-identifier

      { ext:context-reference "topology-context"; type topology-ref; }

      }

      typedef topology-ref

      { type instance-identifier; }

      identity topology-context

      { description "Identity used to mark topology context. Used for routed rpcs"; }

      Rpc with routing structures:

      rpc pcep-create-p2p-tunnel {
      input

      { uses tp:topology-identifier; //... }

      output

      { //... }

      }

      A draft in bgpcep project contains the whole code needed for reproduction (https://git.opendaylight.org/gerrit/#/c/4136/ patch set 2).

      Reproduce by:
      Rebuild the bgpcep project with mvn clean install.
      Run test PcepRpcServicesRoutingTest in integration-tests module.
      Test case testRoutedRpcTopologyTunnelPcepProgrammingService should fail.

      Note1: If the routing structures are located in the same module as rpcs, the exception is not thrown and everything works as expected (As demonstrated by the two other test cases located in PcepRpcServicesRoutingTest )

      Attachments

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

        Activity

          People

            tony.tkacik@gmail.com Tony Tkacik
            mmarsale@cisco.com Maros Marsalek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: