java.lang.ClassNotFoundException: com.carrotsearch.hppc.IntObjectOpenHashMap

57 views
Skip to first unread message

ch...@grieger.biz

unread,
Oct 12, 2015, 2:35:36 AM10/12/15
to Stardog
I have been fiddling around with stardog over the weekend and it has been a great developer experience so far. Unfortunately I stumbled across some minor issue with the dependency structure this morning. After I added the dependency on stardog-gremlin-4.0-RC1, the following exception appears when executing the following code. (Starting and embedded stardog server)

s = Stardog
      .buildServer()
      .bind(SNARLProtocolConstants.EMBEDDED_ADDRESS)
      .start();



java.lang.NoClassDefFoundError: com/carrotsearch/hppc/IntObjectOpenHashMap
at com.complexible.stardog.index.IndexOrder.<clinit>(IndexOrder.java:60)
at com.complexible.stardog.index.IndexStrategy.<clinit>(IndexStrategy.java:40)
at com.complexible.stardog.index.IndexOptions.<clinit>(IndexOptions.java:125)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
at java.lang.reflect.Field.get(Field.java:393)
at com.complexible.stardog.metadata.MetaProperties.register(MetaProperties.java:171)
at com.complexible.stardog.index.IndexModule.configure(IndexModule.java:32)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.AbstractModule.install(AbstractModule.java:122)
at com.complexible.stardog.BaseStardogModule.configure(BaseStardogModule.java:107)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
at com.google.inject.spi.Elements.getElements(Elements.java:110)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.complexible.stardog.Stardog.<init>(Stardog.java:172)
at com.complexible.stardog.Stardog.buildServer(Stardog.java:297)
at org.grieger.arc.StardogEmbedded.initializeDatabase(StardogEmbedded.java:59)
at org.grieger.arc.StardogEmbedded.launchStardog(StardogEmbedded.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
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.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: com.carrotsearch.hppc.IntObjectOpenHashMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 50 more


Here is the list of relevant dependencies:

def stardogVersion = "4.0-RC1"
dependencies {
    // ...
    compile "com.complexible.stardog:server:${stardogVersion}"
    compile "com.complexible.stardog:client-snarl:${stardogVersion}"
    compile "com.complexible.stardog.gremlin:stardog-gremlin:${stardogVersion}"
    // ...
}

I noticed that including stardog-gremlin leads to com.carrotsearch:hppc getting resolved with version 0.7.1. Before I included stardog-gremlin, hppc was resolved with version 0.5.2.

Michael Grove

unread,
Oct 12, 2015, 9:26:10 AM10/12/15
to stardog
Thanks for pointing this out, as you note, there's an error in the dependencies.  We'll resolve that for the next release.

Cheers,

Mike
 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Reply all
Reply to author
Forward
0 new messages