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.
Product Version: NetBeans IDE 6.7.1 (Build 090807) Java: 1.6.0_0; OpenJDK Client VM 14.0-b16 System: Linux version 2.6.31-3-generic running on i386; UTF-8; en_US (nb) 0. Install NB from Ubuntu 9.10 debs 1. Create a new Java Application -> main class with main method is created by default 2. Right-click the main class, invoke Tools>Create JUnit Test 3. Leave version 4 checked, click Select, click OK 4. Click anywhere in the generated test source -> Exception shows up: SEVERE [org.openide.util.Exceptions] com.sun.tools.javac.code.Symbol$CompletionFailure: class file for org.hamcrest.Matcher not found (... that's everything...)
Yes, this happened to me as well while testing JUnit with the Ubuntu 9.10 I reported this using the Exceptions Reporter - there is already an issue 146026 with the same stacktrace In my case, the JUnit test was created successfully and was working correctly. However, the red Error icon was still present and I could not get rid of it. As I said - the test was working, but the everlasting Error was really annoying.
Could you please attach here the generated test class? org.hamcrest.Matcher - belongs to http://code.google.com/p/hamcrest/ project. I'm not sure why Netbeans generated test class needs it. But maybe there is something broken in the junit or hamcrest packages installed in your Ubuntu. Do the tests compile and run when you use just commandline and ant?
Thank you for the report. The problem is that Ubuntu Karmic contains junit4 version 4.6 whereas NetBeans requires 4.5. I'll see if I can work it out.
There is libhamcrest-java package in karmic. It looks like they removed hamcrest from junit 4.6 in karmic so it is necessary to add dependency on libhamcrest-java into platform IMO. NB uses junit 4.5 in nromal build.
fixed
Build installed Aug 18, 2009 from newly created packages.