java-design-patterns icon indicating copy to clipboard operation
java-design-patterns copied to clipboard

Checkstyle->Create Formatter-Profile in Eclipse fails with error.

Open oconnelc opened this issue 4 years ago • 3 comments

With the following versions:

  • Eclipse: Version: 2019-09 R (4.13.0)

  • Eclipse Checkstyle Project: Eclipse Checkstyle 8.18.0.201903231603

When following the instructions at: https://github.com/iluwatar/java-design-patterns/wiki/12.-IDE-instructions on the step: "Right click java-design-patterns project in Project Explorer and choose Checkstyle - Create formatter profile" an error popup is shown that says:

"transformCheckstyle has encountered a problem. An internal error occurred during: transformCheckstyle"

Look at the Eclipse logs yielded the following stack trace:

!MESSAGE An internal error occurred during: "transformCheckstyle".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/preferences/PreferencesAccess
	at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.writeCleanupSettings(FormatterConfigWriter.java:95)
	at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.writeSettings(FormatterConfigWriter.java:89)
	at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.<init>(FormatterConfigWriter.java:81)
	at net.sf.eclipsecs.core.transformer.CheckstyleTransformer.transformRules(CheckstyleTransformer.java:124)
	at net.sf.eclipsecs.core.jobs.TransformCheckstyleRulesJob.runInWorkspace(TransformCheckstyleRulesJob.java:117)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

While this problem seems to be caused by: https://github.com/checkstyle/eclipse-cs/issues/107 and is not related to this project, we may want to track the issue and update the documentation to indicate that this is a known issue.

oconnelc avatar Oct 14 '19 17:10 oconnelc