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.
After changing the name of one of my resource classes my application failed to run. The error generated com.sun.jersey.spi.inject.Errors$ErrorMessagesException was caused by two different classes mapping to the same URI. This was caused by a failure to remove the old name .class file from the build.
So do I understand it correctly that the workaround is to clean & build the project?
Offline comment by the reporter: Yes, a clean & build is a work around. If Netbeans could just display a warning message when renaming a class (maybe any class, but especially a class in a web app or web service project) - "Warning - You may need to do a clean&build to remove the previously named class file from the build."
This issue is unrelated to the REST functionality. REST has no any refactoring references. It is consequence of the pure Java refactoring action. REST resource class is a Java class. For some reason an old class (binary I suppose) hasn't removed after refactoring action. All subsequent runtime issues are just consequence.
(In reply to comment #2) > Offline comment by the reporter: Yes, a clean & build is a work around. If > Netbeans could just display a warning message when renaming a class (maybe any > class, but especially a class in a web app or web service project) - "Warning - > You may need to do a clean&build to remove the previously named class file from > the build." There is a warning in the refactoring documentation (Help button): "You should always perform a clean build after completing any refactoring commands. You can do a clean build by right-clicking the project's node in the Projects window and choosing Clean and Build Project." (In reply to comment #3) > This issue is unrelated to the REST functionality. > REST has no any refactoring references. > It is consequence of the pure Java refactoring action. > REST resource class is a Java class. For some reason an old class > (binary I suppose) hasn't removed after refactoring action. All subsequent > runtime issues are just consequence. This looks like a problem with CoS, but not a P2 imho. Reassigning for evaluation.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss