[YANGTOOLS-818] Typedef not resolved properly in deviation Created: 12/Oct/17  Updated: 10/Apr/22  Resolved: 13/Oct/17

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Peter Verthez Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Zip Archive example.zip    
Issue Links:
Duplicate
duplicates YANGTOOLS-815 Deviate replace using a user-defined-... Verified
External issue ID: 9278

 Description   

We are currently using Carbon SR1.

When parsing some deviations, we get errors that typedefs can't be resolved, although the model seems correct. I've attached a minimal model showing the error. When parsing that model, we get the following error:

Caused by: org.opendaylight.yangtools.yang.parser.spi.source.SourceException: Cannot resolve QNameModule for 'ex:mytype' [at example-dev:32:12]
at org.opendaylight.yangtools.yang.parser.spi.source.SourceException.throwIf(SourceException.java:97)
at org.opendaylight.yangtools.yang.parser.spi.source.SourceException.throwIfNull(SourceException.java:114)
at org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils.qnameFromArgument(StmtContextUtils.java:524)
at org.opendaylight.yangtools.yang.parser.stmt.rfc6020.TypeStatementImpl$Definition.createEffective(TypeStatementImpl.java:162)
at org.opendaylight.yangtools.yang.parser.stmt.rfc6020.TypeStatementImpl$Definition.createEffective(TypeStatementImpl.java:87)
at org.opendaylight.yangtools.yang.parser.stmt.reactor.StatementContextBase.buildEffective(StatementContextBase.java:415)
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 org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.EffectiveStatementBase.(EffectiveStatementBase.java:55)
at org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.DeclaredEffectiveStatementBase.(DeclaredEffectiveStatementBase.java:31)
at org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.AbstractEffectiveDocumentedNode.(AbstractEffectiveDocumentedNode.java:30)



 Comments   
Comment by Peter Verthez [ 12/Oct/17 ]

Attachment example.zip has been added with description: Example model showing the bug

Generated at Wed Feb 07 20:54:24 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.