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 195388 - java.hints.bugs.UnusedAssignmentOrBranch$HighlightsFactoryImpl not found
Summary: java.hints.bugs.UnusedAssignmentOrBranch$HighlightsFactoryImpl not found
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 204117 (view as bug list)
Depends on: 103159
Blocks:
  Show dependency tree
 
Reported: 2011-02-12 16:12 UTC by dds.dhawal
Modified: 2012-05-18 14:43 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 176645


Attachments
stacktrace (4.19 KB, text/plain)
2011-02-12 16:12 UTC, dds.dhawal
Details
stacktrace (5.16 KB, text/plain)
2011-11-06 18:33 UTC, neerajchauriya
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dds.dhawal 2011-02-12 16:12:03 UTC
Build: NetBeans IDE 7.0 Beta 2 (Build 201102111519)
VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Windows XP

Stacktrace: 
java.lang.ClassNotFoundException: org.netbeans.modules.websvc.wsitmodelext.catalog.WSITSchemaCatalog
   at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
   at java.security.AccessController.doPrivileged(AccessController.java:0)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Comment 1 dds.dhawal 2011-02-12 16:12:08 UTC
Created attachment 105933 [details]
stacktrace
Comment 2 Jaroslav Tulach 2011-04-14 08:35:01 UTC
BinaryFS has reference to web.core and struts, but these modules don't seem to be enabled. 


Offending classloader: SystemClassLoader[359 modules]
Cannot load org.netbeans.modules.web.core.syntax.resources.Bundle for MultiFileObject@11fa5f0[Editors/text/x-jsp] defined by [jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/ide/modules/org-netbeans-modules-defaults.jar!/org/netbeans/modules/defaults/mf-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/java/modules/org-netbeans-modules-java-editor.jar!/org/netbeans/modules/java/editor/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/ide/modules/org-netbeans-modules-spellchecker-bindings-htmlxml.jar!/org/netbeans/modules/spellchecker/bindings/htmlxml/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-jsp-lexer.jar!/org/netbeans/lib/jsp/lexer/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core.jar!/org/netbeans/modules/web/core/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-websvc-core.jar!/org/netbeans/modules/websvc/core/resources/mf-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-debug.jar!/org/netbeans/modules/web/debug/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core-syntax.jar!/META-INF/generated-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core-syntax.jar!/org/netbeans/modules/web/core/syntax/resources/layer.xml]
Offending classloader: SystemClassLoader[359 modules]
Cannot load org.netbeans.modules.web.core.syntax.resources.Bundle for MultiFileObject@11fa5f0[Editors/text/x-jsp] defined by [jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/ide/modules/org-netbeans-modules-defaults.jar!/org/netbeans/modules/defaults/mf-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/java/modules/org-netbeans-modules-java-editor.jar!/org/netbeans/modules/java/editor/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/ide/modules/org-netbeans-modules-spellchecker-bindings-htmlxml.jar!/org/netbeans/modules/spellchecker/bindings/htmlxml/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-jsp-lexer.jar!/org/netbeans/lib/jsp/lexer/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core.jar!/org/netbeans/modules/web/core/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-websvc-core.jar!/org/netbeans/modules/websvc/core/resources/mf-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-debug.jar!/org/netbeans/modules/web/debug/resources/layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core-syntax.jar!/META-INF/generated-layer.xml, jar:file:/C:/Program%20Files/NetBeans%207.0%20Beta%202/enterprise/modules/org-netbeans-modules-web-core-syntax.jar!/org/netbeans/modules/web/core/syntax/resources/layer.xml]
Caused: java.util.MissingResourceException: No such bundle org.netbeans.modules.web.core.syntax.resources.Bundle
Comment 3 Jaroslav Tulach 2011-11-04 09:57:59 UTC
*** Bug 204117 has been marked as a duplicate of this bug. ***
Comment 4 neerajchauriya 2011-11-06 18:33:40 UTC
Created attachment 112882 [details]
stacktrace

I have build the source code of netbeans by running build command inside nbbuild directory, and after successfull compilation I have executed ant tryme command and from new project wizard of File menu I have selected a new Java application, which then shows ClsaaNotFoundException
Comment 5 Jaroslav Tulach 2011-12-05 10:26:12 UTC
All the reports seem to be related to 
java.hints.bugs.UnusedAssignmentOrBranch$HighlightsFactoryImpl
what is wrong with Java hints?
Comment 6 Jan Lahoda 2011-12-05 10:52:20 UTC
(In reply to comment #5)
> All the reports seem to be related to 
> java.hints.bugs.UnusedAssignmentOrBranch$HighlightsFactoryImpl
> what is wrong with Java hints?

Not true - see report #480983, not related to UnusedAssignmentOrBranch$HighlightsFactoryImpl, and even occurred before it was written! Even your first comment to the bug was before this class was introduced!

Anyway, UnusedAssignmentOrBranch$HighlightsFactoryImpl has been removed about two months ago. The code used @MimeRegistration and obviously the registration have been removed from the code as well. I see two possible causes for this problem:
-incremental build and LayerGeneratingProcessor not removing the registration. The physical processor that gets called in this case is org.netbeans.modules.editor.mimelookup.CreateRegistrationProcessor, but that is to, the best of my knowledge, written according to the best practices and registers correct originating elements. Note that when there is no annotation of given kind in the given file, the AP is not run at all (by AP design), and even if it would, the LGP does not allow to remove files. Its sole responsibility of the LGP to handle this, IMO. The only workaround on our side I see is to stop using the registration through annotations.
-the binary FS not correctly updated after modules updated.

Reverting back to origin.
Comment 7 Jaroslav Tulach 2011-12-05 13:27:38 UTC
Do you think it could be caused by bug 103159 - e.g. the files in layer are created (and notified), but the classes are not available yet?
Comment 8 Jesse Glick 2011-12-05 13:49:43 UTC
(In reply to comment #6)
> -incremental build and LayerGeneratingProcessor not removing the registration.
> [...] Its sole
> responsibility of the LGP to handle this, IMO.

There is bug #196782 about LGP's handling of incremental builds; some improvements are possible but it cannot be correct in all cases, as you have noted, due to the design of 269. It is the responsibility of developers to run clean builds whenever elements annotated with layer-generating annotations might have been deleted (or moved or renamed); or if they do not, and encounter exceptions of this type, to not report them.

> The only workaround on our side
> I see is to stop using the registration through annotations.

"Manual" registrations can also be left stale by incremental builds, at least when separate files (JAR entries) are involved.

All except the first report (#480983, 7.0b2) involve possible incremental builds (nbbuild/netbeans/), and the first report shows general mayhem that suggests a corrupted build, so this may simply be INVALID.
Comment 9 Jaroslav Tulach 2012-05-18 14:43:58 UTC
Last report from 111106 build. Closing.