# Error while adding triples to a graph

**URL:** <https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299>\
**Category:** Support\
**Created:** [September 19, 2018, 5:28am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299 "2018-09-19T05:28:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![smrati.hans](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@smrati.hans](https://community.stardog.com/u/smrati.hans)\
**Post date:** [September 19, 2018, 5:28am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/1 "2018-09-19T05:28:28Z")

</div>

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](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!

---

<div class="post-metadata">

**Author:** ![lorenz\_b](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@lorenz\_b](https://community.stardog.com/u/lorenz_b)\
**Post date:** [September 19, 2018, 6:55am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/2 "2018-09-19T06:55:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smrati.hans](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@smrati.hans](https://community.stardog.com/u/smrati.hans)\
**Post date:** [September 19, 2018, 9:49am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/3 "2018-09-19T09:49:28Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![lorenz\_b](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@lorenz\_b](https://community.stardog.com/u/lorenz_b)\
**Post date:** [September 19, 2018, 12:36pm UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/4 "2018-09-19T12:36:59Z")

</div>

I don't know where to download Jar files in general. I prefer using Maven and according to [the docs](https://www.stardog.com/docs/#_using_maven), I don't think you have to import this explicitely.

Are you not using Maven?

---

<div class="post-metadata">

**Author:** ![smrati.hans](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@smrati.hans](https://community.stardog.com/u/smrati.hans)\
**Post date:** [September 19, 2018, 12:38pm UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/5 "2018-09-19T12:38:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pedro](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pedro/32/108_2.png) [@pedro](https://community.stardog.com/u/pedro)\
**Post date:** [September 19, 2018, 4:00pm UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/6 "2018-09-19T16:00:35Z")

</div>

Hi Smrati,

What are the contents of your `pom.xml` file?

---

<div class="post-metadata">

**Author:** ![lorenz\_b](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@lorenz\_b](https://community.stardog.com/u/lorenz_b)\
**Post date:** [September 20, 2018, 5:27am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/7 "2018-09-20T05:27:24Z")

</div>

Ok, that's good. But do you import more than the dependencies mentioned [here](https://www.stardog.com/docs/#_using_maven) ?

---

<div class="post-metadata">

**Author:** ![smrati.hans](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@smrati.hans](https://community.stardog.com/u/smrati.hans)\
**Post date:** [September 20, 2018, 12:18pm UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/8 "2018-09-20T12:18:03Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![smrati.hans](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@smrati.hans](https://community.stardog.com/u/smrati.hans)\
**Post date:** [September 21, 2018, 9:32am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/9 "2018-09-21T09:32:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 5, 2018, 9:32am UTC](https://community.stardog.com/t/error-while-adding-triples-to-a-graph/1299/10 "2018-10-05T09:32:20Z")

</div>

Closed on October 5, 2018, 9:32am UTC

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