[YANGIDE-17] FileNotFoundException at org.opendaylight.yangide.core.indexing.JobManager Created: 02/Jun/16  Updated: 19/Oct/17

Status: Open
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: 5999

 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:

java.io.FileNotFoundException: /org.opendaylight.yangide.org.opendaylight.yangide.yangparser/libs/jsr305-3.0.0.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at org.opendaylight.yangide.core.model.YangProject.buildStructure(YangProject.java:90)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:232)
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.indexing.IndexAllProject.execute(IndexAllProject.java:108)
at org.opendaylight.yangide.core.indexing.JobManager.run(JobManager.java:414)
at java.lang.Thread.run(Thread.java:745)

also very similarly but not identical this one:

java.io.FileNotFoundException: /home/vorburger/.p2/pool/plugins/org.eclipse.m2e.maven.runtime_1.7.0.20160524-1811 (Is a directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:130)
at org.opendaylight.yangide.core.model.YangProject.buildStructure(YangProject.java:90)
at org.opendaylight.yangide.core.model.YangElement.generateInfos(YangElement.java:232)
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.indexing.IndexAllProject.execute(IndexAllProject.java:108)
at org.opendaylight.yangide.core.indexing.JobManager.run(JobManager.java:414)
at java.lang.Thread.run(Thread.java:745)

It is possible that both are specific to *.yang files in Eclipse plugin projects only (note both errors are in yangide, and that's where I see it, not on real ODL projects with yang), which is admittedly not a typical use case, but it would still be nicer if we didn't throw this.



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

I don't suppose you have an easy process for repeating either of these? I believe I've seen this kind of error on that line, but I'd forgotten about it.

From a brief inspection, I can see how to resolve this. The loop assumes that everything in the list is a jar file, and exists. It should at least verify it exists. I see no particular reason to restrict this to jar files, so I would think if it's a directory and not a jar file, it could create a "YangFolder" instead of a "YangJarFile".

I really need test cases for these.

Comment by Michael Vorburger [ 02/Jun/16 ]

> I really need test cases for these.

Try installing yangide into an Eclipse in which you have the yangide source code projects open, do you know what I mean? Then menu Project > Clean all projects, and I bet you'll repro. this?

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

Sounds promising. I'll queue up a test with that strategy.

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

Hmm, not hitting it. I did it in the opposite order (workspace with yangide plugin installed, then imported yangide projects). I've tried to clean all projects and other random whacks, but it's not getting to that block. It would be great if I actually understood the internal architecture of this well enough to know when/why it would get there.

Trying some other experiments.

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