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.

Bug 98384

Summary: jar:nbinst URLs seem to be ignored
Product: java Reporter: Andrei Badea <abadea>
Component: SourceAssignee: Tomas Zezula <tzezula>
Status: VERIFIED FIXED    
Severity: blocker Keywords: REGRESSION
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 97970    
Attachments: Test project

Description Andrei Badea 2007-03-20 18:04:17 UTC
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.
Comment 1 Andrei Badea 2007-03-20 18:05:23 UTC
Created attachment 39713 [details]
Test project
Comment 2 Tomas Zezula 2007-03-21 13:29:29 UTC
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
Comment 3 Tomas Zezula 2007-03-21 14:50:44 UTC
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
Comment 4 Andrei Badea 2007-03-21 16:41:22 UTC
Verified.