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 226360 - Reporting duplicate class when there is no duplicate class
Summary: Reporting duplicate class when there is no duplicate class
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.2
Hardware: PC Windows 10 x64
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 16:43 UTC by cmd1234
Modified: 2017-10-16 10:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
uplocateclass.png (102.43 KB, image/png)
2014-06-03 09:21 UTC, Zom-B
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cmd1234 2013-02-19 16:43:26 UTC
Its actually version 7.3 RC2


Get duplicate class error when there is no duplicate class.

Program compiles up correctly with no errors.

Have deleted cache files, but problem persists.

When loaded into Netbeans 7.2 I have no problems at all.
Comment 1 cmd1234 2013-02-19 17:09:23 UTC
Got around the problem I didn't know that netbeans has two places where is caches files.

had deleted ~/Library/Application\ Support/NetBeans/7.3rc2
but also need to delete ~/Library/Caches/NetBeans/7.3rc2

so its just the old cache problem.
Comment 2 Tomas Danek 2013-02-27 15:31:50 UTC
closing then.
Comment 3 psammalisto 2013-03-22 19:19:28 UTC
I got that error when I copied a backup over the file in src folder.  I could find the class name only in the class file and in project properties as main.class, it cannot be found e.g. anywhere in files in ~folder.
Comment 4 Tomas Danek 2013-04-10 09:14:46 UTC
Did you try wiping out the cache (like ~/Library/Caches/NetBeans/7.3 ) ?

(In reply to comment #3)
> I got that error when I copied a backup over the file in src folder.  I could
> find the class name only in the class file and in project properties as
> main.class, it cannot be found e.g. anywhere in files in ~folder.
Comment 5 Zom-B 2014-06-03 09:13:30 UTC
I encountered this in 8.0 RC2

When I refactor/rename the class, the error goes away.

When I add a new variable somewhere with the old name as the type, the autocompletion suggests it along with the new name, but javadoc for the old name is missing. No editor error is given but the compiler now halts with errors.
Comment 6 Zom-B 2014-06-03 09:21:58 UTC
Created attachment 147548 [details]
uplocateclass.png
Comment 7 ralfeus 2015-07-31 09:10:50 UTC
I've got same problem on 8.0.2. Cleaning cache didn't help
Comment 8 Tomas Hurka 2015-08-04 06:32:10 UTC
This issue has nothing to do with 'Exception reporter'. Reassigning.
Comment 9 pdk.knight 2016-01-01 05:50:15 UTC
(In reply to ralfeus from comment #7)
> I've got same problem on 8.0.2. Cleaning cache didn't help

Using 7.4 on ubuntu.
Same problem.
deleted nebeans project directory and the .netbeans in the home directory.
Setup my project again. Same problem.
Created a new user id and setup project no problems.
Back to original user id and found a .cache directory.
down the tree netbeans/version/index and removed index
no more problems.
Peter
Comment 10 dazed19 2017-03-24 11:03:14 UTC
(In reply to ralfeus from comment #7)
> I've got same problem on 8.0.2. Cleaning cache didn't help

I am also using 8.0.2 - and clearing cache as suggested worked for me, but not immediately after restart - initially I got the same "duplicate class" error.  However, I retried some time later (say 5 minutes?) and the build succeeded.  

I'm thinking this may be down to NetBeans background processes ontop of cleared cache - 3 running "Background scanning of projects" "Indexing Maven repository: Local" and "Checking for External Changes"
Comment 11 humingchina 2017-10-16 10:06:32 UTC
I am using 8.2 RC. Build NO.201705191307. Today I've got same problem. Cleaning project、restart OS and restart IDE did not help.Reinstall is ok.