Ask Your Question
0

Problem Serializing NormalizedNode using Yangtools

asked 2015-08-15 06:54:39 -0700

kaja.mohideen gravatar image

I'm trying to using Yangtools for developing my application which uses XML for its configuration.

  1. I tried to parse a XML file to DOM Document , then to NormalizedNode - Success.
  2. When I tried to serialize the NormalizedNode (got from [1]) to a new DOM Document again, I get the following exception.

    Exception in thread "main" java.lang.IllegalStateException: Unknown augmentation node detected, identified by: [(urn:kaja:proto:child?revision=2015-08-13)childbyaug], in: SchemaContextImpl{modules=[ModuleImpl[name=ietf-inet-types, namespace=urn:ietf:params:xml:ns:yang:ietf-inet-types, revision=Fri Sep 24 00:00:00 IST 2010, prefix=inet, yangVersion=1], ModuleImpl[name=proto-core, namespace=urn:kaja:proto:core, revision=Thu Aug 13 00:00:00 IST 2015, prefix=proto, yangVersion=1], ModuleImpl[name=proto-plug, namespace=urn:kaja:proto:child, revision=Thu Aug 13 00:00:00 IST 2015, prefix=plug, yangVersion=1]]} at com.google.common.base.Preconditions.checkState(Preconditions.java:197) at org.opendaylight.yangtools.yang.data.impl.schema.SchemaUtils.findSchemaForAugment(SchemaUtils.java:115) at org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.ContainerNodeBaseSerializer.getAugmentedCase(ContainerNodeBaseSerializer.java:38) at org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.ContainerNodeBaseSerializer.getAugmentedCase(ContainerNodeBaseSerializer.java:27) at org.opendaylight.yangtools.yang.data.impl.schema.transform.base.serializer.BaseDispatcherSerializer.serialize(BaseDispatcherSerializer.java:77) at org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.serializer.ContainerNodeDomSerializer.serialize(ContainerNodeDomSerializer.java:37) at org.opendaylight.yangtools.yang.data.impl.schema.transform.dom.serializer.ContainerNodeDomSerializer.serialize(ContainerNodeDomSerializer.java:22) at com.kaja.proto.Proto1.main(Proto1.java:77)

When I checked the source code; SchemaContext::getAvailableAugmentation is returning an empty collection. I think, this is the problem. But, all the modules from the schemaContext is giving proper response for getAugmentation.

Please help on how to serialize the NormalizedNode.

I'm using 0.7 (Lithium) for Yangtools Version in my Maven POM.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-30 14:55:48 -0700

Robert Varga gravatar image

Can you open a bug at https://bugs.opendaylight.org , please?

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2015-08-15 06:54:39 -0700

Seen: 145 times

Last updated: Aug 30 '15