release-3.0.0 branch failure, master ok

John Mazzitelli mazz at redhat.com
Mon Dec 6 16:43:52 UTC 2010


The release-3.0.0 branch is failing, master is ok. After doing some 
debugging, I find this is the cause... this is a git commit in master 
that fixed the problem and probably has to get cherry picked over, the 
git commit message is exactly the error the test is getting in 
release-3.0.0 (and it is where i found the problem in my debugging):

commit 31a27cb1807ea2e0ae258d996ce968ec0f730135
Author: Ian Springer <ian.springer at redhat.com> 2010-09-21 11:10:38
Committer: Ian Springer <ian.springer at redhat.com> 2010-09-21 11:16:42

comment out some code that was causing the following unit test failure:

Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 863.162 
sec <<< FAILURE!
beforeClass(org.rhq.core.pc.inventory.ResourceContainerTest)  Time 
elapsed: 0 sec  <<< FAILURE!
java.lang.RuntimeException: Cannot initialize the plugin container
	at org.rhq.core.pc.plugin.PluginManager.initialize(PluginManager.java:173)
	at 
org.rhq.core.pc.PluginContainer.startContainerService(PluginContainer.java:391)
	at org.rhq.core.pc.PluginContainer.initialize(PluginContainer.java:252)
	at 
org.rhq.core.pc.inventory.ResourceContainerTest.beforeClass(ResourceContainerTest.java:48)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:417)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:154)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:88)
	at 
org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:167)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
	at org.testng.TestRunner.runWorkers(TestRunner.java:759)
	at org.testng.TestRunner.privateRun(TestRunner.java:592)
	at org.testng.TestRunner.run(TestRunner.java:486)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
	at org.testng.SuiteRunner.run(SuiteRunner.java:204)
	at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
	at org.testng.TestNG.run(TestNG.java:751)
	at 
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:62)
	at 
org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:141)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at 
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
	at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
Caused by: org.rhq.core.clientapi.agent.PluginContainerException: A 
valid plugin JAR URL must be supplied.
	at 
org.rhq.core.clientapi.descriptor.AgentPluginDescriptorUtil.loadPluginDescriptorFromUrl(AgentPluginDescriptorUtil.java:296)
	at 
org.rhq.core.pc.plugin.PluginDescriptorLoader.loadPluginDescriptor(PluginDescriptorLoader.java:67)
	at org.rhq.core.pc.plugin.PluginManager.loadPlugin(PluginManager.java:316)
	at org.rhq.core.pc.plugin.PluginManager.initialize(PluginManager.java:168)
	... 32 more

Results :

Failed tests:
   beforeClass(org.rhq.core.pc.inventory.ResourceContainerTest)

modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
index 2c64ff1..d9976cb 100644
--- 
a/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
+++ 
b/modules/core/plugin-container/src/main/java/org/rhq/core/pc/plugin/PluginManager.java
@@ -163,9 +163,11 @@
                  }

              } else {
+                // TODO (ips, 10/21/10): I don't think this block of 
code is needed any longer. I am commenting it for
+                //                       now, but it should eventually 
be deleted.
                  // Loading a null plugin loads the plugin using the 
current classloader (for unit test testing)
-                log.info("Loading the null plugin which uses 
non-isolated classloader");
-                loadPlugin(null, thisClassLoader);
+                //log.info("Loading the null plugin which uses 
non-isolated classloader");
+                //loadPlugin(null, thisClassLoader);
              }
          } catch (Exception e) {
              shutdown(); // have to clean up the environments (e.g. 
unpacked jars) we might have already created
@@ -379,7 +381,6 @@
       *
       * @param pluginName      the name of the plugin to obtain 
dependency URLs for
       * @param pluginNamesUrls map of all known plugin names and their 
plugin jar URLs
-     * @param graph           the dependency graph
       * @param allUrls         where the results will be stored
       *
       * TODO: Use it or lose it - this used to be needed, keeping this 
around just in case it needs to be resurrected


More information about the rhq-devel mailing list