Hi Team
Api module compilation was successful until Oxygen-SR4 with below yang module definition, and it is failing in Flourine-SR2.
If the highlighted list name is changed from “e” to anything else is working fine.
Yes, nobody follows such a naming convention, it is just a sample program.
Please ignore if it is resolved already
Compilation errors :
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project o4-sample-api: Compilation failure: Compilation failure:
[ERROR] /root/ODL/o4-sample/api/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/o4/sample/rev170830/a/b/d/EBuilder.java:[63,36] incompatible types: org.opendaylight.yangtools.yang.binding.Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.o4.sample.rev170830.a.b.d.E>
cannot be converted to E
[ERROR] /root/ODL/o4-sample/api/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/o4/sample/rev170830/a/b/d/EBuilder.java:[101,26] org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.o4.sample.rev170830.a.b.d.EBuilder.EImpl
is not abstract and does not override abstract method <E>augmentation(java.lang.Class<E>) in org.opendaylight.yangtools.yang.binding.Augmentable
[ERROR] /root/ODL/o4-sample/api/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/o4/sample/rev170830/a/b/d/EBuilder.java:[135,46] name clash: <E>augmentation(java.lang.Class<E>) in
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.o4.sample.rev170830.a.b.d.EBuilder.EImpl and <E>augmentation(java.lang.Class<E>) in org.opendaylight.yangtools.yang.binding.Augmentable have the same erasure, yet neither overrides the other
[ERROR] /root/ODL/o4-sample/api/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/o4/sample/rev170830/a/b/d/EBuilder.java:[134,9] method does not override or implement a method from
a supertype
[ERROR] /root/ODL/o4-sample/api/target/generated-sources/mdsal-binding/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/yang/o4/sample/rev170830/a/b/d/EBuilder.java:[136,40] incompatible types: org.opendaylight.yangtools.yang.binding.Augmentation<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.o4.sample.rev170830.a.b.d.E>
cannot be converted to E
[ERROR] -> [Help 1]
module o4-sample {
yang-version 1;
namespace "urn:opendaylight:params:xml:ns:yang:o4-sample";
prefix "o4-sample";
revision "2017-08-30" { // TODO change revision to date of model creation
description "Initial revision of o4-sample model";
}
container a {
list b {
key b-key;
leaf b-key{
type string;
}
leaf b-leaf{
type string;
}
list c {
key c-key;
leaf c-key{
type string;
}
leaf c-leaf{
type string;
}
}
list d {
key d-key;
leaf d-key{
type string;
}
list e {
key e-key;
leaf e-key{
type string;
}
}
}
}
}
}
Thanks
Vikram