Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exception NoClassDefFoundError: com/sun/tools/javac/processing/JavacProcessingEnvironment with m2eclipse when build path changes #250
What steps will reproduce the problem?
See the attached video "lombok-noclassdef.mp4". It shows first the sequence when running Eclipse without Lombok, then with Lombok (0.10.0-BETA).
What is the expected output? What do you see instead?
Should compile without problems. Instead, an
error: Exception thrown while constructing Processor object: java.lang.NoClassDefFoundError: com/sun/tools/javac/processing/JavacProcessingEnvironment
What version of the product are you using? On what operating system?
OS: Vista SP2 x64
Please provide any additional information below.
See eclipse-config.txt for my full Eclipse configuration, and log-error.txt for the message in the workspace log.
First of all, you've just been awarded the "Gold Trophy 2011" in the category "Most Complete Bug Reports". We've been able to reproduce the reported behavior.
I do have a couple of questions and remarks though:
And it's only February! So I have almost a whole year to beat my own record ;-) On to your questions:
Agreed. As you suspected, this was just the first reliable "trigger" I could find. I normally see this after merging updates from a repo and then starting Eclipse. Obviously, this triggers a bunch of builds, and all I can assume is that the Maven plugin also checks or regenerates the build paths as part of this.
Haven't tried with other build paths. Again, this is not the normal scenario in which I see this. I wish I could find a way to reliably reproduce it in a more realistic scenario.
Indeed. In fact, it even occurs in workspaces in which no projects use Lombok. It occurs as soon as the Lombok JAR is installed.
Interesting. I wish I could say that makes it a very unusual test case and the problem can be ignored, but I think I'm not the only one using this folder ;-)
Good news, Everyone!!!
I think Roel and I nailed this one done. The commit is pathetically small: 2bacfa6 but nevertheless, it took quite a bit of research before we found this.
Can you check if we fixed it? You can grab an edge release from here:
Hartstikke bedankt! From the commit it certainly looks like a good one: adding a URL to a specific Plexus classloader and making sure you only do it once...I'm sure finding that was fun ;-)
Anyway, I can certainly confirm that the test case for this issue succeeds. I've been running with Lombok since you posted the fix and haven't seen the error in any other scenario yet either. So lookin' good so far.