question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Could not write workspace metadata '/tmp/com_diffplug_spotless_extra_eclipse

See original GitHub issue

If you are submitting a bug, please include the following:

  • summary of problem Errors reported AFTER successful build.
  • ~gradle~ or maven version 3.8.3
  • spotless version 2.17.1
  • operating system and version Ubuntu/20.04.3
  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
                <plugin>
                    <groupId>com.diffplug.spotless</groupId>
                    <artifactId>spotless-maven-plugin</artifactId>
                    <version>${spotless.version}</version>
                    <executions>
                        <execution>
                            <id>spotless-validation</id>
                            <phase>test</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <java>
                            <eclipse>
                                <file>file://${maven.multiModuleProjectDirectory}/build/eclipse-jdt-formatter.prefs</file>
                            </eclipse>
                        </java>
                        <cpp>
                            <includes>
                                <include>src/**/native/**/*.cpp</include>
                            </includes>
                            <eclipseCdt></eclipseCdt>
                        </cpp>
                    </configuration>
                </plugin>
  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace
[INFO] 
[INFO] --- spotless-maven-plugin:2.17.1:check (spotless-validation) @ ... ---
[INFO] 
...
Error:  Could not write workspace metadata '/tmp/com_diffplug_spotless_extra_eclipse12122245188339054218/.metadata/.plugins/org.eclipse.core.resources/0.snap'.
java.io.FileNotFoundException: /tmp/com_diffplug_spotless_extra_eclipse12122245188339054218/.metadata/.plugins/org.eclipse.core.resources/0.snap (No such file or directory)
    at java.io.FileOutputStream.open0 (Native Method)
    at java.io.FileOutputStream.open (FileOutputStream.java:298)
    at java.io.FileOutputStream.<init> (FileOutputStream.java:237)
    at java.io.FileOutputStream.<init> (FileOutputStream.java:158)
    at org.eclipse.core.internal.localstore.SafeChunkyOutputStream.<init> (SafeChunkyOutputStream.java:48)
    at org.eclipse.core.internal.localstore.SafeChunkyOutputStream.<init> (SafeChunkyOutputStream.java:44)
    at org.eclipse.core.internal.resources.SaveManager.snapTree (SaveManager.java:1474)
    at org.eclipse.core.internal.resources.SaveManager.save (SaveManager.java:1198)
    at org.eclipse.core.internal.resources.SaveManager.save (SaveManager.java:1143)
    at org.eclipse.core.internal.resources.DelayedSnapshotJob.run (DelayedSnapshotJob.java:55)
    at org.eclipse.core.internal.jobs.Worker.run (Worker.java:63)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fvghcommented, Oct 14, 2021

Thanks @pzygielo . I know now where the problem is. DelayedSnapshotJob runs periodical and I have not synchronized it at shutdown. Never noticed when running gradle, since it uses a daemon concept.

Will provide a fix probably with the next release.

0reactions
pzygielocommented, Oct 27, 2021

Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Could not write metadata for '/someproject'. - Eclipse
I recently encountered the following error on my laptop: Could not write metadata for '/someproject'. D:\Programming\Java\.metadata\.plugins\org ...
Read more >
'Periodic workspace save.' has encountered a pro‍blem.
has encountered a problem. Could not write metadata for '/External Files'. D:\java\fuentes\.metadata\.plugins\org.eclipse.core.resources\.projects\External ...
Read more >
Could not write metadata - Katalon Studio
Hi All Sometime I got issue : Could not write metadata Could not write metadata for '/.org.eclipse.jdt.core.external.folders'.
Read more >
PM42570: 'Periodic workspace save.' has encountered a ... - IBM
An error message appears during periodic workspace save: 'Periodic workspace save.' has encountered a problem. Could not write metadata for ...
Read more >
IDT BO 4.0: Error -Periodic Workspace Save has encountered ...
Hi All, I am gettting below error message everything I try to work on a shared project. "Could not write workspace metadata ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found