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.
Summary: | NoSuchMethodException: org.netbeans.core.multiview.ContextAwareDescription.<init>() | ||
---|---|---|---|
Product: | editor | Reporter: | Petr Hejl <phejl> |
Component: | Settings | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jskrivanek, jtulach, marfous, obrejla, peppertech, pjiricka, tmysik, vriha |
Priority: | P1 | ||
Version: | 8.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 210618 |
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace stacktrace stacktrace |
Description
Petr Hejl
2014-07-09 09:46:35 UTC
Created attachment 147949 [details]
stacktrace
Mila, can be this connected with your changes in Task #243042 Created attachment 149984 [details]
stacktrace
opened HTML file
Created attachment 149989 [details]
stacktrace
created new HTML5 project
I think this is more of a P2, seems to pop up on each IDE start (when some projects are opened) and sometimes opened projects disappear from Projects window (although files remain open) This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=210618 Created attachment 150015 [details]
stacktrace
Opened html file...
Created attachment 150018 [details]
stacktrace
Opening a HTML file.
Created attachment 150056 [details]
stacktrace
To reproduce create web project with GlassFish server.
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=210618 Created attachment 150097 [details]
stacktrace
Switched between project groups to another one where is opened JS file
The problem is that org.netbeans.modules.web.browser.ui.HtmlPreviewElement.createMultiViewDescription() declared for "instanceCreate" attribute in layer.xml for web.browser.api module returns null and so the code in FolderPathLookup defaults to an attempt of instantiation of an "instanceClass" attribute. However that is an interface ContextAwareDescription. IMHO "instanceOf" attribute should be used instead of "instanceClass" in this particular case so I've modified the layer. The javadoc of InstanceCookie.instanceClass() generally says that "instanceClass" should not be used ("instanceOf" should be used instead). But it's return value specification says: "the type (or perhaps some interesting supertype) of the instance". If it can be a supertype as well (of the target class) then the "instanceClass" attribute should never be used as a type for an instantiation attempt. Jardo, is it a correct assumption? Thanks. http://hg.netbeans.org/jet-main/rev/88c39d6425f5 Integrated into 'main-silver', will be available in build *201411010002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/88c39d6425f5 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #245508 - NoSuchMethodException: org.netbeans.core.multiview.ContextAwareDescription.<init>(). (In reply to Miloslav Metelka from comment #12) > The javadoc of InstanceCookie.instanceClass() generally says that > "instanceClass" should not be used ("instanceOf" should be used instead). This is true on the level of Java method. Don't call instanceClass().isAssignableFrom, but rather instanceOf(...). > But it's return value specification says: "the type (or perhaps some > interesting supertype) of the instance". If it can be a supertype as well > (of the target class) then the "instanceClass" attribute should never be > used as a type for an instantiation attempt. I don't think so. Since beginning, if instanceClass attribute was specified (and on instanceCreate) that would mean to try to create instance using default constructor of the specified class, at least as far as I rememeber. |