[YANGIDE-18] YangModelException: Does not exist Created: 02/Jun/16  Updated: 19/Oct/17

Status: Confirmed
Project: yangide
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Michael Vorburger Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 6000

 Description   

I'm too frequently, during "normal" operation (dev workspace with like many yangtools and controller projects open in it) seeing this exception make the Error Log pop-up, when probably this should somehow be "handled" (ignored?) in the code:

org.opendaylight.yangide.core.YangModelException: Does not exist
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:216)
at org.opendaylight.yangide.core.model.YangElement.openAncestors(YangElement.java:247)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:207)
at org.opendaylight.yangide.core.model.YangElement.openAncestors(YangElement.java:247)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:207)
at org.opendaylight.yangide.core.model.YangElement.openWhenClosed(YangElement.java:276)
at org.opendaylight.yangide.core.model.YangElement.getElementInfo(YangElement.java:161)
at org.opendaylight.yangide.core.model.YangElement.getBuffer(YangElement.java:56)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.validate(YangBuildParticipant.java:135)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.access$0(YangBuildParticipant.java:130)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant$1.execute(YangBuildParticipant.java:120)
at org.opendaylight.yangide.core.indexing.JobManager.performConcurrentJob(JobManager.java:276)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.build(YangBuildParticipant.java:117)
at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487)
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:399)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$3.run(SetupTaskPerformer.java:3066)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



 Comments   
Comment by David M. Karr [ 02/Jun/16 ]

We need to understand how this is happening. I can't tell anything about what's happening here by just looking at the code at TOS. This is basically telling us that something doesn't exist, and that's all.

Comment by David M. Karr [ 02/Jun/16 ]

We could at least augment the message to include the name and full path of the resource that isn't found. That would help at least.

Comment by Michael Vorburger [ 02/Jun/16 ]

> augment the message to include the name and full path of the resource that isn't found.

That sounds like a great idea to me! If you would like to do this, then I promise to update this bug with new details next time I see it?

Comment by David M. Karr [ 02/Jun/16 ]

Already starting to test the change. I'll notify here when it's merged (but you'll probably notice).

Comment by David M. Karr [ 02/Jun/16 ]

This change to add more info is merged.

I noticed that when I set a breakpoint at this spot, it was hitting it for some odd resources, like for files in projects that definitely don't exist. Seems like there's some out of date cache in play here.

I also noticed that for the instances when it hit this for me, it wasn't resulting in an error dialog. I imagine at least one of the paths that get here are just ignoring the exception if the resource "doesn't work".

Comment by Michael Vorburger [ 17/Jun/16 ]

Re-opening this bug, this one currently definitely is not RESOLVED FIXED.

Following the change to provide more details (above, thanks), I'm now seeing the Exception below - and noticed something interesting: This refers to an Eclipse Project which I have in my Workspace, but at that moment closed (I personally regularly close projects and then open them again). Could that be the root cause? Perhaps some code needs to be improved to handle closed Projects correctly?

org.opendaylight.yangide.core.YangModelException: Does not exist: name[org.opendaylight.ovsdb.hwvtepsouthbound-aggregator] fullpath[/org.opendaylight.ovsdb.hwvtepsouthbound-aggregator]
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:226)
at org.opendaylight.yangide.core.model.YangElement.openAncestors(YangElement.java:257)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:207)
at org.opendaylight.yangide.core.model.YangElement.openAncestors(YangElement.java:257)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:207)
at org.opendaylight.yangide.core.model.YangElement.openWhenClosed(YangElement.java:286)
at org.opendaylight.yangide.core.model.YangElement.getElementInfo(YangElement.java:161)
at org.opendaylight.yangide.core.model.YangElement.getBuffer(YangElement.java:56)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.validate(YangBuildParticipant.java:135)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant.access$0(YangBuildParticipant.java:130)
at org.opendaylight.yangide.m2e.yang.YangBuildParticipant$1.execute(YangBuildParticipant.java:120)
at org.opendaylight.yangide.core.indexing.JobManager.performConcurrentJob(JobManager.java:276)

[omited call stack elements which are identical to original one above]

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