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

Laszlo Kishalmi resolved NETBEANS-2012.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 11.0

The corresponding PR has been merged.

> Code coverage does not work for Gradle projects
> -----------------------------------------------
>
>                 Key: NETBEANS-2012
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2012
>             Project: NetBeans
>          Issue Type: Bug
>          Components: projects - Gradle
>            Reporter: mkhramov
>            Assignee: Laszlo Kishalmi
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 11.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> For my NB  dev build  I cannot run Unit tests and/or coverage task for gradle 
> project
> Steps to reproduce:
> *Product Version:* Apache NetBeans IDE Dev (Build 20190125-dc92644eeb90)
> *Java:* 9.0.1; Java HotSpot(TM) 64-Bit Server VM 9.0.1+11
> *Runtime:* Java(TM) SE Runtime Environment 9.0.1+11
> *System:* Windows 10 version 10.0 running on amd64; Cp1251; en_US (nb)
> Create and build new gradle Java Application project
> Invoke Collect And Display code coverage action.
> Exception is thrown:
> java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
>     at 
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
>     at 
> java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
>     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
>     at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:197)
> Caused: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor 
> starting from ModuleCL@6ba0b2d2[org.netbeans.modules.gradle.java] with 
> possible defining loaders [org.netbeans.MainImpl$BootClassLoader@71318ec4, 
> ModuleCL@69791cc2[com.github.alexfalappa.nb.springboot.plugin], 
> ModuleCL@71ebd684[org.netbeans.libs.findbugs]] and declared parents 
> [ModuleCL@18133ed[org.netbeans.modules.extexecution], 
> ModuleCL@6ded7654[org.openide.awt], ModuleCL@4fda8710[org.openide.dialogs], 
> ModuleCL@519b734b[org.netbeans.modules.queries], 
> ModuleCL@4eb3e144[org.netbeans.libs.javacapi], 
> ModuleCL@4379b85c[org.netbeans.modules.java.platform.ui], 
> ModuleCL@59f0154[org.netbeans.api.java], 
> ModuleCL@7368d741[org.netbeans.modules.java.project], 
> ModuleCL@5ccbd2dc[org.netbeans.api.templates], 
> org.netbeans.JarClassLoader@4b38541e, ...19 more]
>     at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:199)
>     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
> Caused: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
>     at java.base/java.lang.ClassLoader.defineClass1(Native Method)
>     at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
>     at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:286)
>     at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:234)
> Caused: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor while 
> loading org.jacoco.core.internal.flow.ClassProbesVisitor; see 
> http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound
>     at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:238)
>     at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:192)
>     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
>     at 
> org.netbeans.modules.gradle.java.coverage.GradleCoverageProvider.readJacocoExec(GradleCoverageProvider.java:201)
>     at 
> org.netbeans.modules.gradle.java.coverage.GradleCoverageProvider.setEnabled(GradleCoverageProvider.java:128)
>     at 
> org.netbeans.modules.gsf.codecoverage.CoverageManagerImpl.setEnabled(CoverageManagerImpl.java:105)
>     at 
> org.netbeans.modules.gsf.codecoverage.CoverageAction$CoverageItemHandler.actionPerformed(CoverageAction.java:250)
> ....
>  
> Try to run tests for project. Another  exception is thrown:
> java.lang.NullPointerException
>     at 
> org.netbeans.modules.gradle.api.execute.GradleCommandLine.lambda$combine$0(GradleCommandLine.java:846)
>     at java.base/java.lang.Iterable.forEach(Iterable.java:75)
>     at 
> org.netbeans.modules.gradle.api.execute.GradleCommandLine.combine(GradleCommandLine.java:835)
>     at 
> org.netbeans.modules.gradle.api.execute.RunUtils.createRunConfig(RunUtils.java:123)
>     at 
> org.netbeans.modules.gradle.ActionProviderImpl.invokeProjectAction(ActionProviderImpl.java:201)
>     at 
> org.netbeans.modules.gradle.ActionProviderImpl.invokeAction(ActionProviderImpl.java:128)
>     at 
> org.netbeans.modules.project.ui.actions.ProjectAction$2.run(ProjectAction.java:162)
> ...
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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