Insert instance error

52 views
Skip to first unread message

Roland Cornelissen

unread,
Jul 13, 2014, 9:31:31 AM7/13/14
to ontowi...@googlegroups.com
Hi,

I have this situation where I try to add a new instance of the type
Project and get the error: 'error while post request: Internal Server
Error'.
The full error is below [1]. It appears that the instance trying to
insert has some 'mandatory' properties I did not know of, and do not
want to specify at the creation of the instance. How can I get rid of
this these 'mandatory properties'?

Thanks,
Roland


[1]
2014-07-13T15:23:30+02:00 EMERG (0): Erfurt_Store_Adapter_Exception:
SPARQL Error: [unixODBC][OpenLink][Virtuoso iODBC Driver][Virtuoso
Server].....: Empty string is not a valid argument to iri_to_id (), type
217 ()

In query: INSERT INTO GRAPH
<http://fablab.metamatter.nl/resource/>
{<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#NamedIndividual> .
<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://www.w3.org/2000/01/rdf-schema#seeAlso> <> .
<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://fablab.metamatter.nl/ns/projectGoal> <> .
<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://www.w3.org/2000/01/rdf-schema#label> "3D Printed
Arduino Controlled Eggbot/Spherepot" .
<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://www.w3.org/2000/01/rdf-schema#isDefinedBy>
<http://www.instructables.com/id/3D-Printed-Arduino-Controlled-EggbotSpherepot>
.
<http://fablab.metamatter.nl/resource/owl_NamedIndividual/3D_Printed_Arduino_Controlled_EggbotSpherepot>
<http://www.w3.org/2000/01/rdf-schema#comment> "First off
this project was a combination of of two great online resources. I had
been looking into building an eggbot for a while and since I had a lot
of ping pong balls on hand after one of my other videos the time was
right for making my SphereBot that could write on ping pong balls. After
doing some research online I found that there were already some
brilliant designs out there. The 3D printed design came from
Glasswalker's page on thingverse
(http://www.thingiverse.com/thing:20398) and the Arduino schematic and
setup came from a page on Pleasant Software's blog
(http://pleasantsoftware.com/developer/3d/spherebot/). I simply put
these two designs and will document my building experience of a (mostly)
3D printed SphereBot in this
instructable."^^<http://ns.ontowiki.net/SysOnt/Markdown> .
} ->
/var/www/OntoWiki/libraries/Erfurt/library/Erfurt/Store/Adapter/Virtuoso.php@1089

Natanael Arndt

unread,
Jul 13, 2014, 9:50:16 AM7/13/14
to ontowi...@googlegroups.com, Andreas Nareike
Hello Roland,
thank you for reporting this issue. It is already known and I've filed a
new bug for RDFauthor now [1] the according OntoWiki issue is at [2].
Unfortunately it is not jet fixed. I hope Andreas can fix it this week.

[1] https://github.com/AKSW/RDFauthor/issues/42
[2] https://github.com/AKSW/OntoWiki/issues/274

Thank you
Natanael

Roland Cornelissen

unread,
Jul 13, 2014, 10:18:52 AM7/13/14
to ontowi...@googlegroups.com
Hi Nate,

Now I understand I can remove the properties presented in the box where you add an instance.
This way 'mandatories' are removed and my problem is gone :-)

Thanks,
Roland

Natanael Arndt

unread,
Jul 13, 2014, 10:40:57 AM7/13/14
to ontowi...@googlegroups.com
Ah year, I wanted to tell you this workaround, but forgot it ;-)
The properties should not be 'mandatories', it is a bug.

Natanael
--

---
You received this message because you are subscribed to the Google Groups "OntoWiki User Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontowiki-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Roland Cornelissen

unread,
Jul 13, 2014, 11:27:49 AM7/13/14
to ontowi...@googlegroups.com
Hi Nate,
Something else:
I am unable to delete a property from an instance i have previously entered; when I submit a delete, the property just remains there. Unable to delete it; I can /add/ new values for the same property within the same range (Literal or Resource), but I cannot delete them.

Thanks,
Roland
>> To unsubscribe from this group and stop receiving emails from it, send an email to ontowiki-use...@googlegroups.com <mailto:ontowiki-use...@googlegroups.com>.

>> For more options, visit https://groups.google.com/d/optout.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "OntoWiki User Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ontowiki-use...@googlegroups.com <mailto:ontowiki-use...@googlegroups.com>.

