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 175325 - Class loading problem in NbModuleSuite
Summary: Class loading problem in NbModuleSuite
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: RANDOM, TEST
Depends on:
Blocks:
 
Reported: 2009-10-23 18:53 UTC by Jesse Glick
Modified: 2009-11-05 10:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-10-23 18:53:56 UTC
Somehow some code (from openide.util & projectapi) is getting loaded the app class loader when it should be loaded from
something NbMS creates:

WARNING [org.openide.nodes.Children]: type=org.openide.util.Mutex type.cl=sun.misc.Launcher$AppClassLoader@181afa3
Mutex.cl=java.net.URLClassLoader@a9c09e clazz.cl=sun.misc.Launcher$AppClassLoader@181afa3
java.lang.ClassCastException: org.openide.util.Mutex
	at org.openide.nodes.Children$ProjectManagerDeadlockDetector.callPMMutexMethod(Children.java:1843)
	at org.openide.nodes.Children$ProjectManagerDeadlockDetector.getPMMutex(Children.java:1825)
	at org.openide.nodes.Children$ProjectManagerDeadlockDetector.execute(Children.java:1807)
	at org.openide.util.Mutex.doWrapperAccess(Mutex.java:1320)
	at org.openide.util.Mutex.readAccess(Mutex.java:351)
	at org.openide.loaders.DataObject.getNodeDelegateImpl(DataObject.java:291)
	at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:283)
	at org.openide.awt.MenuBar$LazyMenu.<init>(MenuBar.java:478)
	at org.openide.awt.MenuBar$MenuBarFolder.acceptFolder(MenuBar.java:382)
	at org.openide.loaders.FolderInstance.acceptDataObject(FolderInstance.java:444)
	at org.openide.loaders.FolderInstance.defaultProcessObjects(FolderInstance.java:780)
	at org.openide.loaders.FolderInstance.access$000(FolderInstance.java:101)
	at org.openide.loaders.FolderInstance$1R.init(FolderInstance.java:698)
[catch] at org.openide.loaders.FolderInstance$1R.run(FolderInstance.java:725)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:602)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1084)
Comment 1 Jesse Glick 2009-10-23 18:54:50 UTC
Causing periodic failures in Hudson C/V tests.
Comment 2 Jaroslav Tulach 2009-11-04 12:41:10 UTC
I need more info about the failure. The URL is no longer valid.

I have seen similar failures when I tried to use NbModuleSuite twice in one VM. Then the Folder Processing thread can 
run even when another instance of NetBeans is starting and have different Thread.getContextClassLoader(). I think I 
fixed that by adding delay between these two executions, but sure there can be better fix.

Please find a failure, link it from it, make it persistent and reopen.
Comment 3 Jesse Glick 2009-11-04 16:03:59 UTC
This is from MemoryValidationTest, which has just one suite() method and one NbModuleSuite.create, and <junit> invokes
each test suite in its own VM, so I doubt that's the issue.
Comment 4 Quality Engineering 2009-11-05 10:15:45 UTC
Integrated into 'main-golden', will be available in build *200911050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/0741b4797067
User: Jesse Glick <jglick@netbeans.org>
Log: Noting association of diagnostic with #175325.