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 199560

Summary: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for javax.annotation.meta.When not found
Product: apisupport Reporter: _ gtzabari <gtzabari>
Component: MavenAssignee: Jesse Glick <jglick>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:
Attachments: Testcase

Description _ gtzabari 2011-06-20 18:02:34 UTC
Issue 152562 is back in Netbeans 7.0 and JDK 1.6.0_25.

If you compile the attached Maven project you will get the following compiler crash:

An exception has occurred in the compiler (1.6.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for javax.annotation.meta.When not found

1 error
Comment 1 Jesse Glick 2011-06-27 19:13:21 UTC
There is no attachment. Anyway bug #152562 applies only to Ant-based NBM projects, not Maven projects using nbm packaging.
Comment 2 _ gtzabari 2011-06-27 20:26:24 UTC
Created attachment 109139 [details]
Testcase
Comment 3 _ gtzabari 2011-06-27 20:27:02 UTC
Jesse,

Take a look at the testcase. You'll find you get the same compiler crash, now under Maven.
Comment 4 Jesse Glick 2011-06-27 23:52:27 UTC
The test case is not an NBM project! No NB code is involved. The bug is in com/google/code/findbugs/annotations/1.3.9/annotations-1.3.9.pom which fails to declare a dependency on com.google.code.findbugs:jsr305:1.3.9. You can add this implied transitive dep to your project manually to resolve the issue. But please file a bug at http://findbugs.googlecode.com/ so this is fixed upstream.

BTW the project builds fine using JDK 7, where 6550655 is fixed. But that is in a sense a workaround - javac will still be running with an incomplete classpath and FindBugs may not work correctly, javac will simply not crash.
Comment 5 _ gtzabari 2011-06-28 00:10:50 UTC
Jesse,

Sorry for the confusion. I was attempting to report the fact that an ill-formed POM file (I was aware it was ill formed) can cause a compiler crash. Seeing how this is fixed in JDK7 (which is due out soon) I guess we can consider this matter closed.

Thanks for the clarification.
Comment 6 Jesse Glick 2011-06-28 16:55:46 UTC
(In reply to comment #4)
> please file a bug at http://findbugs.googlecode.com/ so this is fixed upstream.

I guess you did not do this, so: http://code.google.com/p/findbugs/issues/detail?id=39
Comment 7 _ gtzabari 2011-06-28 17:58:12 UTC
Thanks again Jesse. I've starred the issue.
Comment 8 _ gtzabari 2011-06-28 18:11:13 UTC
At second glance: http://code.google.com/p/findbugs/issues/detail?id=18

It looks like they only use SourceForge's issue tracker (confusing!). What's more, I haven't seen any serious activity from them in 2 years.