bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
527 stars 305 forks source link

The JAR Editor temp files refresh fails #4393

Closed pkriens closed 3 years ago

pkriens commented 3 years ago

image

pkriens commented 3 years ago
org.eclipse.core.internal.resources.ResourceException: Errors occurred while refreshing resources with the local file system.
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshResource(FileSystemResourceManager.java:981)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:961)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshRoot(FileSystemResourceManager.java:1003)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:954)
    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1557)
    at bndtools.explorer.BndtoolsExplorer$3.lambda$run$1(BndtoolsExplorer.java:375)
    at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:185)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Contains: The project description file (.project) for 'BndtoolsJAREditorTempFiles' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
java.lang.Exception: The project description file (.project) for 'BndtoolsJAREditorTempFiles' is missing.  This file contains important information about the project.  The project will not function properly until this file is restored.
    at org.eclipse.core.internal.resources.ResourceException.provideStackTrace(ResourceException.java:42)
    at org.eclipse.core.internal.resources.ResourceException.<init>(ResourceException.java:38)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceManager.java:908)
    at org.eclipse.core.internal.resources.Project.updateDescription(Project.java:1346)
    at org.eclipse.core.internal.resources.File.updateMetadataFiles(File.java:376)
    at org.eclipse.core.internal.localstore.RefreshLocalVisitor.visit(RefreshLocalVisitor.java:291)
    at org.eclipse.core.internal.localstore.UnifiedTree.accept(UnifiedTree.java:119)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshResource(FileSystemResourceManager.java:978)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:961)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refreshRoot(FileSystemResourceManager.java:1003)
    at org.eclipse.core.internal.localstore.FileSystemResourceManager.refresh(FileSystemResourceManager.java:954)
    at org.eclipse.core.internal.resources.Resource.refreshLocal(Resource.java:1557)
    at bndtools.explorer.BndtoolsExplorer$3.lambda$run$1(BndtoolsExplorer.java:375)
    at org.eclipse.core.runtime.jobs.Job$2.run(Job.java:185)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
pkriens commented 3 years ago

This happened after a project delete

pkriens commented 3 years ago

@gamerson quick fix for this?

gamerson commented 3 years ago

hey @pkriens this appears to just be the normal case if you delete a project and then after you refresh it (if eclipse still thinks the project exists), it is going to throw this error. I'm not sure we need a quick fix specifically for this since this would be identical case if you deleted a physical project dir "out from under" Eclipse and next time that folder was refreshed it would throw a similar exception.

pkriens commented 3 years ago

Ok, but it keeps popping up at random times. How could I shut it up then? And should we then not report this in the message?

bjhargrave commented 3 years ago

Rename folder to start with .. Also if the workspace has a .gitignore file, then add the folder to the .gitignore file.

This seems to be when one uses the same folder as the git working directory and the Eclipse workspace directory.

bjhargrave commented 3 years ago

@gamerson Can you fix this by Sep 15 (or defer to 6.1)?

gamerson commented 3 years ago

Yes, i'll take a look.

On Fri, Aug 20, 2021 at 10:48 AM BJ Hargrave @.***> wrote:

@gamerson https://github.com/gamerson Can you fix this by Sep 15 (or defer to 6.1)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bndtools/bnd/issues/4393#issuecomment-902787206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFP4HOOIEMF5RRL2BALT5Z2MNANCNFSM4TJ4QODA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

-- Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com

gamerson commented 3 years ago

I sent a PR for this: https://github.com/bndtools/bnd/pull/4842