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 186831 - [69cat] Can't compile - weird invalid flag
Summary: [69cat] Can't compile - weird invalid flag
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 17:52 UTC by ulfzibis
Modified: 2010-07-08 11:02 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen shot (186.47 KB, image/png)
2010-05-27 18:04 UTC, ulfzibis
Details
local project (691.07 KB, application/octet-stream)
2010-05-28 13:51 UTC, ulfzibis
Details
Verbose Ant log (87.12 KB, application/octet-stream)
2010-06-02 19:53 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2010-05-27 17:52:26 UTC
[ BUILD # : 201005192201 ]
[ JDK VERSION : 1.6.20 ]

See attachment.
Use configuration "gen_sherman2_6" from:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-en
hanced/branches/JDK-7/j_l_Character_names/
Comment 1 ulfzibis 2010-05-27 18:04:27 UTC
Created attachment 99559 [details]
Screen shot
Comment 2 Jan Lahoda 2010-05-27 20:44:26 UTC
What revision should be used to reproduce the problem? I have revision 1081, and I was not able to reproduce the problem (there were some compilation error though). Please also double-check what options are passed to the compiler though extra compiler args/javac.compilerargs - incorrect values in this property could lead to problems like this.
Comment 3 ulfzibis 2010-05-27 21:25:59 UTC
(In reply to comment #2)
> What revision should be used to reproduce the problem? I have revision 1081,
This is correct!

> and I was not able to reproduce the problem (there were some compilation error
> though).
I don't see compilation errors in that revision. Can you provide the messages?
If I run the project with CoS enabled, I can successfully run it e.g. using configuration "gen_sherman2_6", but "Build" fails with the quoted message.
If I set source version to 1.6, same error occurs, (but there are little errors in other classes).

> Please also double-check what options are passed to the compiler
> though extra compiler args/javac.compilerargs - incorrect values in this
> property could lead to problems like this.
I'm not sure, if I understand right here. compiler args can be found in:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_names/nbproject/project.properties?rev=1081&view=log
and:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_names/nbproject/configs/*
Comment 4 ulfzibis 2010-05-27 21:32:36 UTC
My IDE runs on 1.6.18.
For the JDK 7 part I'm using b84.
Comment 5 Jan Lahoda 2010-05-28 11:56:17 UTC
Are you sure you do not have any significant local changes? Could you please double check that? Could you please try with clean checkout? Thanks.
Comment 6 ulfzibis 2010-05-28 13:51:48 UTC
Created attachment 99614 [details]
local project

> significant local changes?
Comment 7 ulfzibis 2010-05-28 13:54:25 UTC
Have you checked on Windows?
May be some OS/file system dependent naming issue.
Comment 8 Dusan Balek 2010-05-31 09:30:12 UTC
Could you please re-run your compilation task with increased ant verbosity level (click on the yellow '>>' icon on the left side of the output window and set the verbosity level to 'verbose') and attach the real arguments passed to the compiler? Thanks.
Comment 9 ulfzibis 2010-06-02 19:53:07 UTC
Created attachment 99772 [details]
Verbose Ant log
Comment 10 Jan Lahoda 2010-06-04 12:31:12 UTC
Really seems not to be working for empty processorpath. Related bugs:
https://issues.apache.org/bugzilla/show_bug.cgi?id=24280
http://bugs.sun.com/view_bug.do?bug_id=6468220

Workarounds:
-disable annotation processing (for empty processorpath, the annotation processing is probably not very useful anyway)
-or add something (reasonable) to the processorpath

Will push fix soon. I will also fix other project types I have found that use similar approach as does J2SE project, namely Web project, EjbJar project and AppClient project. David, Petr please double-check the fix in these projects, thanks.

Adding Marian and Peter on CC to decide whether or not this is a 6.9 stopper.
Comment 11 Jan Lahoda 2010-06-04 12:34:27 UTC
I have just realized that disabling the APs will not work. Sorry for confusion.
Comment 13 ulfzibis 2010-06-04 13:11:43 UTC
(In reply to comment #10)
> Workarounds:
> -disable annotation processing (for empty processorpath, the annotation
> processing is probably not very useful anyway)
Would that mean, that as consequence JUnit 4.x tests using annotations would no more work?
So please consider
  Bug 46298 - Allow to specify JVM parameters for running JUnit tests
for now or 6.9.1.


> -or add something (reasonable) to the processorpath
What could be reasonable ?

> Adding Marian and Peter on CC to decide whether or not this is a 6.9 stopper.

Happy to see your ad hoc effort and your potential fix. :-)
+1 to have it in 6.9.
Comment 14 Jan Lahoda 2010-06-04 13:34:59 UTC
(In reply to comment #13)
> (In reply to comment #10)
> > Workarounds:
> > -disable annotation processing (for empty processorpath, the annotation
> > processing is probably not very useful anyway)
> Would that mean, that as consequence JUnit 4.x tests using annotations would no
> more work?

As I noted, I made a mistake when I though this could help - it would not.

> So please consider
>   Bug 46298 - Allow to specify JVM parameters for running JUnit tests
> for now or 6.9.1.

The problem described here is related to compile time, not to runtime.

> 
> 
> > -or add something (reasonable) to the processorpath
> What could be reasonable ?

Empty jar or directory should work (this is the essence of the fix). But anything that exists and will not change both compile and runtime semantics should be enough. There may be problem with non-existing entries if -Xlint:path is used, so I would not recommend to use them.

> 
> > Adding Marian and Peter on CC to decide whether or not this is a 6.9 stopper.
> 
> Happy to see your ad hoc effort and your potential fix. :-)
> +1 to have it in 6.9.
Comment 15 ulfzibis 2010-06-04 13:46:41 UTC
(In reply to comment #14)
> (In reply to comment #13)
> As I noted, I made a mistake when I though this could help - it would not.
Thanks.

> > So please consider
> >   Bug 46298 - Allow to specify JVM parameters for running JUnit tests
> > for now or 6.9.1.
> 
> The problem described here is related to compile time, not to runtime.
Hm, just for understanding, but would JUnit 4.x tests compile correct, if AP is disabled?

> > > -or add something (reasonable) to the processorpath
> > What could be reasonable ?
> 
> Empty jar or directory should work (this is the essence of the fix). But
> anything that exists and will not change both compile and runtime semantics
> should be enough. There may be problem with non-existing entries if -Xlint:path
> is used, so I would not recommend to use them.
Thanks.
Comment 16 Quality Engineering 2010-06-05 07:48:36 UTC
Integrated into 'main-golden', will be available in build *201006050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a5021627ce7a
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #186831: empty cmd. line arguments are completelly skipped on windows, and so need to be prevented.
Comment 17 David Konecny 2010-06-06 19:46:56 UTC
Thanks Honza. Sergey, could you have a look at the fix please? It looks OK to me but I know very little about processorpath command line param. Thx.
Comment 18 Sergey Petrov 2010-06-07 08:36:32 UTC
The issue was reviewed by Tomas. I just tried to generate metamodel in web project, works both way with autoresolve to ap and with ap specified in ap's list. All seems ok.
Comment 19 Jan Lahoda 2010-06-08 12:48:24 UTC
Peter and/or Martin, could you please verify/review the patch? Thanks.
Comment 20 Peter Pis 2010-06-08 13:37:47 UTC
Verified.

Product Version: NetBeans IDE Dev (Build 201006080001)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows 7 version 6.1 running on x86; Cp1252; en_US (nb)
Comment 21 Jan Lahoda 2010-06-08 16:14:30 UTC
Transplanted to release69 branch:
http://hg.netbeans.org/release69/rev/a94d6a4a87fe
Comment 22 Peter Pis 2010-06-09 11:21:13 UTC
Verified.

Product Version: NetBeans IDE 6.9 (Build 201006082101)
Java: 1.6.0_18; Java HotSpot(TM) Client VM 16.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 23 rbalada 2010-06-14 08:18:20 UTC
Transplanted to release691 as 9c1416f2e827
Comment 24 rbalada 2010-06-14 08:38:11 UTC
Added keyword 6.9.1_CANDIDATE to bugfixes, which were integrated in release69 repository *after* the release691 clone has been created.
Comment 25 Martin Fousek 2010-07-08 08:22:31 UTC
Verified in NetBeans IDE 6.9.1 Dev (Build 201007062301), with JDK 1.7.0-ea, Windows XP and empty processorpath.
Comment 26 ulfzibis 2010-07-08 11:02:23 UTC
Oops, it seems I missed to report, that the fix resolved the problem on my machine + project with both versions: 6.9 + 6.9.1 Dev (Build 201006282301).