[ 
https://issues.apache.org/jira/browse/NETBEANS-3876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tomáš Procházka resolved NETBEANS-3876.
---------------------------------------
    Resolution: Fixed

> Using Groovy in projects is causing java.lang.NoClassDefFoundError
> ------------------------------------------------------------------
>
>                 Key: NETBEANS-3876
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3876
>             Project: NetBeans
>          Issue Type: Bug
>          Components: groovy - Editor
>    Affects Versions: 11.3
>         Environment: Windows 10
> openjdk version "14" 2020-03-17
> OpenJDK Runtime Environment AdoptOpenJDK (build 14+34-202002111235)
> OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+34-202002111235, mixed mode, 
> sharing)
>            Reporter: Benjamin Graf
>            Assignee: Sven Reimers
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 12.0
>
>
> Following Exception is throws in several use cases for projects using groovy 
> files. I can recognize it for following use cases:
> * internal code parsing of editor
> * while "Clean and Build" ant project
> {noformat}
> java.lang.NoClassDefFoundError: Could not initialize class 
> org.codehaus.groovy.vmplugin.v7.Java7
>       at 
> org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
>       at org.codehaus.groovy.ast.ClassHelper.makeCached(ClassHelper.java:141)
>       at org.codehaus.groovy.ast.ClassHelper.<clinit>(ClassHelper.java:77)
>       at org.codehaus.groovy.classgen.Verifier.<clinit>(Verifier.java:133)
>       at 
> org.codehaus.groovy.control.CompilationUnit.<init>(CompilationUnit.java:170)
>       at 
> org.netbeans.modules.groovy.editor.compiler.CompilationUnit.<init>(CompilationUnit.java:64)
>       at 
> org.netbeans.modules.groovy.editor.api.parser.GroovyParser.parseBuffer(GroovyParser.java:441)
>       at 
> org.netbeans.modules.groovy.editor.api.parser.GroovyParser.parse(GroovyParser.java:137)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callParse(TaskProcessor.java:598)
>       at 
> org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:228)
>       at 
> org.netbeans.modules.parsing.api.ResultIterator.getParserResult(ResultIterator.java:115)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:3171)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>       at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
>       at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
>       at 
> org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
>       at 
> org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
>       at 
> org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
>       at 
> org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
>       at 
> org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
>       at 
> org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.indexEmbedding(RepositoryUpdater.java:3143)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2862)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$800(RepositoryUpdater.java:2154)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2636)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$1.run(RepositoryUpdater.java:2634)
>       at 
> org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:540)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2634)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork$4.call(RepositoryUpdater.java:5714)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork$4.call(RepositoryUpdater.java:5622)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$4.run(RepositoryUpdater.java:2127)
>       at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2123)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runInContext(RepositoryUpdater.java:2104)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.access$1500(RepositoryUpdater.java:136)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSource(RepositoryUpdater.java:5749)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$AbstractRootsWork.scanSources(RepositoryUpdater.java:5419)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:5038)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:5821)
> [catch] at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
>       at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>       at 
> org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
>       at 
> org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
>       at 
> org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
>       at 
> org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
>       at 
> org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
>       at 
> org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091)
>       at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>       at 
> org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>       at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>       at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>       at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
> {noformat}
> {noformat}
> The option executable cannot be set on the contained <javac> element. The 
> option will be ignored.
> The option tempdir cannot be set on the contained <javac> element. The option 
> will be ignored.
> The option fork cannot be set on the contained <javac> element. The option 
> will be ignored.
> java.lang.NoClassDefFoundError: Could not initialize class 
> org.codehaus.groovy.vmplugin.v7.Java7
>       at 
> org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
>       at 
> org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
>       at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
>       at 
> org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
>       at 
> org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
>       at 
> org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:210)
>       at 
> org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:108)
>       at 
> org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:86)
>       at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
>       at 
> org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
>       at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.join(DefaultGroovyMethods.java:6707)
>       at org.codehaus.groovy.ant.Groovyc.makeCommandLine(Groovyc.java:1256)
>       at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1352)
>       at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:884)
>       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>       at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>       at org.apache.tools.ant.Task.perform(Task.java:350)
>       at java.base/java.util.Vector.forEach(Vector.java:1358)
>       at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
>       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>       at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>       at org.apache.tools.ant.Task.perform(Task.java:350)
>       at 
> org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
>       at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
>       at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:564)
>       at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
>       at org.apache.tools.ant.Task.perform(Task.java:350)
>       at org.apache.tools.ant.Target.execute(Target.java:449)
>       at org.apache.tools.ant.Target.performTasks(Target.java:470)
>       at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
>       at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
>       at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
>       at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
>       at 
> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:261)
>       at 
> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:574)
>       at 
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:128)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to