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.
1. Create a Java SE application project 2. Set source level to 1.6 3. Create some entity classes from database 4. Run the project => You see that the JPA metamodel is not generated; the annotation processor was not run. On the other hand, if you do Cleand and Build, it *is* generated => bug.
After consultation with Jan Lahoda, it turns out that the processors actually *are* run even during Run/Deploy, they only work differently than during Build. During Build, AP output (.java files) is put into the build/generated-sourced dir, whereas during Run, AP output is only kept in Java infrastructure's caches. In both cases, .class files are correctly created under build/classes, so there is no issue at runtime. Still, I think there is still a problem that: 1. There is inconsistency between what the user sees after Build and after Run - in the former case the generated source is present, in the latter it is not 2. The generated sources may become stale, e.g. in the case when I i. Build the project ii. Open the generated source (JPA canonical metadata model) iii. Change the entity class in a way that affects the class generated by the AP, e.g. by adding a persistent field iv. Run the project, then the generated source will not be updated. (The .class file will be updated correctly, so there will be no problem at runtime.) These are IMO still problems for the user workflow, although not as severe -> decreasing priority to P3. Next, there is a problem with displaying the generated sources folder in the logical view, which I filed as a separate bug 191860.
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.