I had a working hello-world ODL project on Carbon release. I changed the POM dependencies to the latest version from the public repository and now I am getting a failure while compiling the 'impl' project:
cannot access org.opendaylight.yangtools.yang.binding.RpcOutput [ERROR] class file for org.opendaylight.yangtools.yang.binding.RpcOutput not found
This is due to the source generated by the yang tools in the 'api' project. The sources contain imports of 'RpcOutput' but the 'impl' project does not find it.
I changed my POM in the 'api' project to Carbon and it works fine.
My POM for 'api' project is
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<!--<version>0.10.4-Carbon</version>--> <--this works-->
<version>4.0.1</version> <--this fails-->
<relativePath/>
</parent>
Versions 4.0.1 and 3.0.6 fail - what has changed in the latest version of ODL and yang tools from the org.opendaylight.mdsal.binding-parent
project?
The compilation fails in the 'impl' project which is simple:
public class HelloWorldImpl implements HelloService{
@Override
public ListenableFuture<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) {
HelloWorldOutputBuilder hout = new HelloWorldOutputBuilder();
hout.setGreeting("hello" + input.getName());
return RpcResultBuilder.success(hout.build()).buildFuture();
}
}
It fails with the "class file for org.opendaylight.yangtools.yang.binding.RpcOutput not found" error.
The 'impl' project pom is
<parent>
<groupId>org.opendaylight.controller</groupId>
<artifactId>config-parent</artifactId>
<!--<version>0.6.4-Carbon</version>--><!--this was the old working-->
<version>0.8.4</version> <!--this is also the latest ver-->
<relativePath/>
</parent>
The main pom is
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
<!--<version>1.8.4-Carbon</version>--><!--this was old working ver-->
<version>5.0.0</version> <!--this is also the latest ver-->
<relativePath/>
</parent>