yandex-qatools / embedded-services

Embedded MongoDB/PostgreSQL for your tests
Other
39 stars 8 forks source link

ClassNotFoundException: org.hyperic.sigar.Sigar during tests execution #6

Closed vbauer closed 9 years ago

vbauer commented 9 years ago

I have the following exception in logs during tests execution:

java.lang.ClassNotFoundException: org.hyperic.sigar.Sigar
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)[:1.8.0_45]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)[:1.8.0_45]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)[:1.8.0_45]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_45]
    at org.elasticsearch.monitor.MonitorModule.configure(MonitorModule.java:69)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.AbstractModule.configure(AbstractModule.java:60)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.spi.Elements$RecordingBinder.install(Elements.java:204)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.spi.Elements.getElements(Elements.java:85)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.InjectorShell$Builder.build(InjectorShell.java:130)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:99)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:93)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:70)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:59)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.node.internal.InternalNode.<init>(InternalNode.java:210)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)[elasticsearch-1.7.2.jar:]
    at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)[elasticsearch-1.7.2.jar:]
    at ru.yandex.qatools.embed.service.AbstractElasticEmbeddedService.doStart(AbstractElasticEmbeddedService.java:67)[file:/home/vbauer/workspace/java/vbauer-embedded-services/target/classes/:]
    at ru.yandex.qatools.embed.service.AbstractEmbeddedService.start(AbstractEmbeddedService.java:72)[file:/home/vbauer/workspace/java/vbauer-embedded-services/target/classes/:]
    at ru.yandex.qatools.embed.service.ElasticMongoIndexingServiceTest.startEmbeddedServers(ElasticMongoIndexingServiceTest.java:57)[file:/home/vbauer/workspace/java/vbauer-embedded-services/target/test-classes/:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_45]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_45]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_45]
    at java.lang.reflect.Method.invoke(Method.java:497)[:1.8.0_45]

If we add Sigar project as dependency, it will not help completely:

<dependency>
    <groupId>org.fusesource</groupId>
    <artifactId>sigar</artifactId>
    <version>1.6.4</version>
</dependency>

Sigar project uses binary libraries, so it's necessary to do some additional tricks.

smecsia commented 9 years ago

This exception has a lowest severity (TRACE) in logger. I believe we can ignore it safely.