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 206468 - Tests fail on exception: NPE: org.eclipse.core.internal.net.ProxyManager
Summary: Tests fail on exception: NPE: org.eclipse.core.internal.net.ProxyManager
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.1
Hardware: PC All
: P2 normal with 1 vote (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: TEST
: 206425 206743 207263 207314 207499 (view as bug list)
Depends on: 211733
Blocks:
  Show dependency tree
 
Reported: 2011-12-16 10:07 UTC by Petr Cyhelsky
Modified: 2012-06-11 15:27 UTC (History)
11 users (show)

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 Petr Cyhelsky 2011-12-16 10:07:23 UTC
steps to reproduce:
run "ant test-qa-functional" from $NB_REPOSITORY/profiler/ directory

tracking this separately because it seems most cases were fixed in Issue#205653

    [junit] SEVERE [org.netbeans.modules.netbinox]: framework event org.eclipse.mylyn.commons.net type 2
    [junit] java.lang.NullPointerException
    [junit]     at org.eclipse.core.internal.net.ProxyManager.getPluggedInAuthenticator(ProxyManager.java:390)
    [junit]     at org.eclipse.core.internal.net.ProxyManager.registerAuthenticator(ProxyManager.java:383)
    [junit]     at org.eclipse.core.internal.net.ProxyManager.initialize(ProxyManager.java:284)
    [junit]     at org.eclipse.core.internal.net.Activator.start(Activator.java:179)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    [junit]     at java.security.AccessController.doPrivileged(Native Method)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    [junit] Caused: org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.net.Activator.start() of bundle org.eclipse.core.net.
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
    [junit] WARNING [org.netbeans.CLIHandler]: Cannot unlock null
    [junit]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:284)
    [junit]     at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:417)
    [junit]     at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
    [junit]     at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
    [junit] Caused: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.core.net (18).
    [junit]     at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:121)
    [junit]     at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
    [junit]     at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    [junit]     at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
    [junit]     at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
    [junit]     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
    [junit]     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    [junit]     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    [junit]     at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    [junit]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    [junit] Caused: java.lang.NoClassDefFoundError: org/eclipse/core/net/proxy/IProxyService
    [junit]     at org.eclipse.mylyn.internal.commons.net.CommonsNetPlugin.start(CommonsNetPlugin.java:91)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    [junit]     at java.security.AccessController.doPrivileged(Native Method)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    [junit] Caused: org.osgi.framework.BundleException: Exception in org.eclipse.mylyn.internal.commons.net.CommonsNetPlugin.start() of bundle org.eclipse.mylyn.commons.net.
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    [junit]     at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
    [junit]     at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
    [junit] [catch] at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
    [junit]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
    [junit]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
    [junit]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
    [junit]     at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
    [junit]     at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:281)
    [junit]     at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:251)
    [junit]     at org.eclipse.osgi.launch.Equinox.start(Equinox.java:256)
    [junit]     at org.netbeans.core.netigso.Netigso.start(Netigso.java:172)
    [junit]     at org.netbeans.NetigsoFramework.startFramework(NetigsoFramework.java:251)
    [junit]     at org.netbeans.ModuleManager.enable(ModuleManager.java:1090)
    [junit]     at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:340)
    [junit]     at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:276)
    [junit]     at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:294)
    [junit]     at org.netbeans.core.startup.Main.getModuleSystem(Main.java:172)
    [junit]     at org.netbeans.core.startup.Main.start(Main.java:308)
    [junit]     at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:123)
    [junit]     at java.lang.Thread.run(Thread.java:662)
Comment 1 Jiri Skrivanek 2012-01-16 14:35:28 UTC
Still blocks tests.
Comment 2 Jaroslav Tulach 2012-01-17 12:26:04 UTC
*** Bug 206435 has been marked as a duplicate of this bug. ***
Comment 3 Jaroslav Tulach 2012-01-17 12:26:10 UTC
*** Bug 207263 has been marked as a duplicate of this bug. ***
Comment 4 Jaroslav Tulach 2012-01-17 12:26:17 UTC
*** Bug 206425 has been marked as a duplicate of this bug. ***
Comment 5 Jaroslav Tulach 2012-01-17 12:26:23 UTC
*** Bug 206743 has been marked as a duplicate of this bug. ***
Comment 6 Jaroslav Tulach 2012-01-17 12:26:30 UTC
*** Bug 207314 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Tulach 2012-01-18 12:31:47 UTC
This is the fix foir ProfilerValidationTest.java. Use it in your tests if you want. As there is a lot of duplicates, I'll try to come up with something more general that would work out of the box however.

--- ProfilerValidationTest.java (BASE)
+++ ProfilerValidationTest.java (Based On LOCAL)
@@ -101,7 +101,7 @@
     public static NbTestSuite suite() {
         NbModuleSuite.Configuration conf = NbModuleSuite.createConfiguration(
             ProfilerValidationTest.class
-        ).clusters("profiler").enableModules(".*").honorAutoloadEager(true)
+        ).clusters("profiler|nb").enableModules(".*").honorAutoloadEager(true)
         .failOnException(Level.SEVERE)
         .failOnMessage(Level.SEVERE);
Comment 8 Jaroslav Tulach 2012-01-19 14:40:31 UTC
*** Bug 207499 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Tulach 2012-01-20 12:43:59 UTC
*** Bug 207499 has been marked as a duplicate of this bug. ***
Comment 10 Jaroslav Tulach 2012-01-20 15:04:12 UTC
ergonomics#3a32c36b3bda
Comment 11 Quality Engineering 2012-01-25 16:34:52 UTC
Integrated into 'main-golden', will be available in build *201201250600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3a32c36b3bda
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #206468: I wonder why we decided to use startlevels! The eclipse bundles (net, registry, security) seem to have Bundle-ActivationPolicy: lazy and as such they should be activated as soon as they are used, in proper order. As the requirement to use branding to make everything work is problematic for tests and applications built on top of the platform, let's try to remove this completely and rely on the lazy activation policy.
Comment 12 Quality Engineering 2012-01-26 16:11:13 UTC
Integrated into 'main-golden', will be available in build *201201260600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3acca86b3335
User: Petr Cyhelsky <cyhelsky@netbeans.org>
Log: #206468 Fix for the ProfilerValidationTest