Troubleshooting a ClassNotFoundException for yangtools CompatUtils

asked 2016-07-11 12:29:49 -0800

George Adam gravatar image

updated 2016-07-14 09:00:34 -0800

I am trying to build (mvn clean install) a simple ODL project skeleton (based off of the startup project archetype). Unfortunately, I’m running into some strange behavior. I can add typedef blocks to my yang file, but when I try to add a simple container block to the yang file the build fails with a ClassNotFoundException for the yangtools CompatUtils class. Here’s a condensed stack trace.


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.912 s
[INFO] Finished at: 2016-07-11T12:25:10-06:00
[INFO] Final Memory: 41M/458M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources (binding) on project eman-api: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources failed: A required class was missing while executing org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources: org/opendaylight/yangtools/yang/model/util/type/CompatUtils
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT
.
.
.
[ERROR] urls[50] = file:/Users/gadam001c/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>org.opendaylight.eman:eman-api:0.1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.opendaylight.yangtools.yang.model.util.type.CompatUtils
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources (binding) on project eman-api: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources failed: A required class was missing while executing org.opendaylight.yangtools:yang-maven-plugin:0.7.5-SNAPSHOT:generate-sources: org/opendaylight/yangtools/yang/model/util/type/CompatUtils

Can anyone shed some light on what’s happening here, and how to fix it? I have tried the simple stuff like removing "org/opendaylight/yangtools" from my local .m2 repository and running the build again, but the error persists.

Any help is greatly appreciated.

EDIT 1

I have not been able to fix the error mentioned above, but I was able to work around it. I rebuilt my project from scratch using the ODL maven opendaylight-startup-archetype. After that I was able to add and build yang containers and lists as expected.

edit retag flag offensive close merge delete