Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Problem Serializing NormalizedNode using Yangtools

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.