Problem with running plugin unittest
carlabramsson Mar 17, 2009 7:58 AMHello!
I'm working on a custom plugin. I've got it setup like this:
<plugin name="MyJmxBasedPlugin" displayName="MyJmxBasedPlugin Services" package="org.rhq.plugins.myplugin" description="Provides monitoring of MyJmxBasedPlugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:xmlns:rhq-plugin" xmlns:c="urn:xmlns:rhq-configuration"> <depends plugin="JMX" /> <depends plugin="Tomcat" /> ....
When I run the unittests (with maven2) i get this exception:
11:41:44,996 INFO [JMXServerComponent] Starting connection to JMX Server 9980 11:41:44,996 WARN [JMXServerComponent] JMX Plugin connection failure org.mc4j.ems.connection.EmsException: Unable to make temporary file store at org.mc4j.ems.connection.support.classloader.ClassLoaderFactory.storeImplToTemp(ClassLoaderFactory.java:109) at org.mc4j.ems.connection.support.classloader.ClassLoaderFactory.buildClassLoader(ClassLoaderFactory.java:202) at org.mc4j.ems.connection.ConnectionFactory.getConnectionProvider(ConnectionFactory.java:120) at org.rhq.plugins.jmx.JMXServerComponent.prepareConnection(JMXServerComponent.java:190) at org.rhq.plugins.jmx.JMXServerComponent.internalStart(JMXServerComponent.java:138) at org.rhq.plugins.jmx.JMXServerComponent.start(JMXServerComponent.java:77) 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.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:449) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.io.IOException: The system cannot find the path specified at java.io.WinNTFileSystem.createFileExclusively(Native Method) at java.io.File.checkAndCreate(File.java:1704) at java.io.File.createTempFile(File.java:1792) at org.mc4j.ems.connection.support.classloader.ClassLoaderFactory.copyFileToTemp(ClassLoaderFactory.java:117) at org.mc4j.ems.connection.support.classloader.ClassLoaderFactory.storeImplToTemp(ClassLoaderFactory.java:100) ... 15 more 11:41:45,011 WARN [JMXServerComponent] Unable to connect to JMX Server 9980
It seems like it has something to do with the mc4j.ems.JarTempDir property in org.mc4j.ems.connection.support.classloader.ClassLoaderFactory
I'm running this on a winxp-box with
mvn -Pdev -Drhq.containerDir=C:\a\jopr-server-2.2.0.Beta1 -Djava.io.tempdir=C:\temp install
...in my custom plugin dir that sits beside the other jopr-plugins. The jopr source I've got checked out is the trunk.
Anyone else that have had this problem?