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

Yang to java conversion throws NPE

[ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator java.lang.NullPointerException at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.createDescription(BindingGeneratorImpl.java:2094) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addRawInterfaceDefinition(BindingGeneratorImpl.java:1759) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addDefaultInterfaceDefinition(BindingGeneratorImpl.java:1682) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addDefaultInterfaceDefinition(BindingGeneratorImpl.java:1654) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.groupingToGenType(BindingGeneratorImpl.java:715) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.groupingsToGenTypes(BindingGeneratorImpl.java:695) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.moduleToGenTypes(BindingGeneratorImpl.java:266) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.generateTypes(BindingGeneratorImpl.java:244) at org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl.generateSources(CodeGeneratorImpl.java:61) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSourcesWithOneGenerator(YangToSourcesProcessor.java:306) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSources(YangToSourcesProcessor.java:245) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.execute(YangToSourcesProcessor.java:86) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesMojo.execute(YangToSourcesMojo.java:117) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Yang to java conversion throws NPE

I am using Lithium SR3 version 0.7.3-SNAPHSHOT java conversion tool. The code is throwing below NullPointer Exception. [ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator java.lang.NullPointerException at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.createDescription(BindingGeneratorImpl.java:2094) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addRawInterfaceDefinition(BindingGeneratorImpl.java:1759) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addDefaultInterfaceDefinition(BindingGeneratorImpl.java:1682) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.addDefaultInterfaceDefinition(BindingGeneratorImpl.java:1654) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.groupingToGenType(BindingGeneratorImpl.java:715) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.groupingsToGenTypes(BindingGeneratorImpl.java:695) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.moduleToGenTypes(BindingGeneratorImpl.java:266) at org.opendaylight.yangtools.sal.binding.generator.impl.BindingGeneratorImpl.generateTypes(BindingGeneratorImpl.java:244) at org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl.generateSources(CodeGeneratorImpl.java:61) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSourcesWithOneGenerator(YangToSourcesProcessor.java:306) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.generateSources(YangToSourcesProcessor.java:245) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesProcessor.execute(YangToSourcesProcessor.java:86) at org.opendaylight.yangtools.yang2sources.plugin.YangToSourcesMojo.execute(YangToSourcesMojo.java:117) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Thanks,