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.
[ BUILD # : Beta 2 ] [ JDK VERSION : 1.6.0_02 ] 1. Create an jpa entity (Entity Class) 2. Rename it using Ctrl-R while on the class name in java editor 3. Press Enter => Error message (red exclamation mark's displayed on the "type strip"): Named queries can be defined only on... Change the tab to another and suddenly the error...disappears.
Works for me. What did you change the name to? Can you reproduce it every time? Thanks.
Not able to reproduce. Closing as WORKSFORME. Reporter, please reopen if you still can reproduce on NB 6.5.
I bumped into this bug again with NB6.9.1 when following the E-Commerce tutorial (http://netbeans.org/kb/docs/javaee/ecommerce/entity-session.html). When creating the EJBs there with "Entity Classes from Database" it creates 6 EJBs from the DB tables. At first glance they seem ok, since NB doesn't show any error marks for the files in the project tab. However, if you open the files, some of them (2 in my case: Customer.java and CustomerOrder.java) showed the mentioned error message on the "public class ..." line. I managed to "fix" the false errors by editing the files (added a empty line before the class and removed it again) and switching tabs to another file afterward. When I returned to the edited file, the error was gone. Looks very much like an NB editor bug to me...
Sergey, can you please evaluate?
I saw this issues before just a few times, seems very rare and it was always hard to reproduce, sometimes something is happened with entites metamodel update.
(In reply to comment #3) > I bumped into this bug again with NB6.9.1 when following the E-Commerce > tutorial (http://netbeans.org/kb/docs/javaee/ecommerce/entity-session.html). > > When creating the EJBs there with "Entity Classes from Database" it creates 6 > EJBs from the DB tables. > At first glance they seem ok, since NB doesn't show any error marks for the > files in the project tab. However, if you open the files, some of them (2 in my > case: Customer.java and CustomerOrder.java) showed the mentioned error message > on the "public class ..." line. > > I managed to "fix" the false errors by editing the files (added a empty line > before the class and removed it again) and switching tabs to another file > afterward. When I returned to the edited file, the error was gone. > > Looks very much like an NB editor bug to me... Hi, I got the same compilation error with netbeans 6.9.1. Thanks for the tips. I've resolved the error just like you said. Tks
don't see for a long time, relatively easy to fix/workaround, >p4 for now
*** This bug has been marked as a duplicate of bug 221330 ***