I haven't figured out what the problem is with running my tests but I think I have a little better idea of what's going on. They used to run just fine but now are throwing the following error
log4cplus:ERROR Unable to open file: /var/lib/stardog/starrocks.log [main] ERROR com.complexible.stardog.BaseStardogModule - System information is invalid and the repair failed: Unexpected native ordinal: 130818 java.lang.IllegalArgumentException: Unexpected native ordinal: 130818
I think I have a little better idea of what might be happening here. I'm trying to isolate my test environment as much as I can from my local installation so I create a temp directory and and running an embedded instance of Stardog. I pass the temp directory to stardog with
STARDOG = Stardog.builder().home(TEST_HOME).create();
I need a license so before I run that I copy the license from the env var STARDOG_HOME to TEST_HOME before running the above.
So I'm wondering why it's still trying to open /var/lib/stardog/starrocks.log
which is in STARDOG_HOME not TEST_HOME. I'm guessing it used to work because I was testing with the same version that I had installed locally but now the local version is newer so it's trying to do a repair on the db.
What seems a little off is that even though I pass it a new home directory it's still looking to the one from the env var. Is there a possibility that the db version and consistency check is using the env var rather than the one set from the api?
Aligning the test Stardog version with the local installed version solves the immediate problem but I'm still not sure why they aren't completely isolated from each other.
Now I'm getting the following error
com.complexible.stardog.plan.eval.ExecutionException: class com.complexible.stardog.plan.optimizer.EmptyNodeOptimize does not exist, cannot insert an optimizer before it
at com.complexible.stardog.plan.eval.ExecutablePlanFactory.lambda$createOptimized$1(ExecutablePlanFactory.java:123)
at com.complexible.stardog.index.IndexUtils.doInTx(IndexUtils.java:156)
at com.complexible.stardog.plan.eval.ExecutablePlanFactory.createOptimized(ExecutablePlanFactory.java:110)
at com.complexible.stardog.plan.eval.QueryEngine.getExecutablePlan(QueryEngine.java:516)
at com.complexible.stardog.plan.eval.QueryEngine.getExecutablePlan(QueryEngine.java:452)
at com.complexible.stardog.plan.eval.QueryEngine.executeSelect(QueryEngine.java:302)
at com.complexible.stardog.query.DefaultQueryFactory$TupleQuery.execute(DefaultQueryFactory.java:198)
at com.complexible.stardog.query.DefaultQueryFactory$TupleQuery.execute(DefaultQueryFactory.java:184)
at com.complexible.stardog.api.KernelDatabaseConnection.lambda$_select$2(KernelDatabaseConnection.java:394)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at com.complexible.stardog.api.KernelDatabaseConnection._select(KernelDatabaseConnection.java:400)
at com.complexible.stardog.api.impl.AbstractConnection.executeSelect(AbstractConnection.java:456)
at com.complexible.stardog.api.impl.SelectQueryImpl.execute(SelectQueryImpl.java:38)
at com.complexible.stardog.api.impl.SelectQueryImpl.execute(SelectQueryImpl.java:25)
at com.semantalytics.stardog.kibble.string.TestAbbreviate.testWrongTypeFirstArg(TestAbbreviate.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: java.lang.IllegalArgumentException: class com.complexible.stardog.plan.optimizer.EmptyNodeOptimize does not exist, cannot insert an optimizer before it
at com.complexible.stardog.plan.optimizer.OptimizationPipeline$PipelineStageBuilder.addAfter(OptimizationPipeline.java:410)
at com.complexible.stardog.virtual.VirtualGraphConnectableConnection.optimize(VirtualGraphConnectableConnection.java:142)
at com.complexible.stardog.db.ConnectableConnectionCollection.lambda$optimize$5(ConnectableConnectionCollection.java:154)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.complexible.stardog.db.ConnectableConnectionCollection.optimize(ConnectableConnectionCollection.java:154)
at com.complexible.stardog.db.DatabaseConnectionImpl.optimize(DatabaseConnectionImpl.java:283)
at com.complexible.stardog.db.DelegatingConnectableConnection.optimize(DelegatingConnectableConnection.java:85)
at com.complexible.stardog.plan.eval.ExecutablePlanFactory.optimizePlan(ExecutablePlanFactory.java:140)
at com.complexible.stardog.plan.eval.ExecutablePlanFactory.lambda$null$0(ExecutablePlanFactory.java:117)
at com.complexible.stardog.plan.cache.SimplePlanCache.get(SimplePlanCache.java:102)
at com.complexible.stardog.plan.eval.ExecutablePlanFactory.lambda$createOptimized$1(ExecutablePlanFactory.java:117)
... 51 more
Did something recently change with the optimizer?
Ah that was at least one problem. I had used STARDOG_HOME to set the java.library.path which explains the mismatch. Is there an artifact that contains the starrocks binaries?
What are the coordinates for that artifact? I can't seem to find it.
While looking I noticed that there was an artifiact for license-core. Is there any chance I could programmatically get a license as part of the test setup?
Hi Zach,
The starrocks binaries are located in your $STARDOG/lib
with $STARDOG
being the location of the Stardog binary (e.g. /Users/noahgorstein/opt/stardog/stardog-7.2.1/lib
).
The cache-core
module can be added to the build.gradle
by adding the following to the dependencies:
compile "com.complexible.stardog.cache:stardog-cache-core:${stardogVersion}"
Let me know if that helps or if the issue is still persisting.
Best,
Noah
I was successfully referencing the starrocks libs but it isn’t ideal since it requires you to have a local install of Stardog to run your tests and it needs to be the same version. It’s not a big deal but it would be nice if there was an artifact that contained the libraries and used something like native-utils/README.md at master · adamheinrich/native-utils · GitHub
To load them.
I’ll see if I can find the artifact now. I probably wasn’t looking at that groupId
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.