testtool fails with custom yang model.
Hi,
I am trying to analyze the ncmount application from coretutorials with testtool simulator. With existing yang models testtool works fine.
To check the behavior of application, i tried replicating one of the yang model with different namespace. Testool fails to start. I am getting following error: java -jar netconf-testtool-1.2.0-SNAPSHOT-executable.jar --schemas-dir ./yang
11:57:21.394 [main] INFO o.o.n.t.tool.NetconfDeviceSimulator - Starting 1, SSH simulated devices starting on port 17830 11:57:22.004 [main] ERROR o.o.netconf.test.tool.Main - Unhandled exception java.lang.RuntimeException: Cannot parse schema context at org.opendaylight.netconf.test.tool.NetconfDeviceSimulator.parseSchemasToModuleCapabilities(NetconfDeviceSimulator.java:303) at org.opendaylight.netconf.test.tool.NetconfDeviceSimulator.start(NetconfDeviceSimulator.java:153) at org.opendaylight.netconf.test.tool.Main.main(Main.java:60) Caused by: org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException: resolve sources execution failed, failed source: null, resolved sources: [], unsatisfied imports: {} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.opendaylight.yangtools.util.concurrent.ReflectiveExceptionMapper.newWithCause(ReflectiveExceptionMapper.java:31) at org.opendaylight.yangtools.util.concurrent.ExceptionMapper.apply(ExceptionMapper.java:87) at org.opendaylight.yangtools.util.concurrent.ExceptionMapper.apply(ExceptionMapper.java:37) at com.google.common.util.concurrent.Futures$MappingCheckedFuture.mapException(Futures.java:1809) at com.google.common.util.concurrent.AbstractCheckedFuture.checkedGet(AbstractCheckedFuture.java:85) at org.opendaylight.netconf.test.tool.NetconfDeviceSimulator.parseSchemasToModuleCapabilities(NetconfDeviceSimulator.java:301) ... 2 common frames omitted Caused by: org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException: All available providers exhausted at org.opendaylight.yangtools.yang.model.repo.util.AbstractSchemaRepository$1.create(AbstractSchemaRepository.java:83) at com.google.common.util.concurrent.Futures$FallbackFuture$1.onFailure(Futures.java:471) at com.google.common.util.concurrent.Futures$6.run(Futures.java:1310) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457) at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156) at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101) at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170) at com.google.common.util.concurrent.ForwardingListenableFuture.addListener(ForwardingListenableFuture.java:47) at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1322) at com.google.common.util.concurrent.Futures$FallbackFuture.<init>(Futures.java:459) at com.google.common.util.concurrent.Futures.withFallback(Futures.java:444) at com.google.common.util.concurrent.Futures.withFallback(Futures.java:379) at org.opendaylight.yangtools.yang.model.repo.util.AbstractSchemaRepository.fetchSource(AbstractSchemaRepository.java:74) at org.opendaylight.yangtools.yang.model.repo.util.AbstractSchemaRepository.getSchemaSource(AbstractSchemaRepository.java:110) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory.requestSource(SharedSchemaContextFactory.java:78) at org.opendaylight.yangtools.yang.parser.repo.SharedSchemaContextFactory$$Lambda$3/1922464006.apply(Unknown Source) at com.google.common.collect.Iterators$8.transform(Iterators.java:799) at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48) at java.util.AbstractCollection.toArray(AbstractCollection.java:141) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:258) at ...
Can you provide the rest of this exception please in a gist or pastebin: Caused by: org.opendaylight.yangtools.yang.model.repo.api.SchemaResolutionException: resolve sources execution failed, failed source: null, resolved sources: [], unsatisfied imports: {} . It will likely point to the problem.
adetalhouet ( 2016-10-21 06:33:06 -0800 )editplease find the exception detailed.
kouser ( 2016-10-21 23:39:30 -0800 )edit> To check the behavior of application, i tried replicating one of the yang model with different namespace.
adetalhouet ( 2016-10-31 10:38:25 -0800 )editYou duplicated the yang file, change the namespace but keep the same module name? If that's the case, this is wrong, you have to update the yang file name, and the module name as well/.