Re: [stardog-users] Stardog client dependencies

0 views
Skip to first unread message

Mike Grove

unread,
Feb 7, 2013, 8:21:54 AM2/7/13
to stardog
The included dependencies are for the entire system, lucene & mahout, as you point out, are not required by the client, only the server

We're working on providing the client & server in separate distributions to help alleviate this issue.

Cheers,

Mike

On Thu, Feb 7, 2013 at 4:06 AM, gjdev <gerjon...@gmail.com> wrote:
I don't get it. Does stardog really need all those dependencies when running in client-server mode? I was hoping to swap out sesame with stardog in one of our products to see how far I would get. But besides this requiring some serious time to get all the depended jar's in our repository, it still won't work due to all the jar's that stardog client depends upon, but with a different version than what our own software uses I. don't understand why the client depends on lucene, mahout, and a whole bunch of other stuff. Don't those jars only make sense on the server? Using stardog would be a whole bunch easier if the dependencies of the client could be trimmed down to what's really actually used by the client at runtime.

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

Evren Sirin

unread,
Feb 7, 2013, 8:59:21 AM2/7/13
to Stardog
If you are only interested in running queries from your application
(and not adding/removing data), an easy temporary solution would be to
use Sesame's SPARQLRepository to run queries from Stardog's HTTP
server. For this to work, you need to first start the Stardog server
from the command-line using --disable-security option:

$ ./stardog-admin --disable-security server start

You should create your database and add data using the command-line
interface as well. Then you can connect to Stardog server from you
application (using only Sesame libraries in your classpath) and run
queries as follows:

SPARQLRepository repo = new
SPARQLRepository("http://localhost:5822/myKB/query");
repo.initialize();
RepositoryConnection conn = repo.getConnection();
TupleQueryResult result =
conn.prepareTupleQuery(QueryLanguage.SPARQL, "SELECT * {?s ?p ?o}
LIMIT 5").evaluate();
QueryResultIO.write(result, TupleQueryResultFormat.JSON, System.out);
result.close();
conn.close();
repo.shutDown();

Just replace "myKB" in the URL with the name of the database you have.

Best,
Evren

Al Baker

unread,
Feb 7, 2013, 9:07:00 AM2/7/13
to sta...@clarkparsia.com
To compliment Evren's response, you can do the same thing with Jena:

qe = QueryExecutionFactory.sparqlService(endpoint, query)

Where endpoint is any valid SPARQL endpoint, e.g. "http://localhost:5822/mydb/query"

The other short term option to minimize the configuration work is to use something like Gradle to pull in the lib file tree -- in fact this is what the stardog-groovy and stardog-spring libraries do with Gradle's fileTree dependency declaration.

Last but not least - below is the current minimal list of jars (prune as necessary for Sesame, Jena, Empire).

A simplified client jar and dependency set is on the horizon.

Regards,
Al

commons-math-1.2.jar
javax.inject-1.jar
httpclient-4.1.2.jar
httpcore-4.1.3.jar
httpmime-4.1.1.jar
gson-2.2.1.jar
javax.transaction.jar
shiro-core-1.1.0.jar
empire-core.jar  
stardog-sesame-1.1.3.jar
empire-sesame.jar
jsonld-java-1.0.0-SNAPSHOT.jar
truelicense.jar
jbcrypt-0.3.jar  // different than Maven central
truexml.jar
jewelcli-0.6.4.jar
guice-assistedinject-3.0.jar
guava-12.0.jar
netty-3.5.2.Final.jar
lucene-core-3.4.0.jar
cp-common-license-1.0.jar
stardog-1.1.3.jar
guice-3.0.jar
empire-jena.jar
cxf-2.2.6.jar
jgrapht-jdk1.5.jar
json.jar
mahout-collections-1.0.jar
stardog-security-1.1.3.jar
trueswing.jar
jsr311-api-1.0.jar
stardog-search-1.1.3.jar
guice-throwingproviders-3.0.jar
openrdf-sesame-2.3.4-onejar.jar 
cp-common-openrdf-0.6.1.jar
stardog-logging-1.1.3.jar
protobuf-java-2.4.1.jar
stardog-jena-1.1.3.jar
stardog-http-1.1.3.jar
guice-jmx-3.0.jar
siren-0.2.0.jar
nquads-1.6.jar
data-exporter-1.0.0.jar
stardog-cli.jar
cp-common-utils-2.2.1.jar
guice-multibindings-3.0.jar
javax.resource.jar
stardog-empire-1.1.3.jar
stardog-icv-1.1.3.jar
lucene-spellchecker-3.4.0.jar
shiro-web-1.1.0.jar
stardog-debug-1.1.3.jar
hppc-0.4.0.jar

gjdev

unread,
Feb 8, 2013, 11:04:45 AM2/8/13
to sta...@clarkparsia.com
That's what I would expect, but it doesn't seem to work that way. If I don't have lucene on the classpath, I am getting ClassNotFoundExceptions.

It would be really helpful if you guys could trim down the runtime dependencies in a client config to what's actually needed by the client. I don't think I can use the 1.1.3 distribution at all, because the software I want to use it in depends on conlicting lucene versions (and conflicting versions of a couple of the other libs as well that I think should not be part of the client deps).

gjdev

unread,
Feb 8, 2013, 11:36:49 AM2/8/13
to sta...@clarkparsia.com
Unles this is not how you make a connection as a client to a running server:

        Repository aRepo = new StardogRepository(ConnectionConfiguration.to("testSesame").url("snarl://localhost:5820/").credentials("admin", "admin"));

It seems like I need practically the same set of libraries for a client, as i would need for an embedded server


On Thursday, February 7, 2013 2:21:54 PM UTC+1, Michael Grove wrote:

Kendall Clark

unread,
Feb 8, 2013, 11:51:13 AM2/8/13
to stardog
> It would be really helpful if you guys could trim down the runtime
> dependencies in a client config to what's actually needed by the client.

As we've said several times on this list recently, we are working on
that now as part of an effort to open source the Stardog Java client
completely.

Please stay tuned.

Cheers,
Kendall
Reply all
Reply to author
Forward
0 new messages