Hi Akhilesh,
I reduced your setup to something outside Fuseki:insert some data
* check it is as expected
* DROP GRAPH
* check it is not there
public static void main(String ... a) {
sdb.sdbtruncate.main("--sdb=sdb.ttl", "--confirm") ;
sdb.sdbupdate.main("--sdb=sdb.ttl", "INSERT DATA { GRAPH
<x:gx> { <x:sx> <x:px> <x:ox> } }");
sdb.sdbquery.main("--sdb=sdb.ttl", "SELECT * { { GRAPH ?g { ?s
?p ?o } } UNION { ?s ?p ?o } }");
sdb.sdbdump.main("--sdb=sdb.ttl");
sdb.sdbupdate.main("--sdb=sdb.ttl", "DROP GRAPH <x:gx>") ;
sdb.sdbquery.main("--sdb=sdb.ttl", "SELECT * { { GRAPH ?g { ?s
?p ?o } } UNION { ?s ?p ?o } }");
}
(sdbupdate is new, not in 3.0.1)
or the same run as command scripts from the command line.
The same via Fuseki would also illustrate the problem but it's easier to
debug outside Fuseki.
JENA-1132 <https://issues.apache.org/jira/browse/JENA-1132>
It turns out that it got fixed (or rather rewritten out of existence) as
part of wider changes from ARQ.
So please give the snapshot build a try [*]
Thanks
Andy
[*]
https://repository.apache.org/content/repositories/snapshots/org/apache/jena/apache-jena-fuseki/
build 46 or later.
On 08/02/16 12:17, Bangalore Akhilesh wrote:
Hi Andy,
Sorry the examples got damaged. Please find them below along with other
details.
I had built the source from git tagged at jena-3.0.1-rc1.
The versions and other environment details are:
1. Jena - 3.0.1
2. Fuseki - 2.3.1
3. SDB - 3.0.1
4. OS - Windows 7 + Oracle Linux 6
5. Web app server - Tomcat 8 on Windows 7
6. Database server - Oralce 11g on Oracle Linux 6
*Note*: The problem was reproduced even when SDB is configured to connect
to MySQL as well!
1. *Fuseki configuration* (place under *C:\etc\fuseki* or */etc/fuseki*)
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
# ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "30000" ] ;
ja:loadClass "org.apache.jena.sdb.SDB" ;
.
2. *SDB configuration* (place under *C:\etc\fuseki\configuration* or
*/etc/fuseki/configuration*)
*(a) For Oracle*
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
:service_sdb_all rdf:type fuseki:Service ;
rdfs:label "SDB - Oracle" ;
fuseki:name "oracle" ;
fuseki:serviceQuery "query", "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset :sdb_dataset_readwrite ;
.
:sdb_dataset_readwrite rdf:type sdb:DatasetStore ;
sdb:store :rdbms_datastore
.
:rdbms_datastore rdf:type sdb:Store ;
sdb:layout "layout2" ;
sdb:connection :oracle_data_conn ;
.
:oracle_data_conn rdf:type sdb:SDBConnection ;
sdb:sdbType "oracle" ;
sdb:driver "oracle.jdbc.driver.OracleDriver" ;
sdb:jdbcURL "jdbc:oracle:thin:@localhost:1521/xe" ;
sdb:sdbUser "username" ;
sdb:sdbPassword "password" ;
. (b) For MySQL * @prefix : <#> . @prefix fuseki:
<http://jena.apache.org/fuseki# <http://jena.apache.org/fuseki#>> . @prefix
rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#
<http://www.w3.org/1999/02/22-rdf-syntax-ns#>> . @prefix rdfs:
<http://www.w3.org/2000/01/rdf-schema#
<http://www.w3.org/2000/01/rdf-schema#>> . @prefix sdb:
<http://jena.hpl.hp.com/2007/sdb# <http://jena.hpl.hp.com/2007/sdb#>> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#
<http://jena.hpl.hp.com/2005/11/Assembler#>> . :service_sdb_all rdf:type
fuseki:Service ; rdfs:label "SDB - MySQL" ; fuseki:name "mysql" ;
fuseki:serviceQuery "query", "sparql" ; fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ; fuseki:dataset :sdb_dataset_readwrite
; . :sdb_dataset_readwrite rdf:type sdb:DatasetStore ; sdb:store
:rdbms_datastore . :rdbms_datastore rdf:type sdb:Store ; sdb:layout
"layout2" ; sdb:connection :mysql_data_conn ; sdb:engine "MyISAM" ; .
:mysql_data_conn rdf:type sdb:SDBConnection ; sdb:sdbType "MySQL" ;
sdb:jdbcURL "jdbc:mysql://localhost:3306/triplestore" ; sdb:driver
"com.mysql.jdbc.Driver" ; sdb:sdbUser "user" ; sdb:sdbPassword "password" ;
. *
3. *Steps Followed*
I have created fuseki.war after including the ojdbc6.jar (or)
mysql-connector-java-5.0.8-bin.jar & jena-sdb.3.0.1.jar in the lib folder
and deployed it on Tomcat 8.
*Step 1:*
On successful deploy, I had accessed Fuseki's UI for executing queries
and created a named graph with a triple by accessing the sparql update end
point http://localhost:8080/fuseki/oracle/update
insert data{ graph <urn:providers:search:google>{ <http://www.google.com>
<http://www.google.com#tab> <http://www.google.com/images> . } }
*Step 2:*
Then I executed the below query against sparql query end point
http://localhost:8080/fuseki/oracle/query
select ?g ?s ?p ?o { graph ?g { ?s ?p ?o } }
This returned the triple which was inserted in Step 1.
*Step 3:*
I had again accessed the sparql update end point. This time to execute
the query to drop the named graph.
drop graph <urn:providers:search:google>
This returned a success status code.
*Step 4:*
I then again executed the query from Step 2. The named graph and the
triple still persisted!
*Step 5:*
I then tried the query to delete all the triples in the named graph
against the sparql update end point.
with <urn:providers:search:google> delete {?s ?p ?o} where {?s ?p ?o}
This deleted the triples along with the graph!
Thanks,
Akhilesh
On Thu, Feb 4, 2016 at 8:06 PM, Andy Seaborne <[email protected]> wrote:
Akhilesh,
Please can you provide a complete, minimal example including the Fuseki
configuration together with details of your environment (version numbers of
Jena/Fuseki/SDB, OS, webapp server, etc.)
There are too many unknowns here at the moment to accurate recreate the
situation.
Your examples below seem to have got damaged in email. A pastebin might
be safer.
Andy
PS I don't have an Oracle instance for testing - I have MySQL, H2, HSQL,
or Apache Derby.
On 04/02/16 08:30, Bangalore Akhilesh wrote:
Hi Rob,
The response remained the same even with DROP GRAPH <iri>.
Below are the sequence of requests that were issued:
Step 1:
Request
Response
POST http://localhost:8080/fuseki/oracle/update
Accept: application/sparql-results+json
Content-Type: application/sparql-update
insert data{
graph <urn:providers:search:google>{
<http://www.google.com>
<http://www.google.com#tab>
<http://www.google.com/images>
}
}
Status 204 No Content
Step 2:
Request
Response
POST http://localhost:8080/fuseki/oracle/query
Accept: application/sparql-results+json
Content-Type: application/sparql-query
select ?g ?s ?p ?o
{
graph ?g
{
?s ?p ?o
}
}
Status 200 OK
{
"head": {
"vars": [
"g",
"s",
"p",
"o"
]
},
"results": {
"bindings": [
{
"g": {
"type": "uri",
"value": "urn:providers:search:google"
},
"s": {
"type": "uri",
"value": "http://www.google.com"
},
"p": {
"type": "uri",
"value": "http://www.google.com#tab"
},
"o": {
"type": "uri",
"value": "http://www.google.com/images"
}
}
]
}
}
Step 3:
Request
Response
POST http://localhost:8080/fuseki/oracle/update
Accept: application/sparql-results+json
Content-Type: application/sparql-update
drop graph <urn:providers:search:google>
Status 204 No Content
Step 4:
Request
Response
POST http://localhost:8080/fuseki/oracle/query
Accept: application/sparql-results+json
Content-Type: application/sparql-query
select ?g ?s ?p ?o
{
graph ?g
{
?s ?p ?o
}
}
Status 200 OK
{
"head": {
"vars": [
"g",
"s",
"p",
"o"
]
},
"results": {
"bindings": [
{
"g": {
"type": "uri",
"value": "urn:providers:search:google"
},
"s": {
"type": "uri",
"value": "http://www.google.com"
},
"p": {
"type": "uri",
"value": "http://www.google.com#tab"
},
"o": {
"type": "uri",
"value": "http://www.google.com/images"
}
}
]
}
}
As you can see, the graph is still available!
I have also tried the below request but the graph still remained.
Request
Response
DELETE
http://localhost:8080/fuseki/oracle/graph?graph=urn:providers:search:google
Status 204 No Content
Thanks,
Akhilesh
On Tue, Feb 2, 2016 at 7:03 PM, Rob Vesse <[email protected]> wrote:
How do you verify that the graph is still present?
Also what happens if you run DROP GRAPH <iri>?
The SILENT keyword allows for an operation to fail but to ignore the
failure and return success so if something is going wrong removing the
SILENT keyword allows for the error to be propagated.
Rob
On 02/02/2016 12:59, "Bangalore Akhilesh" <[email protected]>
wrote:
Hi All,
I had setup Fuseki with SDB to work against Oracle.
Today, I had observed that the command *DROP SILENT GRAPH <GRAPH IRI>*
returned a success code but the graph & the triples remained in the
database.
Can anyone please help me out to address this problem?
Thanks,
Akhilesh