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 102516 - Exception at IDE startup when installing JavaIDE+AppServer
Summary: Exception at IDE startup when installing JavaIDE+AppServer
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
: 102642 105063 (view as bug list)
Depends on: 26338
Blocks:
  Show dependency tree
 
Reported: 2007-04-25 16:43 UTC by Mikhail Kondratyev
Modified: 2010-02-18 07:58 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace. (12.56 KB, text/plain)
2007-04-27 21:50 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kondratyev 2007-04-25 16:43:39 UTC
Used build from 2007.04.25 for testing
Steps to reproduce:
 - download full install bundle
 - select only Base IDE + Java IDE + App Server to be installed
 - install selected components
 - run IDE
Exception will be thrown at IDE startup:
java.lang.ClassNotFoundException:
org.netbeans.modules.retouche.hints.GsfHintsProvider from
SystemClassLoader[org.openide.util,org.openide.modules,org.openide.awt,org.netbeans.modules.editor.mimelookup,org.netbeans.modules.editor.settings,org.netbeans.api.progress,org.openide.dialogs,org.netbeans.modules.editor.util,org.netbeans.modules.lexer,org.netbeans.modules.editor.lib2,org.openide.filesystems,org.openide.options,org.openide.nodes,org.openide.explorer,org.openide.windows,org.openide.text,org.openide.actions,org.netbeans.modules.queries,org.openide.loaders,org.netbeans.modules.editor.fold,org.netbeans.modules.editor.lib,org.netbeans.modules.java.editor.lib,org.netbeans.modules.editor.plain.lib,org.netbeans.bootstrap,org.netbeans.core.startup,org.netbeans.modules.autoupdate.services,org.netbeans.modules.options.api,org.netbeans.swing.plaf,org.netbeans.core,org.netbeans.modules.autoupdate,org.netbeans.modules.servletapi,org.netbeans.modules.httpserver,org.netbeans.modules.editor.settings.storage,org.openidex.util,org.netbeans.modules.editor,org.netbeans.modules.editor.completion,org.netbeans.modules.editor.errorstripe.api,org.netbeans.spi.navigator,org.netbeans.modules.languages,org.netbeans.core.ui,org.netbeans.modules.javahelp,org.netbeans.modules.editor.errorstripe,org.netbeans.modules.projectapi,org.netbeans.modules.diff,org.netbeans.modules.progress.ui,org.openide.io,org.netbeans.core.output2,org.netbeans.modules.masterfs,org.jdesktop.layout,org.netbeans.modules.versioning,org.netbeans.modules.versioning.util,org.netbeans.modules.localhistory,org.netbeans.modules.projectuiapi,org.netbeans.lib.cvsclient,org.netbeans.libs.jsch,org.netbeans.modules.versioning.system.cvss,org.openide.execution,org.netbeans.api.java,org.netbeans.libs.jsr223,org.netbeans.modules.templates,org.netbeans.api.xml,org.apache.tools.ant.module,org.netbeans.modules.project.libraries,org.netbeans.modules.java.platform,org.netbeans.modules.project.ant,org.netbeans.modules.java.project,org.netbeans.libs.javacapi,org.netbeans.modules.websvc.restapi,org.netbeans.libs.javacimpl,org.netbeans.modules.classfile,org.netbeans.spi.tasklist,org.netbeans.modules.java.preprocessorbridge,org.netbeans.modules.timers,org.netbeans.modules.java.lexer,org.netbeans.modules.java.source,org.netbeans.modules.websvc.rest,org.netbeans.libs.ini4j,org.netbeans.modules.html.lexer,org.netbeans.modules.editor.structure,org.netbeans.modules.xml.core,org.netbeans.modules.xml.lexer,org.netbeans.modules.xml.text,org.netbeans.spi.palette,org.netbeans.modules.options.keymap,org.netbeans.modules.options.editor,org.netbeans.api.debugger,org.netbeans.spi.viewmodel,org.netbeans.spi.debugger.ui,org.netbeans.core.multiview,org.netbeans.core.execution,org.netbeans.api.debugger.jpda,org.netbeans.modules.editor.highlights,org.netbeans.modules.debugger.jpda.ant,org.netbeans.modules.db,org.netbeans.modules.db.core,org.netbeans.modules.autoupdate.ui,org.netbeans.spi.editor.hints,org.netbeans.lib.uihandler,org.netbeans.modules.editor.guards,org.netbeans.modules.java.guards,org.netbeans.modules.apisupport.paintapp,org.netbeans.modules.dbapi,org.netbeans.libs.svnClientAdapter,org.netbeans.modules.subversion,org.netbeans.modules.derby,org.netbeans.modules.tasklist.projectint,org.netbeans.libs.xerces,org.netbeans.modules.apisupport.ant,org.netbeans.modules.debugger.jpda.projects,org.netbeans.modules.debugger.jpda,org.netbeans.modules.profiler,org.netbeans.modules.profiler.j2se,org.netbeans.modules.updatecenters,org.netbeans.modules.xml.multiview,org.netbeans.modules.tasklist.ui,org.netbeans.modules.schema2beans,org.netbeans.modules.websvc.jaxws20,org.netbeans.modules.xml.xam,org.apache.xml.resolver,org.netbeans.modules.xml.retriever,org.netbeans.modules.websvc.jaxwsmodel,org.netbeans.modules.xml.schema.model,org.netbeans.modules.websvc.jaxrpc16,org.netbeans.modules.editor.mimelookup.impl,org.netbeans.modules.xml.tax,org.netbeans.modules.xml.tools,org.netbeans.modules.usersguide,org.netbeans.modules.html.editor.lib,org.netbeans.modules.html.editor,org.netbeans.modules.j2ee.metadata,org.netbeans.modules.j2ee.metadata.model.support,org.netbeans.modules.j2ee.persistenceapi,org.netbeans.modules.editor.bookmarks,org.netbeans.modules.extbrowser,org.netbeans.modules.ant.freeform,org.netbeans.modules.profiler.freeform,org.netbeans.modules.settings,org.netbeans.modules.editor.codetemplates,org.netbeans.modules.refactoring.api,org.netbeans.modules.java.editor,org.netbeans.modules.java.hints,org.netbeans.modules.javadoc,org.netbeans.modules.java.navigation,org.netbeans.modules.j2ee.toplinklib,org.netbeans.modules.languages.css,org.netbeans.modules.dbschema,org.netbeans.modules.xml.catalog,org.netbeans.modules.j2ee.persistence,org.netbeans.modules.j2ee.jpa.verification,org.netbeans.modules.lexer.nbbridge,org.netbeans.modules.image,org.netbeans.modules.xml.xdm,org.netbeans.modules.profiler.j2ee.sunas,org.netbeans.modules.db.sql.editor,org.netbeans.core.ide,org.netbeans.modules.ant.grammar,org.netbeans.modules.debugger.jpda.heapwalk,org.netbeans.modules.xml.wsdl.model,org.netbeans.modules.xml.axi,org.netbeans.modules.profiler.j2ee.jboss,org.netbeans.modules.junit,org.netbeans.modules.websvc.clientapi,org.netbeans.modules.ant.browsetask,org.netbeans.modules.java.j2seproject,org.netbeans.modules.form,org.netbeans.modules.properties,org.netbeans.modules.swingapp,org.netbeans.swing.tabcontrol,org.netbeans.core.windows,org.netbeans.modules.welcome,org.netbeans.modules.sendopts,org.netbeans.modules.utilities,org.netbeans.modules.java.freeform,org.netbeans.modules.websvc.serviceapi,org.netbeans.modules.css.visual,org.netbeans.modules.utilities.project,org.netbeans.modules.java.debug,org.netbeans.modules.apisupport.feedreader,org.netbeans.modules.javawebstart,org.netbeans.modules.languages.javascript,org.netbeans.modules.xsl,org.netbeans.modules.defaults,org.netbeans.modules.profiler.j2ee.tomcat,org.netbeans.modules.favorites,org.netbeans.modules.projectui,org.netbeans.modules.java.j2seplatform,org.netbeans.modules.tasklist.todo,org.netbeans.libs.freemarker,org.netbeans.modules.apisupport.project,org.netbeans.modules.i18n,org.netbeans.modules.i18n.form,org.netbeans.modules.uihandler,org.netbeans.modules.websvc.jaxwsapi,org.netbeans.modules.ant.debugger,org.netbeans.modules.debugger.jpda.ui,org.netbeans.upgrader,org.netbeans.modules.profiler.j2ee.weblogic,org.netbeans.modules.refactoring.java,org.netbeans.modules.xml.schema.completion,org.netbeans.modules.editor.plain,org.netbeans.modules.java.examples,org.netbeans.modules.xml.schema,org.netbeans.modules.html,org.netbeans.modules.profiler.nbproject,org.netbeans.modules.form.j2ee,org.netbeans.modules.properties.syntax]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:176)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.openide.loaders.InstanceSupport.findClass(InstanceSupport.java:476)
	at org.openide.loaders.InstanceSupport.instanceClass(InstanceSupport.java:123)
	at
