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 229211

Summary: Annotation processor reports FileNotFoundException: JAR entry not found in cnd-main/nbbuild/netbeans/ide/modules/org-netbeans-modules-web-common.jar when the file is deleted
Product: platform Reporter: Egor Ushakov <gorrus>
Component: FilesystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED WONTFIX    
Severity: normal CC: jlahoda
Priority: P4    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 177382
Attachments: stacktrace

Description Egor Ushakov 2013-04-30 13:07:48 UTC
Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) Client VM, 23.7-b01, Java(TM) SE Runtime Environment, 1.7.0_17-b02
OS: SunOS

User Comments:
gorrus: during external build




Stacktrace: 
java.io.FileNotFoundException: JAR entry META-INF/services/org.openide.filesystems.URLMapper not found in /ssd/work/cnd-main/nbbuild/netbeans/ide/modules/org-netbeans-modules-web-common.jar
   at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:140)
   at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
   at java.net.URL.openStream(URL.java:1037)
   at org.openide.util.lookup.MetaInfServicesLookup.search(MetaInfServicesLookup.java:248)
   at org.openide.util.lookup.MetaInfServicesLookup.beforeLookup(MetaInfServicesLookup.java:147)
   at org.openide.util.lookup.MetaInfServicesLookup.beforeLookupResult(MetaInfServicesLookup.java:126)
Comment 1 Egor Ushakov 2013-04-30 13:07:49 UTC
Created attachment 133977 [details]
stacktrace
Comment 2 Jaroslav Tulach 2013-07-18 08:01:00 UTC
The comment "during external build" makes me believe that there was a build in progress which might delete or create or rewrite some external JAR files while the IDE's processor tried to parse (and also use annotation processor) an such JAR files.

Certainly the annotation processor is allowed (and even required) to fail in case when somebody modifies/removes libraries underneath.

The Javac parser should then report the exception as low priority one, right? But it seems the exception has been reported and I don't think there is anything else to do. Closing.

Passing to Javac for review of my closing action.
Comment 3 Jan Lahoda 2013-07-18 08:45:15 UTC
(In reply to comment #2)
> The Javac parser should then report the exception as low priority one, right?

In this case, it appears MetaInfServicesLookup.search reports the exception into a Logger itself (line 358 in my sources). I don't think there is a way for us to create a brand new Logger hierarchy for stuff inside an annotation processor. So this appears to be completely out of our control.

> But it seems the exception has been reported and I don't think there is
> anything else to do. Closing.
> 
> Passing to Javac for review of my closing action.

I wonder why the AP does so much work. Background scan is claimed to be "slow", but the NB platforms APs are not really helping in making it fast, when they are partially starting another IDE instance while processing the annotations. I would suggest to make the AP be faster by making it do only what it really needs to do, which would also make it much less probable any problems like this will appear.