Run-time error on using stardog-groovy: no class found -> com.clarkparsia.stardog.StardogException

2 views
Skip to first unread message

fra...@gmail.com

unread,
May 3, 2013, 5:25:22 AM5/3/13
to sta...@clarkparsia.com
Hi,
I wrote the following code with eclipse (+ groovy plugin):

import com.clarkparsia.stardog.ext.groovy.*;

class MyGreetings2 {

static void main (def args)

{

def s = new Stardog();

}

}

I added the folder lib of stardog1.2 and the jars of stardog-groovy and stardog-spring for stardog 1.2.

When I run as a script my groovy code, the following error occurs:


Caught: java.lang.NoClassDefFoundError: com/clarkparsia/stardog/StardogException

java.lang.NoClassDefFoundError: com/clarkparsia/stardog/StardogException

at MyGreetings2.main(MyGreetings2.groovy:9)

Caused by: java.lang.ClassNotFoundException: com.clarkparsia.stardog.StardogException

... 1 more 


Can someone help me?


Thank you.


francesco

Al Baker

unread,
May 3, 2013, 7:48:06 AM5/3/13
to sta...@clarkparsia.com
If you are running this from Eclipse, how are the jars visible to the classpath?

Did you add them manually via Eclipse's buildpath, or via the Gradle Eclipse plugin, or something else?

FYI, the Gradle Eclipse plugin can be found here: https://github.com/SpringSource/eclipse-integration-gradle/

Al
--
-- --
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
 
 

fra...@gmail.com

unread,
May 3, 2013, 11:24:08 AM5/3/13
to sta...@clarkparsia.com
I'm using Eclipse's buildpath.
The jars I included are:

fra...@gmail.com

unread,
May 3, 2013, 11:26:16 AM5/3/13
to sta...@clarkparsia.com, fra...@gmail.com
.. I have similar errors by using groovysh and GroovyConsole

Al Baker

unread,
May 3, 2013, 2:42:22 PM5/3/13
to sta...@clarkparsia.com
Adding external class folders like that does not appear to work, at least in Eclipse Juno.  If you expand the 'lib' folder, you'll see all the jar files do not have the little jar icon next to them and are in fact - not on the classpath.

You might want to just do a find/xargs, pull all the jar files into a single folder and then import external jars in the Eclipse build path.

Al

fra...@gmail.com

unread,
May 4, 2013, 2:06:52 PM5/4/13
to sta...@clarkparsia.com
Thank you very much Al,
I wrote a groovy script :) to copy jars into one folder and updated eclipse build path. It works :) 
Reply all
Reply to author
Forward
0 new messages