[MDSAL-78] Unable to write DateAndTime [ietf-yang-types] to data store Created: 10/Apr/15  Updated: 16/Mar/19  Resolved: 16/Mar/19

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

Type: Bug
Reporter: Vishal Thapar Assignee: Vishal Thapar
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks BGPCEP-311 New openconfig modules frequently cau... Resolved
External issue ID: 2974

 Description   

I am writing to oeprational/ietf-interfaces:interface-state from my code [vpnmanager] but ran into following exception on write:

2015-04-10 19:27:14,686 | WARN | ult-dispatcher-2 | JavassistUtils | 92 - org.opendaylight.yangtools.binding-generator-impl - 0.7.0.SNAPSHOT | Failed to customize org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state._interface.Statistics$StreamWriter from prototype org.opendaylight.yangtools.binding.data.codec.gen.impl.DataObjectSerializerPrototype
javassist.CannotCompileException: [source error] no such class: org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime
at javassist.CtBehavior.setBody(CtBehavior.java:446)[89:javassist:3.19.0.GA]

This is the import statement in my code as well as generated file [org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface.java generated from ietf-interfaces.yang]:

import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.DateAndTime;

Bug is that rev130715.DateAndTime is being used even though the generated code says rev100924.DateAndTime. Either generated code should pick more recent revision or at the time of serialization it should look for the right class.



 Comments   
Comment by Tony Tkacik [ 13/Apr/15 ]

Hi, does your model import ietf-yang-types by revision or revision is missing in ietf-interfaces model?

If it is missing, workaround to this is to use revision-date along with your import statement to fix revisions.

Comment by Vishal Thapar [ 13/Apr/15 ]

Hi Tony,

This is not a custom yang but the the ietf-interfaces.yang in model/ietf. It is the standard yang file [RFC 7223] and doesn't include the revision.

Would you recommend editing this file to add revision?

Comment by Tony Tkacik [ 14/Apr/15 ]

Yes, my recommendation for work-around is to add revision.

To fix this issue in ODL would require larger effort which could not be fixed in following one or two weeks.

Comment by Vishal Thapar [ 15/Apr/15 ]

Workaround awaiting Code Review: https://git.opendaylight.org/gerrit/#/c/18264/

Comment by Robert Varga [ 19/Apr/15 ]

Changed to a bug and downgraded severity since a workaround exists.

Comment by Ryan Goulding [ 02/Feb/16 ]

We downgraded this issue in the MD-SAL call because there is a workaround. Tony is working hard to try to get this into RC3.

Comment by Robert Varga [ 04/Aug/18 ]

thapar is this still reproducible?

Comment by Robert Varga [ 16/Mar/19 ]

Please reopen if this reproduces again.

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