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.
When trying to build new standalone NBM project for the 1st time from IDE, error occurs: error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.netbeans.modules.openide.modules.PatchedPublicProcessor not found Build from command line succeeds. NBM project uses cluster.path, but I've seen it before with 6.5 project as well.
Created attachment 77215 [details] Ant output from failed build from IDE
Created attachment 77216 [details] Ant output from successful build from command line
Created attachment 77217 [details] NBM project
It only happens when you run the IDE under JDK 5, and can be easily worked around by adding openide.modules to your module's deps. I could have sworn I fixed this exact same problem months ago. I will have to look up the fix and see why it is not working.
Don't know, after hours of debugging I'm stumped. The sun.misc.Service loading is broken (finds processor definitions but cannot load them). In the context of Service.LazyIterator.hasNext, loader.parent is an AntClassLoader, which extends j.l.ClassLoader and overrides just findResources (not getResources), and the impl of CL.gR: new sun.misc.CompoundEnumeration(new java.util.Enumeration[] { loader.parent.parent.getResources(prefix + service.getName()), loader.parent.findResources(prefix + service.getName()) }).hasMoreElements() returns false, yet loader.parent.getResources(prefix + service.getName()).hasMoreElements() returns true (the elements are the definition of the PatchedPublicProcessor in org-openide-modules.jar, and ServiceProviderProcesses in org-openide-util.jar). I cannot get the debugger the explain the discrepancy to me. The faulty CompoundEnumeration's first element is another CE, as expected, yet this one's second element is that coming from AppClassLoader - which ought not be consulted, since loader.parent.parent is a MainClassLoader (defined in the Ant integration module) which as of #b67c171c7f6a sets its parent to be the JRE's ExtClassLoader, not AppClassLoader, specifically to avoid this kind of problem. Of course if you ask for loader.parent.parent.gR directly, the result is fine.
Ah, I see... AntClassLoader defines a 'parent' instance field unrelated to ClassLoader.parent.
Finally found a bug in Ant: https://issues.apache.org/bugzilla/show_bug.cgi?id=46752 Working around: core-main #5e61e8466590
Thanks a lot. From some reason it appeared in almost all projects using cluster.path on my computer, that would be a blocker.
Probably because you were creating artificial modules that lacked (possibly transitive) dependencies on openide.{util,modules}.
Integrated into 'main-golden', will be available in build *200902241401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/5e61e8466590 User: Jesse Glick <jglick@netbeans.org> Log: #158934: an Ant bug causes 269 processing errors building a module with few deps from the IDE in JDK 5.