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.
If a embedded field is annotated with @Embedded, its type (the embeddable class) may have been mapped as a Embeddable class using either annotations or via a orm.xml file. Currently, if the embeddable class is not annotated with @Embeddable the red squiggley, indicating a compilation error, appears under the @Embedded annotation. The tool tip on this error says "target type of this field/property is not annotated as @Embeddable." - The project actually (and correctly) compiles without errors. The red squiggley must be replaced with a warning squiggley since the embeddable class can be mapped as Embeddable via a orm.xml mapping file. Else, this can confuse a user when there is really no compilation error. A sample application is attached. Please open the file EmbeddingEntity.java in netbeans to see the red squiggley under the @Embedded annotation. Kindly resolve the dependency on javaee.jar (part of glassfish) and the JavaDB library.
Created attachment 36346 [details] unzip the sample attached.
Just to clarify: we use the same error icon to denote a compilation, deployment and a runtime error. We are talking about deployment errors here. The problem is that some of our checks are taking into account annotations only rather than the merged annotation/XML descriptor model. The proper fix is to always use the merged model. In this particular case we should be showing an error if the class is *neither* annotated as @Embeddable *nor* set to be embeddable in orm.xml.
This is a pretty old bug. I just opened the attached project and did not see the red squiggley any more. Must have got fixed with other things. Mark it as "FIXED"