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.

Bug 226165 - Can't initialize javac processor due to (most likely) a class loader problem: java.lang.NoClassDefFoundError: Could not initialize class lombok.javac.handlers.HandleGetter
Summary: Can't initialize javac processor due to (most likely) a class loader problem:...
Status: VERIFIED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.4
Hardware: PC Other
: P3 normal (vote)
Assignee: Dusan Balek
URL: http://code.google.com/p/projectlombo...
Keywords:
: 233264 235852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-15 10:23 UTC by akobberup
Modified: 2013-10-11 13:27 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot of the error.. (148.55 KB, image/png)
2013-02-15 10:23 UTC, akobberup
Details

Note You need to log in before you can comment on or make changes to this bug.
Description akobberup 2013-02-15 10:23:08 UTC
Created attachment 131424 [details]
screenshot of the error..

I have been using lombok (an annotation processor) for some time now, but yesterday suddenly it stopped working.

I get the following message:

Can't initialize javac processor due to (most likely) a class loader problem: java.lang.NoClassDefFoundError: Could not initialize class lombok.javac.handlers.HandleGetter
  	at java.lang.Class.forName0(Native Method)
  	at java.lang.Class.forName(Class.java:266)
  	at lombok.core.SpiLoadUtil$1$1.next(SpiLoadUtil.java:111)
  	at lombok.javac.HandlerLibrary.loadAnnotationHandlers(HandlerLibrary.java:167)
  	at lombok.javac.HandlerLibrary.load(HandlerLibrary.java:152)
  	at lombok.javac.JavacTransformer.<init>(JavacTransformer.java:43)
  	at lombok.javac.apt.Processor.init(Processor.java:90)
  	at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:89)
  	at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:143)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:513)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:613)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:706)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2000(JavacProcessingEnvironment.java:95)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1033)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1096)
  	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1233)
  	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1120)
  	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:370)
  	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:305)
  	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:650)
  	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:518)
  	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:171)
  	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
  	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:247)
  	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:720)
  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  	at java.lang.Thread.run(Thread.java:722)


I do not know if this is related, but yesteday i for the first time since starting to use lombok, opened a text/html file in the editor. I suspect that this may have something to do with this, as it seems that an error like this one has been reported on the lombok site:

http://code.google.com/p/projectlombok/issues/detail?id=418


I reproduced the issue today in a new projectgroup, with a new java-maven project containing just one file that uses a lombok annotation, and it still fails.
Comment 1 Jan Lahoda 2013-02-15 12:11:36 UTC
I have filled:
http://code.google.com/p/projectlombok/issues/detail?id=451

The problem is that NetBeans daily builds are now internally using javac from JDK8 for parsing, and lombok does not yet support it. I am afraid this cannot be solved on the NetBeans side.

(For the record, I think 418 is not related, that one might really be a classloading problem.)
Comment 2 Jan Lahoda 2013-02-15 12:13:58 UTC
I forgot: I would suggest using NetBeans 7.3 until this is resolved.
Comment 3 akobberup 2013-02-15 12:27:25 UTC
I see. Thanks for the explanation.

I have voted for the issue on lombok, and hope that they will soon update it.

I have been a glad user of dev builds for the past year now, but i guess that i will have to stop that for now and settle for a stable build.

Do you know in which dev build jdk 8 were introduced for javac internally? I have some installers lying in my download folder, so i can go back to the last one that were jdk7..

best
Anders
Comment 4 Jan Lahoda 2013-02-15 12:40:34 UTC
The first with JDK8 javac is IIRC 201302130937, so the last one without it should be 201302122300.
Comment 5 akobberup 2013-02-15 12:48:05 UTC
Thanks. Actually i were using 201302112300 yesterday - but i updated my plugins, and it must have thereafter that it went fubar :)

I will revert to 201302112300 without updating my plugins for now.
Comment 6 Jan Lahoda 2013-07-29 10:46:42 UTC
*** Bug 233264 has been marked as a duplicate of this bug. ***
Comment 7 Jiri Prox 2013-09-19 10:20:28 UTC
*** Bug 235852 has been marked as a duplicate of this bug. ***
Comment 8 PavelCibulka 2013-10-11 13:12:03 UTC
Project Lombok 1.12.2 has been released. This version should be working with NetBeans 7.4.

Maven:
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.12.2</version>
            <scope>provided</scope>
        </dependency>
Comment 9 rjdkolb 2013-10-11 13:15:38 UTC
Hi Pavel

Checked this morning with 1.12.2.
Have not checked everything , but it seems to be working well on Netbeans 7.4RC2
thanks
Comment 10 Michel Graciano 2013-10-11 13:27:28 UTC
We still have a regression when using this new version. Take a look at issue #236885.