Natanael Arndt

unread,
Jul 13, 2014, 1:04:03 PM7/13/14
to ontowi...@googlegroups.com
This could have some reasons. To find out, what is the cause, can you please follow those steps?

1. Did you disable the cache?
2. Are you able to delete the property using the Source Tab?
3. Do you use virtuoso and can you try to delete the property using isql-vt/isql-v?

All the best
Natanael

Olivier Dalang

unread,
Jul 21, 2014, 6:15:29 AM7/21/14
to ontowi...@googlegroups.com
Hi,

I have the same problem here.

I noticed it in particular with properties of type <http://www.opengis.net/ont/geosparql#geometry>

Below's an example resource where I can't delete the geometry property. It works well with the other properties.

1. I disabled cache : no change.
2. I'm not able to delete it through the source tab neither.
3. I use virtuoso but am not sure on how to do the suggested test (I'd be happy to try with further explanations).

Thanks !

Olivier



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

# Exported with the Erfurt API - http://aksw.org/Projects/Erfurt


ns0:itb_street_source_61 ns0:belongs_to ns0:source_ITB_EL_STR_2009 ;
                         ns1:geometry "MULTILINESTRING((12.332080 45.434664,12.332067 45.434677,12.331862 45.434868,12.331697 45.435009,12.331614 45.435079,12.331531 45.435150))"^^ns2:Geometry ;
                         a ns0:class_street ;
                         rdfs:label "ITB Street (source)" .




To unsubscribe from this group and stop receiving emails from it, send an email to ontowiki-use...@googlegroups.com.

Natanael Arndt

unread,
Jul 21, 2014, 10:15:03 AM7/21/14
to ontowi...@googlegroups.com
Am 21.07.2014 12:15, schrieb Olivier Dalang:
Hi,

I have the same problem here.

I noticed it in particular with properties of type <http://www.opengis.net/ont/geosparql#geometry>

Below's an example resource where I can't delete the geometry property. It works well with the other properties.

1. I disabled cache : no change.
2. I'm not able to delete it through the source tab neither.
3. I use virtuoso but am not sure on how to do the suggested test (I'd be happy to try with further explanations).
Hello Oliver,
you can connect to isql with isql-vt or isql-v, depending on what is installed on your system, and username and password e.g.:

$ isql-vt -U dba -P dba

at the prompt you can run any SPARQL 1.1 query (as supported by virtuoso) with a leading “sparql” e.g.:

SQL> sparql select ?s {?s ?p ?o} limit 1 ;

(don't forget the semicolon)

All the best
Natanael

Olivier Dalang

unread,
Jul 21, 2014, 11:13:54 AM7/21/14
to ontowi...@googlegroups.com
Hi !

OK I tried and have been able to delete the triple without problem using this SPARQL query (with isql though, since I didn't find isql-v nor isql-vt on my system) :

SPARQL
DELETE FROM <http://dhlabpc2.epfl.ch/OntoWiki/vtm/>
{
    ?s ?p ?o .
}
WHERE
{
    ?s ?p ?o
    FILTER( ?s = <http://dhlabpc2.epfl.ch/OntoWiki/vtm/#itb_street_source_61> )
    FILTER( ?p = <http://www.opengis.net/ont/geosparql#geometry> )
};

Bests,

Olivier Dalang
---
Digital Humanities Lab (DHLAB) - http://dhlab.epfl.ch
EPFL CDH DHLAB  / CM 2 271
Station 10 / CH-1015 Lausanne
Tel. +41 21 693 02 46




Natanael Arndt

unread,
Jul 22, 2014, 10:27:58 AM7/22/14
to ontowi...@googlegroups.com
Hi Olivier,
did you try queries other than the filter query as well? E.g.

… WHERE {
<http://dhlabpc2.epfl.ch/OntoWiki/vtm/#itb_street_source_61> <http://www.opengis.net/ont/geosparql#geometry> ?o .
}

Because I had a similar problem before and tried to delete triples with a pattern like this (without filter) and didn't succeed. This could be the reason for OntoWiki not being able to delete the triple, since it uses like this (if I'm not mistaken).

Thank you
Natanael

Olivier Dalang

unread,
Jul 22, 2014, 11:22:58 AM7/22/14
to ontowi...@googlegroups.com
Hi Natanael,

The following query has no effect (but returns no error either) :

SPARQL
DELETE FROM <http://dhlabpc2.epfl.ch/OntoWiki/vtm/>
{
    ?s ?p ?o .
}
WHERE {

But the following one works as expected (deletes the triple) :

SPARQL
DELETE FROM <http://dhlabpc2.epfl.ch/OntoWiki/vtm/>
{
    ?s ?p ?o .
}
WHERE {

I'm not really sure if the first one is supposed the work in SPARQL, I find the doc ( http://www.w3.org/TR/sparql11-update/#deleteData ) not really clear about this...

Best regards,

Olivier Dalang
---
Digital Humanities Lab (DHLAB) - http://dhlab.epfl.ch
EPFL CDH DHLAB  / CM 2 271
Station 10 / CH-1015 Lausanne
Tel. +41 21 693 02 46

--

Natanael Arndt

unread,
Jul 22, 2014, 11:55:15 AM7/22/14
to ontowi...@googlegroups.com
Ok, maybe I don't understand the DELETE queries, but I will check, how OntoWiki/Erfurt deletes and if this is  the SPARQL way …

Thank you very much.

Natanael

Olivier Dalang

unread,
Oct 15, 2014, 5:39:22 AM10/15/14
to ontowi...@googlegroups.com
Hi !

Any news on this ? Is there an issue on Github I can subscribe to so I'll know when it's corrected ? (or should I create the issue ?)

Thanks !

Olivier Dalang
---
Digital Humanities Lab (DHLAB) - http://dhlab.epfl.ch
EPFL CDH DHLAB  / CM 2 271
Station 10 / CH-1015 Lausanne
Tel. +41 21 693 02 46



Olivier Dalang

unread,
Oct 22, 2014, 12:29:48 PM10/22/14
to ontowi...@googlegroups.com, Natanael Arndt
Hi !

Being stuck because of this bug, I had a look at the source and found this :


if ($this->_isOpenSourceVersion) {
    if ($datatype === 'http://www.openlinksw.com/schemas/virtrdf#Geometry') {
        $datatype = null;
    }
}
 
It looked as if this was the cause of my problems, since it removes the datatype from the query, and therefore doesn't delete the triple anymore.

I tried to remove these lines (anyway since version 7 geometry related functions are part of Virtuoso Open-Source), but the bug remains. I'm still not able to delete those triples, and trying to alter a geometry through Ontowiki still ends up in adding a new one.

I tried some direct SPARQL queries, and the bug seem to come from Virtuoso, so I just asked on their ML : http://sourceforge.net/p/virtuoso/mailman/message/32959120/

In the mean time, do you have an idea of a workaround ? Or am I missing something ? I'm stuck with this :/

Thanks in advance !

Natanael Arndt

unread,
Oct 22, 2014, 12:37:24 PM10/22/14
to ontowi...@googlegroups.com
Hello Olivier,
yes I remember those lines :-) Virtuoso was doing crazy stuff with this property in some Version. So it should be same to remove those lines in your case, but we should maybe also add some version check.

Is you issue ony happening for the geo properties or for other properties as well? Did you disable the OntoWiki cache?

Natanael

Olivier Dalang

unread,
Oct 22, 2014, 12:47:45 PM10/22/14
to ontowi...@googlegroups.com, Natanael Arndt
Hi,

As far as I noticed, I only happens for geo properties. Yes cache is disabled in config.ini :
cache.enable       = false
cache.query.enable = false

But as stated in my post on the virtuoso-user ML, I get the problem of deleting geo properties even in plain SPARQL. It looks like a problem of theirs... unless there's something I didn't understand about geosparql.

I'd love to try Strabon or Parliament, which seem a bit more robust/powerful in regard of geoSparql, but I don't think I'll be able to run Ontowiki with those ?

Bests,


Olivier Dalang
---
Digital Humanities Lab (DHLAB) - http://dhlab.epfl.ch
EPFL CDH DHLAB  / CM 2 271
Station 10 / CH-1015 Lausanne



Natanael Arndt

unread,
Oct 23, 2014, 4:57:39 AM10/23/14
to Olivier Dalang, ontowi...@googlegroups.com
For completely disabling the cache you should also set:

cache.frontend.enable = false

I don't know anything about GeoSPARQL but if Strabon or Parliament are just Triple Stores you should be able to develop an adapter for Erfurt, which implements: Erfurt_Store_Adapter_Interface If you think you will use it more than just for playing around.

All the best
Natanael
Reply all
Reply to author
Forward
0 new messages