From: Khalil A. <ka...@ne...> - 2014-12-02 08:48:23
|
Hi, I believe this is a problem with the URL you are using for the SPARQL endpoint. The correct SPARQ endpoint for your store is http://<IP>:8090/brightstar/<STORE>/sparql as described here: http://brightstardb.readthedocs.org/en/latest/SPARQL_Endpoint/ Cheers Kal On Mon, Dec 1, 2014 at 4:28 PM, Iván Palomares <iva...@gm...> wrote: > Hi, > Thanks to all who are trying to help with this question. In order to try > to find out the source of the problem, I replaced the code where the SparQL > query is executed and shown, by something simple in which I attempt to > obtain the graphs in the triplestore ans show its URIs. > > * //Create a connection to BrightstarDB SPARQL Query endpoint* > * SparqlConnector connect = new SparqlConnector(new > Uri("http://<IP>:8090/brightstar/<STORE>"));* > * PersistentTripleStore store = new > PersistentTripleStore(connect);* > > > * IEnumerable<Uri> graphs = connect.ListGraphs();* > * foreach (Uri uri in graphs)* > * {* > * Console.WriteLine(uri.ToString());* > * }* > > Now I obtain a new exception in the ListGraphs() line, a > RdfStorageException being unhandled: > > An unhandled exception of type 'VDS.RDF.Storage.RdfStorageException' > occurred in dotNetRDF.dll > > Additional information: An unexpected error occurred while listing Graphs > from the Store. See inner exception for further details > > This makes me thing that perhaps the source of the problem is not in the > previous query itself, but rather somewhere before, in the connection > settings? Maybe the classes SaprqlConnector and the PersistentTripleStore > as a wrapper, are not the appropriate choice to connect to a BrightstarDB > triplestore? > > Also, to give you more info, my triplestore has been directly imported > into BrightstarDB from a .owl file that was previously generated from an > ontology in Protegé. The importation process in BrightstarDB was done with > a management tool called Polaris it seemingly was all done correctly, > according to the output I received when I imported it. > > Kind regards, > Iván > > 2014-12-01 12:02 GMT+00:00 Iván Palomares <iva...@gm...>: > >> Hi, >> I'm currently trying to make a first connection from a .NET project with >> dotnetRDF, to a BrightstarDB remote endpoint in which I have a triplestore. >> The code I use is quite simple, just try to connect and execute a >> "trival" SPARQL query, as follows (<IP>, <PORT> and <STORE_NAME> stand for >> the existing address >> and triplestore name I want to access): >> >> namespace ConsoleApplication3 >> { >> >> class ReadFromBrightstarDB >> { >> static void Main(string[] args) >> { >> //Create a connection to BrightstarDB SPARQL Query endpoint >> SparqlConnector connect = new SparqlConnector(new Uri("http://<IP>:<PORT>/brightstar/<STORE_NAME>")); >> PersistentTripleStore store = new PersistentTripleStore(connect); >> >> Object results = store.ExecuteQuery("SELECT * WHERE {?s ?p ?o}"); >> if(results is SparqlResultSet) >> { >> //Print out the results >> SparqlResultSet rset = (SparqlResultSet)results; >> foreach (SparqlResult result in rset) >> { >> Console.WriteLine(result.ToString()); >> } >> } >> >> } >> } >> >> }When executing, I obtain an exception entitled "RDFParseException was >> unhandled", with the following description: >> >> An unhandled exception of type 'VDS.RDF.Parsing.RdfParseException' >> occurred in dotNetRDF.dll >> Additional information: Unable to Parse a SPARQL Result Set from the >> provided XML since the Document Element is not a <sparql> element! >> >> Any help would be appreciate, I'm quite new to .NET in general and >> BrightStarDB as well as to SparQL, so maybe there is a very silly issue >> here but I couldn't find it yet. >> Thanks! >> Iván >> > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > dotNetRDF-develop mailing list > dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop > > -- Kal Ahmed Director, Networked Planet Limited e: kal...@ne... w: www.networkedplanet.com |