org.openide.loaders.InstanceDataObject$Ser.instanceClass(InstanceDataObject.java:1137)
Comment 1 ehucka 2007-04-26 12:43:44 UTC
Reassigned to java, I am not sure if it is the right module.

mikk, was the ide started after the exception? Why do you think it is P1?
thanks
Comment 2 Jiri Prox 2007-04-26 15:34:08 UTC
It looks like you have installed Ruby support in previous NB installation, but
it is not in the current installation now. Did you clear your userdir after
reinstallation? 
Comment 3 Mikhail Kondratyev 2007-04-27 20:47:48 UTC
Answering the questions:
 - Yes, the IDE was started after exception. I agree the selected components are
may be not very typical combination but cases when user experience with the IDE
starts from exception should not be allowed.

 - Regarding Ruby: You are probably right, I could leave the old user dir.

In case the old user dir is the reason for this exception I think we should
downgrade the priority for this bug
Comment 4 Mikhail Kondratyev 2007-04-27 20:49:33 UTC
Please evaluate and downgrade the priority if needed
Comment 5 Jan Lahoda 2007-04-27 21:49:05 UTC
P3 seems more appropriate for me. The problem is probably caused by reuse of the
userdir (org.netbeans.modules.gsf.LanguageRegistry creates an .instance file on
the system filesystem programatically, so it is created in the userdir, and if
the same userdir is used on a build without gsf, this problem occurs - I am able
to reproduce this problem this way). I am attaching full stack trace of the
exception. I think that the MimeLookup should not show this exception to the
user - it should either ignore the exception completely (ignore .instance files
which cannot he instantiated), or only log it. Please check for Lookups.forPath
does.
Comment 6 Jan Lahoda 2007-04-27 21:50:56 UTC
Created attachment 41890 [details]
Stack trace.
Comment 7 Vitezslav Stejskal 2007-04-30 04:28:52 UTC
Well, we can (1) workaround this particular case in MimeLookup, but I think it's
a general problem. We should discourage people from using the same userdir for
different 'distributions' of Netbeans. Or (2) better we should organize our
settings in the way that uninstalling a pack (or cluster or whatever granularity
we want to use) would automatically disable all 'user customized' settings
related to that pack. Also (3) we should change the way how languages framework
'instanializes' a language (.nbs), so that it would not write files to a userdir
when in fact those files are not user customizations of any settings.

While the ideal solution would be (2) and (3), the practical one is (1) and at
least (3), if not (2). I think issue #26338 provides a suitable way for
implementing (3).

Comment 8 Jesse Glick 2007-04-30 20:34:08 UTC
IMHO:

#1 (the workaround part) should be unnecessary.

#1 (asking people to use different user dirs) is wrong.

#2 is wrong. Installer components are just a user convenience with no deep
meaning. People can always enable/disable/install/uninstall arbitrary individual
modules.

Sounds like someone is writing a .instance file to the userdir for no reason.
This is wrong - #3. Issue #26338 could perhaps help, but that is just a
workaround for lack of a proper SPI for registering languages.

BTW in the case of *.settings, we have a facility for automatically disabling
settings when the owning module is not enabled. See definition of <module> in
the DTD. This does not apply to *.instance or *.ser files.
Comment 9 Vitezslav Stejskal 2007-05-02 02:06:21 UTC
> Sounds like someone is writing a .instance file to the userdir for no reason.
> This is wrong - #3. 

The Schliemann framwork does I think, when they expand .nbs file. Normally
modules providing support for editing a type of files install various things in
the Editors/ folder and they do it by supplying XML layer, which gets
installed/uninstalled with the module. With Schliemann the modules only supply
.nbs file and the framework sort of dynamically does the other registration for
them. The way how this is done currently is by writing files to the Editors/
folder hierarchy (including .instance files of course).

I am not sure how this should be fixed. I understand your comments about my
points #1 (userdir) and #2 and I agree. I am not sure what the 'proper SPI for
registering languages' should be, but we are open to ideas.

I think I'll still do the fix/workaround in MimeLookup at least until we have a
better solution.
Comment 10 Vitezslav Stejskal 2007-05-02 02:07:14 UTC
*** Issue 102642 has been marked as a duplicate of this issue. ***
Comment 11 Torbjorn Norbye 2007-05-02 02:17:05 UTC
I'm doing it in the Ruby area too.

In my first implementation, I was relying on a patch supplied by Jarda which let me plug into the system 
file system dynamically. I registered some code which let me dynamically populate mime folders and 
such at startup, by inspecting other areas of the filesystem. (For example, the Ruby plugin could 
register its parser and scanner implementation under lets say "gsf", and then my code would go and 
populate all the various associated editor services (code completion, hyperlink handlers etc.) in other 
parts of the filesystem. 

However, this was a bit buggy (occasionally, the IDE would come up and none of my services would be 
registered - I'd need to restart). And more importantly, this wasn't in "stock NetBeans", so my plugins 
would only work with a hacked version of Netbeans.

When I discovered what Jan had done in Schliemann, I changed my code to do it his way, since it 
worked with stock NetBeans and seems to work reliably. However, it does have the unfortunate aspect 
that things which are really "var/cache"-oriented are stuck into "config/" settings.

Anyway -- I believe Yarda's patch has been modernized and integrated into NetBeans 6. I'm cc'ed on 
one of the issues, but I can't find it at the moment. So, there may be a better way for us to do this stuff 
now. I'm adding Yarda to this issue in case he wants to chime in.
Comment 12 Jesse Glick 2007-05-02 02:20:33 UTC
Issue #26338 is what you are thinking of.
Comment 13 Jan Jancura 2007-05-02 09:39:15 UTC
I think that this issue is not Schliemann (or Ruby impl.) specific. I saw it
even without Schliemann. If you customize something in NB (action?) and than
uninstall module...
Comment 14 Jesse Glick 2007-05-02 09:58:56 UTC
Yes, you can get CNFEs by customizing actions and then disabling the owning
module. However that seems a much less likely scenario than in this bug.
Comment 15 Jiri Prox 2007-05-30 09:53:27 UTC
*** Issue 105063 has been marked as a duplicate of this issue. ***
Comment 16 Jiri Prox 2008-04-11 00:43:19 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 17 Max Sauer 2008-11-13 13:03:29 UTC
Lets re-evaluate this issue after parsing api/gsf will be rewritten and used in trunk. 
Comment 18 Vitezslav Stejskal 2010-02-18 07:58:09 UTC
This should no longer be a problem. All CSL related registrations are now (6.9) automatically created in compile time by a special annotation processor. Prior that (6.7, 6.8) there was a special CslJar task, which used to do the same.