String db = "mydb";
String server = "snarl://localhost:5820";
Connection conn = ConnectionConfiguration
.to(db)
.credentials("admin", "xxx")
.server(server)
.connect();
SelectQuery query = conn.select(select distinct ?iri ?fn ?ln from dst-persons:graph where { ?iri a dst:PhdStudent; foaf:firstName ?fn; foaf:familyName ?ln });
TupleQueryResult tqr = query.execute();
Hi,
I try to connect to a stardog database. It works when I retrieve data from a main java file but it raises exception when I try to connect from a restful service. Any idea ?
Here is my sample code:String db = "mydb";
String server = "snarl://localhost:5820";
Connection conn = ConnectionConfiguration
.to(db)
.credentials("admin", "xxx")
.server(server)
.connect();
SelectQuery query = conn.select(select distinct ?iri ?fn ?ln from dst-persons:graph where { ?iri a dst:PhdStudent; foaf:firstName ?fn; foaf:familyName ?ln });
TupleQueryResult tqr = query.execute();
Thx for your help,
Regards,
A.
--
-- --
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
Hi Mike,
sorry, here is the message I got in the server logs.
StandardWrapperValve[fr.systemx.webapp.DstApplication]: Servlet.service() for servlet fr.systemx.webapp.DstApplication threw exception
java.net.ConnectException
--
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.
As I said before, it works from standard java program. I can't see any reason it fails from a restful service!