[Solved] Message "Error creating Groovy: java.lang.ClassNotFoundException" when using JDT' [message #1817506] |
Mon, 25 November 2019 08:00 |
Chkiron Chronos Messages: 8 Registered: October 2019 |
Junior Member |
|
|
Hi all,
I have written a code to format Java sources using JDT's libs.
When I run it, it works as expected, but displays this stacktrace:
Error creating Groovy language support:
java.lang.ClassNotFoundException: org.codehaus.jdt.groovy.integration.internal.GroovyLanguageSupport
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.tryInstantiate(LanguageSupportFactory.java:143)
at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.getLanguageSupport(LanguageSupportFactory.java:126)
at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.getParser(LanguageSupportFactory.java:57)
at org.eclipse.jdt.core.dom.CompilationUnitResolver.parse(CompilationUnitResolver.java:521)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1209)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:812)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.parseSourceCode(DefaultCodeFormatter.java:322)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.parseSourceCode(DefaultCodeFormatter.java:297)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.prepareFormattedCode(DefaultCodeFormatter.java:190)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:159)
at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:142)
... (omitting custom code trace)
This is the line that triggers the exception:
TextEdit textEdit = codeFormatter.format(
CodeFormatter.K_COMPILATION_UNIT | CodeFormatter.F_INCLUDE_COMMENTS,
sourceCodeToFormat,
FROM_THE_BEGINNING,
sourceCodeToFormat.length(),
ZERO_INITIAL_INDENTATION,
LINE_SEPARATOR);
These are the JDT libs I am using:
- org.eclipse.core.contenttype_3.7.400.v20190624-1144.jar
- org.eclipse.core.jobs_3.10.500.v20190620-1426.jar
- org.eclipse.core.resources_3.13.500.v20190819-0800.jar
- org.eclipse.core.runtime_3.16.0.v20190823-1314.jar
- org.eclipse.equinox.common_3.10.500.v20190815-1535.jar
- org.eclipse.equinox.preferences_3.7.500.v20190815-1535.jar
- org.eclipse.jdt.core_3.19.0.v201909291620-e1909-RELEASE.jar
- org.eclipse.osgi_3.15.0.v20190830-1434.jar
- org.eclipse.text_3.9.0.v20190826-1019.jar
I suspect one of libs is checking for the presence of Groovy and, not find a jar for it, and, not finding any, printing the stack trace and moving forward.
Would someone know which lib I should add to solve this runtime dependency? Or if there is anyway to turn off this Groovy support check?
Thanks!
[Updated on: Mon, 25 November 2019 15:19] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02880 seconds