From: Graham Leggett <minfrin@sh...> - 2013-06-28 12:04:34
RHEL6 comes with the native sigar library available:
This provides the following files:
[user@... ~]# rpm -q -l sigar
So far so good.
We are now trying to use sigar from java on this staging box, and we cannot get our test cases to run at all. we see the following two errors:
java.lang.NoClassDefFoundError: Could not initialize class org.hyperic.sigar.Sigar
Unfortunately neither error gives us a clue as to why Sigar is failing, the java.lang.UnsatisfiedLinkError message seems to be printing a bogus string instead of the actual error, so we remain in the dark.
Reverse engineering the sigar java binding, we find a complex library loading mechanism that attempts to introspect the architecture of the machine and load a custom-named library with the architecture of the machine embedded into it. This mechanism however doesn't seem to contain any mechanism to load a normal, ordinary system library as provided by the operating system as it is in this case.
My question is thus this:
- How do we use the sigar java bindings with the sigar library as shipped by Redhat?
- Is this even possible?
- Has Redhat done some kind of customisation to make this work, and if so is this documented anywhere?
- Has anyone got this to work?
To make things clear, we need to roll out this code on many nodes, we cannot use a custom hacked solution. We either need to discover what we're doing wrong and do it the right way, or if the java bindings can't work with Redhat's system sigar library at all, we will have to maintain a custom version of the sigar library with this bug fixed.
Can anyone shed any light on this?
Get latest updates about Open Source Projects, Conferences and News.