# Unable to execute stardog example

**URL:** <https://community.stardog.com/t/unable-to-execute-stardog-example/584>\
**Category:** Support\
**Created:** [September 22, 2017, 9:19pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584 "2017-09-22T21:19:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [September 22, 2017, 9:19pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/1 "2017-09-22T21:19:41Z")

</div>

Hi,  
I tried to execute Stardog example from [GitHub - stardog-union/stardog-examples: Examples for working with and extending Stardog](https://github.com/stardog-union/stardog-examples).  
I was able to build it but unable to execute.

 ![Gradle( build succeed)](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/577fdda5616a568cb385150ac76bbafbe683724e.JPG)  
 ![Gradle1(ex2) deprecated](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/73e7cc7d3cdbd5d86dfb4ffea80051accd4d1198.JPG)

I changed my gradle version to 3.4.1 but still error.  
any tips?

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [September 22, 2017, 9:21pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/2 "2017-09-22T21:21:42Z")

</div>

Can you execute the example using the `-i` option to Gradle? This will show the exception thrown by the program.

---

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [September 22, 2017, 9:33pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/3 "2017-09-22T21:33:02Z")

</div>

When I build it it said "  
:compileJava NO-SOURCE  
:examples:compileJava NO-SOURCE  
:examples:analyzer:compileJava

 ![no-source](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/4099c4566652821e5bf41a63c899685f7fdeca77.jpg)

---

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [September 22, 2017, 9:35pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/4 "2017-09-22T21:35:13Z")

</div>

Here is what I did:  
I downloaded the code, I use cd command to go to directory of example.  
I used " gradle compileJava" command

> > it said build successful.  
> > But why no source!

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [September 22, 2017, 9:36pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/5 "2017-09-22T21:36:38Z")

</div>

It looks like there was a minor mistake in the README file. I’ve corrected it. The command to execute the example is:

`gradle execute -PmainClass=com.complexible.stardog.examples.api.ICVExample`

Hope this helps.

---

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [September 22, 2017, 9:40pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/6 "2017-09-22T21:40:20Z")

</div>

Still error.

 ![exe error](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/085753eb0dded1ac3121c4874b0d46113dae68f5.jpg)

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [September 22, 2017, 9:44pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/7 "2017-09-22T21:44:00Z")

</div>

Can you run with the -i flag so it prints more info about the error?

---

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [September 22, 2017, 9:44pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/8 "2017-09-22T21:44:19Z")

</div>

[error.log](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/1X/6e79c5b2709bf2a8771d6398d9b8ddf4bc77a8be.log) (59.3 KB)  
Please find attached log file for -i swich

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [September 22, 2017, 10:17pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/9 "2017-09-22T22:17:32Z")

</div>

It appears that this is a problem specific to Gradle and windows 10. We will have to investigate further as the Gradle folks don’t seem to have a solution.

---

<div class="post-metadata">

**Author:** ![StardogLover](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@StardogLover](https://community.stardog.com/u/StardogLover)\
**Post date:** [October 3, 2017, 5:54pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/10 "2017-10-03T17:54:55Z")

</div>

Thanks for reply, I think this is a problem with gredle itself.  
Do to the versioning some statements are obsolete.  
Which version of grade is tested so I can use the very exact one

---

<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 17, 2017, 5:55pm UTC](https://community.stardog.com/t/unable-to-execute-stardog-example/584/11 "2017-10-17T17:55:06Z")

</div>

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