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 71121

Summary: [50cat] Adding dependency to Ant causes compilation to fail with bizarre error message
Product: apisupport Reporter: misterm <misterm>
Component: HarnessAssignee: Jesse Glick <jglick>
Status: RESOLVED INVALID    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description misterm 2006-01-06 19:04:35 UTC
[ BUILD # : 20051218 ]
[ JDK VERSION : 1.4.2_xx ]

Steps to reproduce:

1. Add a dependency to Ant;
2. Add a call to ActionUtils.runTarget(FileObject, String[], Properties) in your source code;
3. Try to build the project

The following message will be displayed in Output:

error: compiler message file broken: key=compiler.err.file org\openide\execution\ExecutorTask.class not found arguments=null, null, null, null, null, null, null
1 error

C:\Program Files\netbeans-20051218\harness\common.xml:85: Compile failed; see the compiler error output for details.

BUILD FAILED (total time: 2 seconds)


After that, it is not possible to successfully building the project.
Comment 1 misterm 2006-01-06 19:05:47 UTC
Adding a dependency to Execution API, that includes 
org.openide.execution.ExecutorTask, solves the problem but I doubt most users 
will be able to figure out that.
Comment 2 Jesse Glick 2006-01-06 20:30:52 UTC
Under Mustang I just get (after adding a dep on org.openide.filesystems for the
first param)

Compiling 1 source file to /tmp/test71121/build/classes
/tmp/test71121/src/org/yourorghere/test71121/X.java:23: cannot access
org.openide.execution.ExecutorTask
class file for org.openide.execution.ExecutorTask not found
public class X {
1 error
/space/nb/curr/harness/common.xml:131: Compile failed; see the compiler error
output for details.

Which looks fine to me. Has nothing to do with the harness or API Support; it's
what the compiler tells you when you are missing some JARs in your classpath
which are implicitly needed by some Java code you wrote (even if you did not
explicitly mention them).

Apparently there is a compiler bug in 1.4 and 1.5 (missing message key). It does
not appear in 1.6. Feel free to file it on bugs.sun.com against JDK 1.5
(doubtful it would be fixed for 1.4.2_xx but for 5.0_uxx it is likely).