[OPNFLWPLUG-439] org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException: Class interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector is not valid child of interface org.opendaylight.yang.gen.v1.urn. Created: 13/May/15  Updated: 27/Sep/21  Resolved: 26/Jul/16

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Flavio Fernandes Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
is blocked by YANGTOOLS-470 IncorrectNestingException incorrectly... Resolved
External issue ID: 3212

 Description   

log: https://gist.github.com/eaab1c31383ebb4088a8

$ bin/karaf
karaf: Enabling Java debug options: -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
Listening for transport dt_socket at address: 5005

________ ________ .__ .__ .__ __
_____ \ ______ ____ ____ ______ \ _____ __..| | || ____ | |_/ |
/ |
____ _/ __ \ / \ | |
__ \< | || | | |/ ___| | \ __\
/ | \ |> > ___/| | | ` \/ __
___ || |
| / /_/ > Y \ |
_______ / _/ __ >__| /______ (____ / ___||__/__ /|__| /_|
\/|_| \/ \/ \/ \/\/ /____/ \/

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>Exception in thread "pool-11-thread-1" java.lang.IllegalStateException: TopologyManager startup fail! TM bundle needs restart.
at org.opendaylight.openflowplugin.applications.topology.manager.DataChangeListenerImpl.<init>(DataChangeListenerImpl.java:66)
at org.opendaylight.openflowplugin.applications.topology.manager.TerminationPointChangeListenerImpl.<init>(TerminationPointChangeListenerImpl.java:41)
at org.opendaylight.openflowplugin.applications.topology.manager.FlowCapableTopologyProvider.onSessionInitiated(FlowCapableTopologyProvider.java:55)
at org.opendaylight.controller.md.sal.binding.util.BindingContextUtils.createProviderContextAndInitialize(BindingContextUtils.java:56)
at org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker.registerProvider(RootBindingAwareBroker.java:172)
at org.opendaylight.controller.sal.binding.impl.RootBindingAwareBroker.registerProvider(RootBindingAwareBroker.java:160)
at org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider.onBrokerAvailable(AbstractBindingAwareProvider.java:18)
at org.opendaylight.controller.sal.binding.api.AbstractBrokerAwareActivator$1$1.run(AbstractBrokerAwareActivator.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException: Class interface org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNodeConnector is not valid child of interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.node.NodeConnector
at org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.create(IncorrectNestingException.java:28)
at org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.childNonNull(DataContainerCodecContext.java:178)
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.bindingPathArgumentChild(DataObjectCodecContext.java:178)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecContextNode(BindingCodecContext.java:127)
at org.opendaylight.yangtools.binding.data.codec.impl.InstanceIdentifierCodec.serialize(InstanceIdentifierCodec.java:29)
at org.opendaylight.yangtools.binding.data.codec.impl.InstanceIdentifierCodec.serialize(InstanceIdentifierCodec.java:19)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toYangInstanceIdentifier(BindingNormalizedNodeCodecRegistry.java:87)
at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalized(BindingToNormalizedNodeCodec.java:89)
at org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker.registerDataChangeListener(AbstractForwardedDataBroker.java:68)
at org.opendaylight.openflowplugin.applications.topology.manager.DataChangeListenerImpl$1.call(DataChangeListenerImpl.java:58)
at org.opendaylight.openflowplugin.applications.topology.manager.DataChangeListenerImpl$1.call(DataChangeListenerImpl.java:55)
at org.opendaylight.openflowplugin.common.wait.SimpleTaskRetryLooper.loopUntilNoException(SimpleTaskRetryLooper.java:41)
at org.opendaylight.openflowplugin.applications.topology.manager.DataChangeListenerImpl.<init>(DataChangeListenerImpl.java:55)
... 10 more

opendaylight-user@root>

====



 Comments   
Comment by Flavio Fernandes [ 13/May/15 ]

[15:07:13] <flaviof> vishnoianil: qq.
[15:07:23] <vishnoianil> flaviof, sure
[15:07:23] <flaviof> vishnoianil: If Isee this: https://gist.github.com/f000be830e77bcb20c43
[15:07:54] <flaviof> vishnoianil: is that begign enough, so I can continue, or is that reason to start over?
[15:08:17] <vishnoianil> flaviof, for me that means stop the controller, delete the data directory and restart it
[15:08:19] <vishnoianil>
[15:08:26] <vishnoianil> flaviof, no it's not benign
[15:08:38] <flaviof> vishnoianil: I'm glad I asked.
[15:08:47] <flaviof> thanks!
[15:09:00] <vishnoianil> flaviof, i didn't get a chance to dig into that, because we have something more critical on plate

Comment by Tony Tkacik [ 13/May/15 ]

Partly duplicate of CONTROLLER-1278
but providing reference to topology model in initial config
for topology provider will prevent app starting before models are loaded.

Initial config contains capabilities section, where topology model and flow capable model should be listed.

This will prevent it from starting before models are loaded.

Comment by Flavio Fernandes [ 13/May/15 ]

(In reply to Tony Tkacik from comment #2)
> Partly duplicate of CONTROLLER-1278
> but providing reference to topology model in initial config
> for topology provider will prevent app starting before models are loaded.
>
> Initial config contains capabilities section, where topology model and flow
> capable model should be listed.
>
> This will prevent it from starting before models are loaded.

thanks for the update, Tony!

Comment by Sam Hague [ 18/May/15 ]

(In reply to Tony Tkacik from comment #2)
> Partly duplicate of CONTROLLER-1278
> but providing reference to topology model in initial config
> for topology provider will prevent app starting before models are loaded.
>
> Initial config contains capabilities section, where topology model and flow
> capable model should be listed.
>
> This will prevent it from starting before models are loaded.

Tony,

does this mean out ovsdb netvirt app needs to be using config? Currently netvirt is activator based and does not use config. Changing to config has been difficult because there is a lot of dependency injection and callback code that we ahve not been able to convert.

Thanks, Sam

Comment by Tony Tkacik [ 19/May/15 ]

Hi, there is patch for controller which adds blocking behaviour for users
Which uses different activation,
That means if we detect situation such as class is present and schema
Not available yet, we will block user thread and unblock
It when schema is available or after 5sec.

Tony

Comment by Sam Hague [ 19/May/15 ]

Tony,

could you post the gerrit for the patch?

How does config determine that a schema is not loaded if the application does not use config to set a capability for the model?

Thanks, Sam

Comment by Jamo Luhrsen [ 01/Jun/15 ]

Flavio,

I am tracking on this issue too. Looks like the bug that was noted as partly duplicate https://bugs.opendaylight.org/show_bug.cgi?id=3067 had it's patch merged today https://git.opendaylight.org/gerrit/#/c/19607/ . It didn't seem to fix my case though. Has it fixed your case? if so, I'll open a new bug to track it on my side.

Thanks,
JamO

Comment by Flavio Fernandes [ 01/Jun/15 ]

(In reply to Jamo Luhrsen from comment #7)
> Flavio,
>
> I am tracking on this issue too. Looks like the bug that was noted as
> partly duplicate https://bugs.opendaylight.org/show_bug.cgi?id=3067 had it's
> patch merged today https://git.opendaylight.org/gerrit/#/c/19607/ . It
> didn't seem to fix my case though. Has it fixed your case? if so, I'll
> open a new bug to track it on my side.
>
> Thanks,
> JamO

Hi JamO!

I have not seen this issue for a while. I'd say it's best if you
open a new bug to track it on your side.

– flavio

Comment by Tony Tkacik [ 19/Jun/15 ]

https://git.opendaylight.org/gerrit/#/c/22804/1 - improves reporting of this type of error in yangtools - which will result in md-sal waiting till schema for inventory augmentations is loaded.

Comment by Abhijit Kumbhare [ 10/Nov/15 ]

No longer an issue.

Comment by Harinath Mallepally [ 26/Jul/16 ]

Hi,

why do I get this exception?
..

IncorrectNestingException: Child interface org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.xxxxxxxxxxAugment is not valid child.
at org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.create(IncorrectNestingException.java:28)
at org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.childNonNull(DataContainerCodecContext.java:180)[66:org.opendaylight.mdsal.binding-dom-codec:0.8.1.Beryllium-SR1]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.streamChild(DataObjectCodecContext.java:149)[66:org.opendaylight.mdsal.binding-dom-codec:0.8.1.Beryllium-SR1]
at org.opendaylight.yangtools.binding.data...

Comment by Sam Hague [ 26/Jul/16 ]

(In reply to Harinath Mallepally from comment #11)
> Hi,
>
> why do I get this exception?
> ..
>
> IncorrectNestingException: Child interface
> org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.xxxxxxxxxxAugment
> is not valid child.
> at
> org.opendaylight.yangtools.binding.data.codec.impl.IncorrectNestingException.
> create(IncorrectNestingException.java:28)
> at
> org.opendaylight.yangtools.binding.data.codec.impl.DataContainerCodecContext.
> childNonNull(DataContainerCodecContext.java:180)[66:org.opendaylight.mdsal.
> binding-dom-codec:0.8.1.Beryllium-SR1]
> at
> org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.
> streamChild(DataObjectCodecContext.java:149)[66:org.opendaylight.mdsal.
> binding-dom-codec:0.8.1.Beryllium-SR1]
> at org.opendaylight.yangtools.binding.data...

Harinath,

not sure if it is the same as in this bug here, but the cause was because certain models were not loaded when they were used. The solution was to add methods to ensure all models were loaded before using them. in the config.xml file you can add required-capabilities for your module to indicate what models to wait for. The patch mentioned below by Tony is for modules that don't use config.

Sam

Generated at Wed Feb 07 20:32:29 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.