This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE 8.1 (Build 201510222201) Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02 Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15 System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb) User directory: C:\Users\quaglan\AppData\Roaming\NetBeans\8.1 Cache directory: C:\Users\quaglan\AppData\Local\NetBeans\Cache\8.1 I have a Groovy/Maven project. When I modify a groovy source file and then try run a JUnit test I get a NoClassDefFound error: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.096 sec <<< FAILURE! - in eu.europa.ec.inspire.geoportal.client.pullreport.PullReportClientTest testMain(eu.europa.ec.inspire.geoportal.client.pullreport.PullReportClientTest) Time elapsed: 0.02 sec <<< ERROR! java.lang.NoClassDefFoundError: eu/europa/ec/inspire/geoportal/client/pullreport/PullReportClient If I rebuild the project, the test runs fine.
(In reply to aquaglia from comment #0) Hello, if you run the tests directly from maven (cli) does it also fail until the project is rebuilt? Could you give me some hints as to how I could recreate a similar setup to yours? If you used a maven archetype, or the relevant plugins to create a working pom. Thank you.
I have just sent via email the zipped project. How do I test "directly from maven (cli)"?
It is a very annoying behaviour.
Hi, can you check if disabling the compile on save feature the problem disappears? To disable compile on save go to File > Project Properties > Build > Compile and remove the "Compile On Save" option.
Yes, disabling the compile on save feature the problem disappears.
*** Bug 236438 has been marked as a duplicate of this bug. ***
*** Bug 246191 has been marked as a duplicate of this bug. ***