ctabin opened a new issue, #7328:
URL: https://github.com/apache/netbeans/issues/7328

   ### Apache NetBeans version
   
   Apache NetBeans 21
   
   ### What happened
   
   Hi,
   
   Since recently, when I open my project (multi-module project Java with maven 
3.9.6), Netbeans shows the following Exception
   ```
   Annotation: An error occurred during parsing of '/home/myhome/File.java'. 
Please report a bug against java/source and attach dump file '...'.
   An error occurred during parsing of '/home/myhome/File.java'. Please report 
a bug against java/source and attach dump file '...'.
   Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: 
java.lang.NoClassDefFoundError: com/google/auto/service/AutoService
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:738)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:818)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:912)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2300(JavacProcessingEnvironment.java:113)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1255)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1370)
        at 
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1272)
        at 
org.netbeans.lib.nbjavac.services.NBJavaCompiler.processAnnotations(NBJavaCompiler.java:64)
        at 
com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1171)
        at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:348)
        at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:282)
        at 
org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:742)
        at 
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:536)
        at 
org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:140)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
        at 
org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:241)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:288)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
        at 
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
        at 
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
        at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
        at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)
   Caused by: java.lang.NoClassDefFoundError: 
com/google/auto/service/AutoService
        at 
com.google.auto.service.processor.AutoServiceProcessor.getSupportedAnnotationTypes(AutoServiceProcessor.java:89)
        at 
com.google.auto.service.processor.AutoServiceProcessor.getSupportedAnnotationTypes(AutoServiceProcessor.java:69)
        at 
org.netbeans.modules.java.source.indexing.APTUtils$ErrorToleratingProcessor.getSupportedAnnotationTypes(APTUtils.java:980)
        at 
com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:700)
        ... 25 more
   Caused by: java.lang.ClassNotFoundException: 
com.google.auto.service.AutoService
        ... 29 more
   ```
   
   This makes Netbeans stop working:
   - no more highlight of variable
   - no more code navigation
   - no more intellisence
   
   Note that my java file is a simple POJOs with nothing special in there. I 
also tried other classes: the same problem arise.
   
   Here is what I tried:
   - closing the whole project and reopen it
   - change project group and come back
   - remove the dir `~/.netbeans/21` to clear up any cache
   - tried to add the google auto-service to my `pom.xml`
   - reloading the pom in my project
   
   Anyways, the error still arise and prevents me to work smoothly.
   
   ### Language / Project Type / NetBeans Component
   
   Java Maven Project
   
   ### How to reproduce
   
   I don't know how to reproduce it. All was working smoothly till now and 
nothing special changed.
   The only thing I can guess is that I just pulled out the project (and there 
was multiple library updates in the main pom.xml) and open it in NetBeans 
priori to make a `mvn clean install`.
   But, even after closing it, full rebuild of the project, still the same 
error occurs...
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 20
   
   ### Operating System
   
   Linux Debian 12
   
   ### JDK
   
   OpenJDK 21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to