Bug 211438 - Endless ClassFormatError exceptions in log
Endless ClassFormatError exceptions in log
Status: NEW
Product: java
Classification: Unclassified
Component: Compiler
7.2
All All
: P4 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-19 09:52 UTC by Egor Ushakov
Modified: 2013-09-13 08:09 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2012-04-19 09:52:54 UTC
Product Version: NetBeans IDE Dev (Build 201204150400)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: SunOS version 5.11 running on x86; UTF-8; en_US (nb)

Exceptions like this fills the log:
INFO [com.sun.tools.javac.processing.JavacProcessingEnvironment]: Annotation processing error:
java.lang.ClassFormatError: org/openide/util/NbBundle$Messages
	at org.netbeans.modules.openide.util.NbBundleProcessor.getSupportedAnnotationTypes(NbBundleProcessor.java:83)
[catch] at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:538)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:633)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:726)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:103)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1057)
	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1122)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1140)
	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1036)
	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:372)
	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:313)
	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:581)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:449)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:164)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:605)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:224)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:717)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Comment 1 Egor Ushakov 2012-04-19 13:31:47 UTC
same on Linux:
INFO [com.sun.tools.javac.processing.JavacProcessingEnvironment]: Annotation processing error:
java.lang.ClassFormatError: org/netbeans/spi/debugger/ui/AttachType$ContextAware
        at java.lang.Class.getDeclaringClass(Native Method)
        at java.lang.Class.getEnclosingClass(Class.java:1085)
        at java.lang.Class.getCanonicalName(Class.java:1169)
        at org.netbeans.modules.debugger.ui.registry.DebuggerProcessor.getSupportedAnnotationTypes(DebuggerProcessor.java:86)
[catch] at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:538)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:633)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:726)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:103)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1057)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1122)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1140)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1036)
        at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:372)
        at org.netbeans.modules.java.source.indexing.SuperOnePassCompileWorker.compile(SuperOnePassCompileWorker.java:193)
        at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:221)
        at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:158)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:258)
        at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:156)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doIndex(RepositoryUpdater.java:2397)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.access$1500(RepositoryUpdater.java:2015)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:2304)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work$2.run(RepositoryUpdater.java:2302)
        at org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.refreshTransaction(TaskCache.java:541)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.index(RepositoryUpdater.java:2302)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.scanFiles(RepositoryUpdater.java:2793)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$FileListWork.getDone(RepositoryUpdater.java:3155)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:2887)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:5115)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4800(RepositoryUpdater.java:4808)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:5052)
        at org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:97)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:5048)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:5044)
        at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:168)
        at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
        at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:72)
        at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:5044)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1452)
        at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2032)
Comment 2 Svata Dedic 2013-09-13 08:09:10 UTC
This is most probably caused by loading annotation processors compiled for J2SE 7 by IDE running on J2SE 6. Unfortunately, the compiler loads user classes (from either classpath or annotation path), so the fault is unavoidable in such case.

Perhaps the error should be printed at most once per processor class.

From the code in JavacProcessingEnvironment it seems, that such condition will stop compilation (parsing), so the parser / IDE features will be effectively broken; if so, some warning should be printed to the user, or the offending processors should be disabled ?

Please evaluate.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo