Bug 168175 - Incorrect CNFE in ProxyClassLoader during FoD enablement
Incorrect CNFE in ProxyClassLoader during FoD enablement
Status: RESOLVED WORKSFORME
Product: platform
Classification: Unclassified
Component: Module System
6.x
All All
: P3 (vote)
: TBD
Assigned To: Jesse Glick
issues@platform
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT
: ERGONOMICS
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-06 13:35 UTC by Eduardo.m Costa
Modified: 2009-07-15 16:28 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (5.10 KB, text/plain)
2009-07-06 13:35 UTC, Eduardo.m Costa
Details
The project that raises the error (6.69 KB, application/x-compressed)
2009-07-15 11:55 UTC, Eduardo.m Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eduardo.m Costa 2009-07-06 13:35:46 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 10.0-b19, Java(TM) SE Runtime Environment, 1.6.0_04-b12
OS: Windows XP, 5.1, x86

User Comments:
_m4c0_: Fresh userdir, trying to open a maven-web project created with NB 6.7b1



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.maven.api.execute.RunUtils.hasTestCompileOnSaveEnabled(RunUtils.java:153)
        at org.netbeans.modules.maven.ActionProviderImpl.getSupportedActions(ActionProviderImpl.java:148)
        at org.netbeans.modules.project.ui.actions.ActionsUtil.commandSupported(ActionsUtil.java:148)
        at org.netbeans.modules.project.ui.actions.MainProjectAction.refreshView(MainProjectAction.java:222)
        at org.netbeans.modules.project.ui.actions.MainProjectAction.access$000(MainProjectAction.java:78)
        at org.netbeans.modules.project.ui.actions.MainProjectAction$1.run(MainProjectAction.java:183)
Comment 1 Eduardo.m Costa 2009-07-06 13:35:51 UTC
Created attachment 84397 [details]
stacktrace
Comment 2 Milos Kleint 2009-07-09 11:33:35 UTC
this issue is a result of an earlier problem (as shown in messages log of the exception reporter)

reassigning to ide/ergonomics as it seems to be FoD related.


SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor
org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject$FeatureOpenHook
java.lang.ClassNotFoundException: org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleImplementation2
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:257)
Caused: java.lang.ClassNotFoundException: org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleImplementation2
starting from ModuleCL@1548012[org.netbeans.modules.maven.j2ee] with possible defining loaders
[ModuleCL@75f756[org.netbeans.modules.j2eeserver]] and declared parents
[ModuleCL@1676b0c[org.netbeans.modules.schema2beans], ModuleCL@191cde0[org.netbeans.modules.j2ee.api.ejbmodule],
ModuleCL@171a7e4[org.netbeans.modules.j2ee.common], ModuleCL@1082823[org.jdesktop.layout],
ModuleCL@b37db4[org.netbeans.modules.j2ee.persistenceapi], ModuleCL@1b06a21[org.netbeans.modules.projectuiapi],
ModuleCL@e4e8c[org.netbeans.modules.maven.model], ModuleCL@bfc15b[org.netbeans.modules.j2ee.persistence],
ModuleCL@95648d[org.netbeans.modules.j2ee.dd.webservice], ModuleCL@1b3f915[org.netbeans.modules.maven.embedder], ...22 more]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Caused: java.lang.NoClassDefFoundError: org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleImplementation2
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:240)
	at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:294)
Caused: java.lang.NoClassDefFoundError: org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleImplementation2
while loading org.netbeans.modules.maven.j2ee.weborg.netbeans.modules.maven.j2ee.web.WebModuleImpl; see
http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound
	at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:298)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at org.netbeans.modules.maven.j2ee.web.WebModuleProviderImpl.<init>(WebModuleProviderImpl.java:89)
	at org.netbeans.modules.maven.j2ee.J2eeLookupProvider$Provider.doCheckJ2ee(J2eeLookupProvider.java:145)
	at org.netbeans.modules.maven.j2ee.J2eeLookupProvider$Provider.checkJ2ee(J2eeLookupProvider.java:121)
	at org.netbeans.modules.maven.j2ee.J2eeLookupProvider$Provider.<init>(J2eeLookupProvider.java:108)
	at org.netbeans.modules.maven.j2ee.J2eeLookupProvider.createAdditionalLookup(J2eeLookupProvider.java:80)
	at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.doDelegate(LookupProviderSupport.java:180)
	at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.<init>(LookupProviderSupport.java:128)
	at org.netbeans.spi.project.support.LookupProviderSupport$DelegatingLookupImpl.<init>(LookupProviderSupport.java:117)
	at org.netbeans.spi.project.support.LookupProviderSupport.createCompositeLookup(LookupProviderSupport.java:89)
	at org.netbeans.modules.maven.NbMavenProjectImpl$LazyLookup.beforeLookup(NbMavenProjectImpl.java:846)
	at org.openide.util.lookup.ProxyLookup$R.myBeforeLookup(ProxyLookup.java:645)
	at org.openide.util.lookup.ProxyLookup$R.computeResult(ProxyLookup.java:518)
	at org.openide.util.lookup.ProxyLookup$R.allInstances(ProxyLookup.java:489)
	at org.openide.util.Lookup.lookupAll(Lookup.java:245)
	at org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureDelegate.associate(FeatureProjectFactory.java:520)
	at
org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject.switchToReal(FeatureProjectFactory.java:370)
	at
org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject.stateChanged(FeatureProjectFactory.java:354)
	at org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:321)
	at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:123)
	at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:109)
	at org.netbeans.modules.ide.ergonomics.fod.FeatureManager.propertyChange(FeatureManager.java:254)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.openide.modules.ModuleInfo.firePropertyChange(ModuleInfo.java:152)
	at org.netbeans.Module.firePropertyChange0(Module.java:582)
	at org.netbeans.ChangeFirer.fire(ChangeFirer.java:107)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:932)
	at org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForEnable.enable(OperationSupportImpl.java:179)
	at org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForEnable.access$1100(OperationSupportImpl.java:122)
	at org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForEnable$1.run(OperationSupportImpl.java:153)
	at org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForEnable$1.run(OperationSupportImpl.java:151)
	at org.openide.util.Mutex.writeAccess(Mutex.java:433)
	at org.netbeans.modules.autoupdate.services.OperationSupportImpl$ForEnable.doOperation(OperationSupportImpl.java:151)
	at org.netbeans.api.autoupdate.OperationSupport.doOperation(OperationSupport.java:67)
	at org.netbeans.modules.ide.ergonomics.fod.ModulesActivator.doEnableModules(ModulesActivator.java:148)
	at org.netbeans.modules.ide.ergonomics.fod.ModulesActivator.enableModules(ModulesActivator.java:113)
	at org.netbeans.modules.ide.ergonomics.fod.ModulesActivator.access$000(ModulesActivator.java:61)
	at org.netbeans.modules.ide.ergonomics.fod.ModulesActivator$1.run(ModulesActivator.java:106)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
	at org.openide.util.RequestProcessor$Processor.doEvaluate(RequestProcessor.java:1072)
	at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:742)
	at
org.netbeans.modules.ide.ergonomics.fod.FeatureProjectFactory$FeatureNonProject$FeatureOpenHook.run(FeatureProjectFactory.java:420)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
Comment 3 Jaroslav Tulach 2009-07-10 09:12:27 UTC
Caused by a bug in classloading:

Caused: java.lang.ClassNotFoundException: 
org.netbeans.modules.j2ee.deployment.devmodules.spi.J2eeModuleImplementation2 starting from ModuleCL@1548012
[org.netbeans.modules.maven.j2ee] with possible defining loaders [ModuleCL@75f756[org.netbeans.modules.j2eeserver]] 
and declared parents [ModuleCL@1676b0c[org.netbeans.modules.schema2beans], ModuleCL@191cde0
[org.netbeans.modules.j2ee.api.ejbmodule], ModuleCL@171a7e4[org.netbeans.modules.j2ee.common], ModuleCL@1082823
[org.jdesktop.layout], ModuleCL@b37db4[org.netbeans.modules.j2ee.persistenceapi], ModuleCL@1b06a21
[org.netbeans.modules.projectuiapi], ModuleCL@e4e8c[org.netbeans.modules.maven.model], 
ModuleCL@bfc15b[org.netbeans.modules.j2ee.persistence], ModuleCL@95648d[org.netbeans.modules.j2ee.dd.webservice], 
ModuleCL@1b3f915[org.netbeans.modules.maven.embedder], ...22 more]
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:259)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Caused: java.lang.NoClassDefFoundError: org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleImplementation2
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at org.netbeans.JarClassLoader.doLoadClass(JarClassLoader.java:240)
	at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:294)
Caused: java.lang.NoClassDefFoundError: org/netbeans/modules/j2ee/deployment/devmodules/spi/J2eeModuleImplementation2 
while loading org.netbeans.modules.maven.j2ee.weborg.netbeans.modules.maven.j2ee.web.WebModuleImpl; see 
http://wiki.netbeans.org/DevFaqTroubleshootClassNotFound
	at org.netbeans.ProxyClassLoader.selfLoadClass(ProxyClassLoader.java:298)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:224)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Comment 4 Jesse Glick 2009-07-10 17:30:28 UTC
Not known to be reproducible. Anyway it is likely the fault of FOD that it is running user code inside of
ModuleManager.enable.
Comment 5 Jaroslav Tulach 2009-07-13 11:14:30 UTC
What usercode you are talking about? FoD is using ModuleInfo and attaches listener to it, that is all. If that is the 
user code you are referring to, and you don't want it to run, you need to change module system to not call the 
listeners in such situations.
Comment 6 Jesse Glick 2009-07-13 20:41:48 UTC
ModuleInfo fires a change when one occurs. It is the responsibility of the listener not to run user code (here, somehow
triggering NbMavenProjectImpl) within the dynamic scope of that listener callback. That said, I have no idea what the
actual cause of the problem is, nor could I guess without some way to reproduce.
Comment 7 Eduardo.m Costa 2009-07-15 11:55:46 UTC
Created attachment 84764 [details]
The project that raises the error
Comment 8 Eduardo.m Costa 2009-07-15 11:59:12 UTC
I've attached a compressed copy of the project. It is a small one, but I had to hide datasource information as well as a
SELECT statement (confidenciality issues). I hope this helps...
Comment 9 Jesse Glick 2009-07-15 16:28:35 UTC
The exact identity of the project is likely irrelevant; just matters that it is a Maven war project. Anyway I cannot
reproduce by running NB incl. ergonomics on a fresh userdir and opening that project; works fine.


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