Bug 229211 - 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
Annotation processor reports FileNotFoundException: JAR entry not found in cn...
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Filesystems
7.3
All All
: P4 (vote)
: TBD
Assigned To: Jaroslav Havlin
issues@platform
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-30 13:07 UTC by Egor Ushakov
Modified: 2013-07-18 08:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (6.05 KB, text/plain)
2013-04-30 13:07 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo