Hi again,

I have just realized that when I go to the link http://dbpedia.org/sparql ,
on the screen it writes "(Security restrictions of this server do not allow you 
to retrieve remote RDF data, see 
details<http://dbpedia.org/sparql?help=enable_sponge>.) "

So my problem is related with this.

In the details I have tried to access 
http://dbpedia.org/sparql?help=enable_sponge
But I got 403 forbidden message.

Best,
Mehmet

From: Mehmet Ali Abdulhayoglu
Sent: Wednesday 5 March 2014 1:21 PM
To: 'to...@inf.fu-berlin.de'; dbpedia-discussion@lists.sourceforge.net
Subject: RE: [Dbpedia-discussion] DBpedia SPARQL error when applying JENA

Hi Alexandru,

Yes, indeed I tried the sparql endpoint but the result was same.

In my previous message I forgot to mention. Here are the warning messages that 
can help:

log4j:WARN No appenders could be found for logger 
(org.apache.jena.riot.stream.JenaIOEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
info.

Thanks for your consideration.

Best,
Mehmet

From: Ranma Saotome [mailto:bakara...@gmail.com] On Behalf Of Alexandru Todor
Sent: Wednesday 5 March 2014 1:18 PM
To: Mehmet Ali Abdulhayoglu; 
dbpedia-discussion@lists.sourceforge.net<mailto:dbpedia-discussion@lists.sourceforge.net>
Subject: Re: [Dbpedia-discussion] DBpedia SPARQL error when applying JENA

Hi Mehmet,

I think you used the wrong URL for the sparql endpoint, you should have used 
"http://dbpedia.org/sparql";<http://dbpedia.org/sparql> instead of 
"http://dbpedia.org/snorql";<http://dbpedia.org/snorql> . Try changing that in 
your code and tell us if you still get errors.

Cheers,
Alexandru

On 03/05/2014 12:12 PM, Mehmet Ali Abdulhayoglu wrote:
Hi everyone,

I am trying to retrieve some data from DBpedia by means of jena library. But 
when I apply my code as below I encounter an error
as stated below.

I could not be sure if here is the right environment to place my question but I 
could not find any help through web.

Thanks in advance.

Mehmet


My CODE:

package connectingurl;

import com.hp.hpl.jena.query.*;



public class DBpediaQuery {

    public static void main( String[] args ) {

       String s2 = "PREFIX yago: 
<http://dbpedia.org/class/yago/><http://dbpedia.org/class/yago/>\n" +
                   "PREFIX onto: 
<http://dbpedia.org/ontology/><http://dbpedia.org/ontology/>\n" +
                   "PREFIX rdf: 
<http://www.w3.org/1999/02/22-rdf-syntax-ns#><http://www.w3.org/1999/02/22-rdf-syntax-ns>\n"
 +
                   "PREFIX dbpedia: 
<http://dbpedia.org/><http://dbpedia.org/>\n" +
                   "PREFIX owl: 
<http://www.w3.org/2002/07/owl#><http://www.w3.org/2002/07/owl>\n" +
                   "PREFIX dbpedia-owl: 
<http://dbpedia.org/ontology/><http://dbpedia.org/ontology/>\n" +
                   "PREFIX rdfs: 
<http://www.w3.org/2000/01/rdf-schema#><http://www.w3.org/2000/01/rdf-schema>\n"
 +
                   "PREFIX dbpprop: 
<http://dbpedia.org/property/><http://dbpedia.org/property/>\n" +
                   "PREFIX foaf:    
<http://xmlns.com/foaf/0.1/><http://xmlns.com/foaf/0.1/>\n" +

           "SELECT DISTINCT *\n" +
                    "WHERE {\n" +
                       "?city      rdf:type dbpedia-owl:PopulatedPlace .\n" +
                       "?city      rdfs:label ?label.\n" +
                       "?city      dbpedia-owl:country ?country .\n" +
                       "?country   dbpprop:commonName  ?country_name.\n" +

                       "OPTIONAL  { ?city   foaf:isPrimaryTopicOf   ?web }.\n" +

                       "FILTER (  lang(?label) = \"en\" && regex(?country, 
'Germany') && regex(?label, 'Homburg')) \n" +
                    "} \n" +
                    "";

                Query query = QueryFactory.create(s2); //s2 = the query above
                QueryExecution qExe = QueryExecutionFactory.sparqlService( 
"http://dbpedia.org/snorql";<http://dbpedia.org/snorql>, query );
        //QueryExecution qExe = QueryExecutionFactory.create( query );
                ResultSet results = qExe.execSelect();
                ResultSetFormatter.out(System.out, results, query) ;


    }

}


The ERROR:

Exception in thread "main" org.apache.http.conn.ssl.SSLInitializationException: 
Failure initializing default system SSL context
                at 
org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:368)
                at 
org.apache.http.conn.ssl.SSLSocketFactory.getSystemSocketFactory(SSLSocketFactory.java:204)
                at 
org.apache.http.impl.conn.SchemeRegistryFactory.createSystemDefault(SchemeRegistryFactory.java:82)
                at 
org.apache.http.impl.client.SystemDefaultHttpClient.createClientConnectionManager(SystemDefaultHttpClient.java:118)
                at 
org.apache.http.impl.client.AbstractHttpClient.getConnectionManager(AbstractHttpClient.java:466)
                at 
org.apache.http.impl.client.AbstractHttpClient.createHttpContext(AbstractHttpClient.java:286)
                at 
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:851)
                at 
org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:137)
                at 
org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:118)
                at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:1043)
                at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:320)
                at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:382)
                at 
com.hp.hpl.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:326)
                at 
com.hp.hpl.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:276)
                at 
com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:345)
                at connectingurl.DBpediaQuery.main(DBpediaQuery.java:51)
Caused by: java.io.IOException: Keystore was tampered with, or password was 
incorrect
                at 
sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:772)
                at 
sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
                at java.security.KeyStore.load(KeyStore.java:1214)
                at 
org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:281)
                at 
org.apache.http.conn.ssl.SSLSocketFactory.createSystemSSLContext(SSLSocketFactory.java:366)
                ... 15 more
Caused by: java.security.UnrecoverableKeyException: Password verification failed
                at 
sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:770)
                ... 19 more
Process exited with exit code 1.



------------------------------------------------------------------------------

Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.

With Perforce, you get hassle-free workflows. Merge that actually works.

Faster operations. Version large binaries.  Built-in WAN optimization and the

freedom to use Git, Perforce or both. Make the move to Perforce.

http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk



_______________________________________________

Dbpedia-discussion mailing list

Dbpedia-discussion@lists.sourceforge.net<mailto:Dbpedia-discussion@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to