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 198366 - show "reference to xxx is ambiguous" where there is no ambiguous account to javac
Summary: show "reference to xxx is ambiguous" where there is no ambiguous account to j...
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jan Lahoda
: 198007 (view as bug list)
Depends on:
Blocks: 200024
  Show dependency tree
Reported: 2011-05-06 05:16 UTC by windli
Modified: 2012-03-29 15:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description windli 2011-05-06 05:16:15 UTC
Test code
public class ErrorTest {
    public static void main(String[] args) {
        }catch(Exception ex)
            error ("error",ex); 

    public static void error(Object object, Object... params) {

    public static void error(Object object, Throwable t, Object... params) {

error ("error",ex);  will refer to error(Object object, Throwable t, Object... params),compile well but show a  "reference to error is ambiguous" hint. Not find a way to turn off this hint.
The exactly error functions signature are used by oralce, comes from:

These false hints make it not easier for seam users to figure out the real issues.
Comment 1 Jan Lahoda 2011-05-09 08:05:54 UTC
Sadly, this is a regression in JDK7's javac, which we pulled to NetBeans:

We will need to resolve this somehow.
Comment 2 Jan Lahoda 2011-05-17 17:04:45 UTC
*** Bug 198007 has been marked as a duplicate of this bug. ***
Comment 3 Jan Lahoda 2011-05-23 09:13:26 UTC
Has been fixed in javac as:

Merged in NetBeans trunk:

Transplated into NetBeans 7.0.1:
Comment 4 psilvaggio 2011-06-06 20:30:05 UTC
Downloaded nightly 2011-06-04 (1000).

Using Oracle JDK 1.6.0_25.

Still having issue:

reference to executeUpdate is ambiguous, both method executeUpdate(javax.persistence.EntityManager,java.lang.String,java.lang.Object...) in com.expretio.commons.persistence.jpa.hibernate.NativeQueryHelper and method executeUpdate(javax.persistence.EntityManager,java.lang.String,boolean,java.lang.Object...) in com.expretio.commons.persistence.jpa.hibernate.NativeQueryHelper match
Comment 5 initialzero 2012-03-29 15:34:12 UTC
This is happening with 7.1.1 using jdk5 for the project and jdk1.7.0_03 for netbeans on Windows 7. The editor says they are ambiguous however jdk5 compiles it just fine. 

logWrite(Level level, Object... params)


logWrite(Level level, int stack, Object... params)
Comment 6 Jan Lahoda 2012-03-29 15:40:56 UTC
The variant of the scenario that includes primitive types is covered by bug #200024. Sorry, but the behavior is considered to adhere to the language specification. Please see that bug for more details. Thanks and sorry.