Error while adding triples to a graph

Hi Team, had a quick question, i am trying to create a graph using Stardog api. I have added all the dependencies except gremlin and jena as per the Stardog doc, but still facing issue:

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.NoSuchMethodError: com.complexible.common.io.Files2.tmpDir()Ljava/io/File;
at com.complexible.stardog.StardogConfiguration.(StardogConfiguration.java:221)
at com.complexible.stardog.Stardog.(Stardog.java:164)
at com.complexible.stardog.Stardog.buildServer(Stardog.java:300)
at GraphOperations.main(GraphOperations.java:18)

Would you please help me with the same!

Thanks!

Are you mixing up different versions of the Stardog API? Because that's the common reason for NoSuchMethodError, which means it finds the class but the class doesn't provide the method with the correct method signature.

Hi Lorenz,
Thank you for the reply!
I could not find any latest version for stardog-protocols-snarl-shared, so it is different from all others. Would you please suggest me solution for that. and i am using Stardog version 5.3.3 right now.
And if that is not the right one, which dependency should be used for SNARLProtocolConstants

Thank you!

I don't know where to download Jar files in general. I prefer using Maven and according to the docs, I don't think you have to import this explicitely.

Are you not using Maven?

I am using Maven. and it shows error on this class!

Hi Smrati,

What are the contents of your pom.xml file?

Ok, that's good. But do you import more than the dependencies mentioned here ?

I think the issue was because i wan using the old way to start Stardog server using API. Now i am trying using: Stardog aStardog = Stardog.builder().create();
Will get back in case I face any issue with that!

Thank you Pedro and Lorenz!

So, while using:
Stardog aServer = Stardog.builder().create();

try (AdminConnection aAdminConnection = AdminConnectionConfiguration.toEmbeddedServer()
.credentials("admin", "admin")
.connect())
{
...........

I am facing this error:

Exception in thread "main" com.complexible.stardog.security.StardogAuthenticationException: Authentication failed for account 'admin'
    at com.complexible.stardog.StardogKernel.login(StardogKernel.java:1041)
    at com.complexible.stardog.api.EmbeddedDriver.lambda$login$0(EmbeddedDriver.java:156)
    at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)

have used username/password:admin/admin and that works find when i start Stardog using the CLI

Would you please suggest me something on the same?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.