Repository navigation
ResourceException: Problems encountered while copying resources. #169
Copy link
Copy link
Closed
Labels
Description
I started getting the error below popping up every once in a while since upgrading to one of the later releases.
Environment
- Operating System: OSX Sierra - 10.12.3
- JDK version: 8.121
- Visual Studio Code version: 1.10.2
- Java extension version: 0.0.13
Steps To Reproduce
- Ever since the latest update I have been receiving the error below. This is happening on an Android project.
[Error - 5:00:10 PM] Mar 20, 2017 2:50:47 PM JavaBuilder handling ImageBuilderInternalException while building: jdt.ls-java-project
Problems encountered while copying resources.
org.eclipse.core.internal.resources.ResourceException: Problems encountered while copying resources.
at org.eclipse.core.internal.localstore.FileSystemResourceManager.copy(FileSystemResourceManager.java:336)
at org.eclipse.core.internal.resources.Resource.copy(Resource.java:545)
at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.copyResource(AbstractImageBuilder.java:383)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder$3.visit(BatchImageBuilder.java:231)
at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:84)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:87)
at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:129)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.copyExtraResourcesBack(BatchImageBuilder.java:200)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.cleanOutputFolders(BatchImageBuilder.java:124)
at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:47)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:256)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:180)
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.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Contains: Resource '/jdt.ls-java-project/src/pom.xml' does not exist.
Unfortunately, I am not able to upload a sample project right now.
Reactions are currently unavailable
Activity
leonardoam commentedon Mar 27, 2017
I'm having the same issue here. Any updates? I also have the following exception:
fbricon commentedon Mar 27, 2017
did you delete some files?
fbricon commentedon Mar 27, 2017
Most likely, you can fix the problem by wiping out %APPDATA%\Code\User\workspaceStorage (or ~/Library/Application Support/Code/User/workspaceStorage on MacOS) and restart vscode
leonardoam commentedon Mar 27, 2017
I'm on Linux (Antergos), could you get me the corresponding path? I probably deleted some files trying to solve the first issue (mentioned by Xiot).
leonardoam commentedon Mar 27, 2017
Found it:
Path for Linux users: ~/.config/Code/User/workspaceStorage/
I'm trying this solution right now (I'll try reinstalling instead of restarting, because my Visual Code seems to be pretty messed up).
leonardoam commentedon Mar 27, 2017
UPDATE:
After cleaning .config/Code and reinstalling Visual Code, the .project exception was fixed but now I got this exception whenever I try to use suggestions:
Xiot commentedon Mar 27, 2017
I may have switched branches at some point.
I'm currently using both Android Studio and VSCode at the same time depending on what I need to do.
gorkem commentedon Mar 31, 2017
@leonardoam This exception indicates that VSCode sends a cancellation of the code assist. I wonder if some other extension that provides keybindings is interfering?
gorkem commentedon Mar 31, 2017
@fbricon I think the case that @Xiot has with multiple tools working on same codebase, is why we should rethink about how we run the builders.
One idea is to tell the builders to stop copying resources during build. Unlike Eclipse etc. we delegate that sort of functionality build tasks.
fbricon commentedon Mar 31, 2017
@gorkem if anything, that should be an optional behavior, as that'd make, for instance, developing a spring-boot app while doing spring-boot:run, much less productive.
gorkem commentedon Mar 31, 2017
@fbricon Does
spring-boot:rundepends on resources (in addition to compiled files) to be copied as well?fbricon commentedon Mar 31, 2017
@gorkem possibly :-)
leonardoam commentedon Apr 3, 2017
@gorkem I'm using the following extensions:
Git Blame by Wade Anderson
Git History by Don Jayamanne
Git Project Manager by Felipe Caputo
gitignore by Codezombie
Java Language Support by George Fraser
Java Snippets Taiwo Kareem
Language Support for Java(Tm) by Red Hat
MagicPython by MagicStack Inc.
Markdown Theme Kit by Microsoft
Material-theme by zhuangtongfa
Python by Don Jayamanne
Python for VSCode by Thomas Haakon Townsend
vscode-icons by Roberto Huertas
I'll try later uninstalling other extensions and see if the problem occurs.
leonardoam commentedon Apr 3, 2017
UPDATE: I tried deactivating all extensions but this one and the error persists.
fbricon commentedon May 30, 2017
@Xiot does your android project contain one or more pom.xml files?
Xiot commentedon Jun 5, 2017
@fbricon Nope. Don't have any pom.xml
fbricon commentedon Jun 5, 2017
Guys, please clean up the workspace directory and try again with the latest 0.5.0 release.
stact commentedon May 25, 2026
Wow this post if from 2017 and solved the issue 💯
You can clean the workspace directory in the following way:
Open the command palette (F1)
select Java: Clean the Java Language Server Workspace
select Restart and delete from the confirmation prompt
Thx @fbricon
robstryker commentedon Oct 28, 2026
I think it can be said this is often the result of using multiple tools at the same time. Things get out of sync, adn there's a workaround. I'll be closing this issue.