jcgroup
jcgroup copied to clipboard
unable to run example program
Hello, I am trying to run ExampleTest.java as a JUnit Program in eclipse. I have compiled "c" source files and created ".so".
In eclipse I have specified the shared object using the option -Djava.library.path.
The program crashes and the trace is given below:
java.lang.NullPointerException
at java.io.Reader.
java.lang.NullPointerException at me.haosdent.cgroup.ExampleTest.tearDownClass(ExampleTest.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Please help.
-Mani
Got the same issue (and some others). I made a PR to fix it https://github.com/haosdent/jcgroup/pull/6 . It should work if you rename the src/main/resources/RENAMEMEuser_conf to src/main/resources/user_conf and put your user and password in it , but you should also check if you have cgroups installed and configured as well
about the file, it was removed, but here is the commit when it used to exist in the project https://github.com/haosdent/jcgroup/commit/7f5dd5ba047a3a604c5649e74ceccf9814660a19
For example, on Fedora and related distros (RHEL/CentOS/etc) you probably need to run sudo yum install libcgroup-tools libcgroup to install the cgroups and its commands
Thank you for your report. I do all my tests in ubuntu. Let me test it in CentOS. Maybe need some bug fix.
@tvmanikandan Sorry for miss the issue from github notification until today....