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.
I have a ClasspathInfo whose compilation classpath contains two jar:nbinst URLs. One of the JARs referred by the URLs contains the javax.persistence.Entity annotation. Elements.getTypeElement() for this annotation in an user action task of a JavaSource created for this ClasspathInfo returns null. It works correctly when the URLs are jar:file. The problem can be reproduced with the attached project. Invoke the New File - Persistence - Entity Classes from Database wizard and use the dbschema file in the project as the table source. The generation process fails because it cannot resolve javax.persistence.Entity, as visible in the message log.
Created attachment 39713 [details] Test project
Checking in src/org/netbeans/modules/java/source/parsing/FileObjectArchive.java; /cvs/java/source/src/org/netbeans/modules/java/source/parsing/FileObjectArchive.java,v <-- FileObjectArchive.java new revision: 1.3; previous revision: 1.2 done
Performance improvement: Checking in src/org/netbeans/modules/java/source/classpath/CacheClassPath.java; /cvs/java/source/src/org/netbeans/modules/java/source/classpath/CacheClassPath.java,v <-- CacheClassPath.java new revision: 1.6; previous revision: 1.5 done Checking in src/org/netbeans/modules/java/source/parsing/FileObjects.java; /cvs/java/source/src/org/netbeans/modules/java/source/parsing/FileObjects.java,v <-- FileObjects.java new revision: 1.6; previous revision: 1.5 done
Verified.