You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just bumped to 1.36.0, I have a save action to format automatically, getting this error:
A save participant caused problems. The save participant 'Code Clean Up' caused an exception: java.lang.NoClassDefFoundError: Could not initialize class com.google.googlejavaformat.java.javadoc.MarkdownPositions. See the error log for details.
Explicit invocation of the formatter (Shift + Ctrl + F) does nothing.
External runs via java -jar are fine.
Environment:
Eclipse IDE for Java Developers (includes Incubating components)
I can confirm this with google-java-format-eclipse-plugin 1.36.1.
Environment:
Eclipse 2026-06 / 4.40
Java 21.0.11
Linux GTK
google-java-format Eclipse plug-in 1.36.1
Formatting invoked programmatically through an Eclipse/JDT integration
The failure is:
java.lang.ClassNotFoundException:
org.commonmark.parser.Parser cannot be found by
google-java-format-eclipse-plugin_1.36.1
The relevant stack is:
at com.google.googlejavaformat.java.javadoc.MarkdownPositions.<clinit>
at com.google.googlejavaformat.java.javadoc.JavadocLexer.lex
at com.google.googlejavaformat.java.javadoc.JavadocFormatter.formatJavadoc
at com.google.googlejavaformat.java.GoogleJavaFormatter.formatInternal
This appears to be an OSGi packaging problem in the Eclipse plug-in, rather than a missing installation dependency.
The Eclipse installation already contains active org.commonmark and org.commonmark.ext-gfm-tables 0.28.0 bundles, and org.commonmark.parser.Parser is present in org.commonmark_0.28.0.jar. However, the formatter bundle cannot see arbitrary packages from those bundles without explicit OSGi wiring.
Consequently, the embedded google-java-format.jar references CommonMark, but its containing OSGi bundle has no classloader route to it. Merely installing the CommonMark bundles does not resolve that.
Possible fixes would be either:
Embed commonmark.jar and commonmark-ext-gfm-tables.jar in the Eclipse plug-in and add them to Bundle-ClassPath, or
Add the required Import-Package declarations and provision the matching CommonMark bundles.
Downgrading the Eclipse plug-in to 1.35.0 avoids the regression.
Activity
algonell commentedon Jul 31, 2026
Same issue with
1.36.1.bvo42 commentedon Aug 24, 2026
I can confirm the same issue with google-java-format 1.36.x in Eclipse 4.40.0 on Java 21.0.11.
Formatting fails with:
NoClassDefFoundError: org/commonmark/parser/ParserDowngrading the Eclipse plugin to 1.35.0 fixes the problem for me.
ChristianHerget commentedon Aug 27, 2026
I can confirm this with
google-java-format-eclipse-plugin1.36.1.Environment:
The failure is:
The relevant stack is:
This appears to be an OSGi packaging problem in the Eclipse plug-in, rather than a missing installation dependency.
The Eclipse installation already contains active org.commonmark and org.commonmark.ext-gfm-tables 0.28.0 bundles, and org.commonmark.parser.Parser is present in org.commonmark_0.28.0.jar. However, the formatter bundle cannot see arbitrary packages from those bundles without explicit OSGi wiring.
In 1.36.1:
google-java-format declares commonmark and commonmark-ext-gfm-tables as runtime dependencies: https://github.com/google/google-java-format/blob/v1.36.1/core/pom.xml
The Eclipse plug-in build copies only guava and google-java-format: https://github.com/google/google-java-format/blob/v1.36.1/eclipse_plugin/pom.xml
The Eclipse bundle manifest lists only those two embedded libraries on Bundle-ClassPath and has no Import-Package or Require-Bundle declaration for CommonMark: https://github.com/google/google-java-format/blob/v1.36.1/eclipse_plugin/META-INF/MANIFEST.MF
Consequently, the embedded google-java-format.jar references CommonMark, but its containing OSGi bundle has no classloader route to it. Merely installing the CommonMark bundles does not resolve that.
Possible fixes would be either:
Embed commonmark.jar and commonmark-ext-gfm-tables.jar in the Eclipse plug-in and add them to Bundle-ClassPath, or
Add the required Import-Package declarations and provision the matching CommonMark bundles.
Downgrading the Eclipse plug-in to 1.35.0 avoids the regression.
lalmeras commentedon Sep 23, 2026
I confirm the issue with 1.36.1 ; 1.35 works.
I think @ChristianHerget correctly identifies the root cause (missing common mark dependency in eclipse packaging).
eclipse 2026-09b: google-java-format issue
Bundle commonmark in the Eclipse plugin.
Bundle commonmark in the Eclipse plugin.
Bundle commonmark in the Eclipse plugin.