I have tested with the version 3.2.2 of BigOWLIM and the problem seems to be always the same :

java.io.NotSerializableException: com.ontotext.trree.SailConnectionImpl java.io.NotSerializableException: com.ontotext.trree.SailConnectionImpl at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 1156) at java.io.ObjectOutputStream.defaultWriteFields (ObjectOutputStream.java:1509) at java.io.ObjectOutputStream.writeSerialData (ObjectOutputStream.java:1474) at java.io.ObjectOutputStream.writeOrdinaryObject (ObjectOutputStream.java:1392) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java: 1150) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java: 326)
        at java.util.HashSet.writeObject(HashSet.java:267)

Statements retrieved from a repository result are not serializable. However, if I create a new instance of StatementImpl like that :

new StatementImpl(new URIImpl(stmt.getSubject ().stringValue()), new URIImpl( stmt.getPredicate().stringValue()), new BNodeImpl (stmt.getObject()
                  .stringValue()))

It is okay, but I am not sure it is a good solution. Moreover, I have a problem because I have to do same with TupleQueryResult and I don't see how to create a new by using TupleQueryResultImpl. TupleQueryResult don't only contains 3 String for value like Statement.

Thanks.

Kind Regards
Laurent

Le 16 sept. 2009 à 16:45, owlim-discussion-requ...@ontotext.com a écrit :

Send OWLIM-discussion mailing list submissions to
        owlim-discussion@ontotext.com

To subscribe or unsubscribe via the World Wide Web, visit
        http://ontotext.com/mailman/listinfo/owlim-discussion
or, via email, send a message with subject or body 'help' to
        owlim-discussion-requ...@ontotext.com

You can reach the person managing the list at
        owlim-discussion-ow...@ontotext.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of OWLIM-discussion digest..."


Today's Topics:

  1. Re: Write operation and Serialization of results
     (Damyan Ognyanoff)
  2. Re: Problem getting the direct type of an  instance
     (Damyan Ognyanoff)
  3. Re: directsubclass bug? (Damyan Ognyanoff)


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

Message: 1
Date: Wed, 16 Sep 2009 17:34:20 +0300
From: "Damyan Ognyanoff" <dam...@sirma.bg>
Subject: Re: [Owlim-discussion] Write operation and Serialization of
        results
To: "Laurent PELLEGRINO" <laurent.pellegr...@sophia.inria.fr>,
        <owlim-discussion@ontotext.com>
Message-ID: <949e17c299d34c9bb4235f2ef647d...@sirma.int>
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
        reply-type=response

Hi Laurent,

couldn't reproduce your first exception - is it possible to isolate it to a
small example code so to be able to fix it ..

about your second issue related to serialization - I've fixed it and a
distribution is available at http://www.ontotext.come/owlim the new version
is SwiftOWLIM v3.0.11:
http://www.ontotext.com/owlim/swiftowlim-3.0.beta11-sesame-2.0.zip

apart from the above fix it also improves the directType, directSubClassOf and directSubPropertyOf handling so that these consider also the equivalent
classes and subClass(Property)Of reflexivity correctly

regards,
Damyan
----- Original Message -----
From: "Laurent PELLEGRINO" <laurent.pellegr...@sophia.inria.fr>
To: <owlim-discussion@ontotext.com>
Sent: Monday, September 14, 2009 12:38 PM
Subject: [Owlim-discussion] Write operation and Serialization of results


Dear all,

I have a problem with write operation on an OWLIM repository.

I can perform a query operation but when I try to perform a write
operation I get the following exception :

[ERROR exceptions.one_way] java.lang.RuntimeException: Connection is
closed
java.lang.RuntimeException: Connection is closed
at com.ontotext.trree.SailConnectionImpl.addStatement(Unknown Source) at org.openrdf.repository.sail.SailRepositoryConnection.addWithoutCommit
(SailRepositoryConnection.java:228)
at org.openrdf.repository.base.RepositoryConnectionBase.addWithoutCommit
(RepositoryConnectionBase.java:549)
at org.openrdf.repository.base.RepositoryConnectionBase.add
(RepositoryConnectionBase.java:449)
at
eu.soa4all.dsb.space.proactive.datastorage.rdf.owlim.OWLIMStorage.write
(OWLIMStorage.java:88)

My write method is the following :

public void write(Statement stmt) {
       RepositoryConnection conn = null;
       try {
           conn = this.repository.getConnection();
           System.out.println("isOpen=" + conn.isOpen());
           conn.add(stmt, new URIImpl(spaceURI.toString()));
       } catch (RepositoryException e) {
           e.printStackTrace();
       } finally {
           try {
               conn.close();
           } catch (RepositoryException e) {
               e.printStackTrace();
           }
       }
   }

The sysout return isOpen=true.

Does someone has an idea of the problem ?


My second problem is about Serialization. I am retrieving Statements from an OWLIM repository. I put each Statement in a Set and i transmit this Set to another JVM on an another machine. Objects need to be Serializable
and it seems that Statement are not Serializable.

I am cheating by using this kind of method :

for (Statement stmt : mySet) {
           newSet.add(new StatementImpl(new URIImpl(stmt.getSubject
().stringValue()), new URIImpl(
                   stmt.getPredicate().stringValue()), new BNodeImpl
(stmt.getObject()
                   .stringValue())));
}


The problem is that I am not sure that new BNodeImpl(stmt.getObject
().stringValue())) will be the same that stmt.getObject. Is it right ?

I will have the same problem with TupleQueryResult. How to Serialize
these two kinds of results ?

Thanks.

Kind Regards
Laurent PELLEGRINO
_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion



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

Message: 2
Date: Wed, 16 Sep 2009 17:40:54 +0300
From: "Damyan Ognyanoff" <dam...@sirma.bg>
Subject: Re: [Owlim-discussion] Problem getting the direct type of an
        instance
To: "Stefan Nesbigall" <stefan.nesbig...@dfki.de>,
        <owlim-discussion@ontotext.com>
Message-ID: <8cf91738fee046c78320d1f472974...@sirma.int>
Content-Type: text/plain; format=flowed; charset="UTF-8";
        reply-type=original

Hi Stefan,

it is very strange to observe such behavior - in swiftowlim we do not use external engine to evaluate queries and all triple pattern requests are
handled through getStatements() so there is no reason to get different
results from query evaluation and by simply invoking getStataments() - these are routed to one and the same piece of code - Could you check your code related to enumeration of query results - there is a possibility to somehow
silently fetch and ignore the first result ...


regards,
Damyan
----- Original Message -----
From: "Stefan Nesbigall" <stefan.nesbig...@dfki.de>
To: <owlim-discussion@ontotext.com>
Sent: Tuesday, September 08, 2009 1:21 PM
Subject: [Owlim-discussion] Problem getting the direct type of an instance


Hi every one

I have little problem since owlim does not find the direct type of
instances.
Somewhere in my ontology I have the following instance defined:

<messemodul:button rdf:about="#RedButton"/>

My OWLIM system does is able to load the ontology into the triple store.
By this
RepositoryResult<Statement> iter =
repositoryConn.getStatements("http://134.96.184.229/isreal/messemodul_abox.owl#RedButton ",
null, null, true);
I get several triple including
(http://134.96.184.229/isreal/messemodul_abox.owl#RedButton,
http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
http://134.96.184.229/isreal/messemodul.owl#button)
(http://134.96.184.229/isreal/messemodul_abox.owl#RedButton,
http://www.w3.org/1999/02/22-rdf-syntax-ns#type,
http://www.w3.org/2002/07/owl#Thing)

But when I use this sparql query:
SELECT ?pred ?obj WHERE {
<http://134.96.184.229/isreal/messemodul_abox.owl#RedButton>?pred ? obj .
}

I do not get the first triple saying that RedButton is a button. I just
get all the other triples.
Using a ask query:
ASK { <http://134.96.184.229/isreal/messemodul_abox.owl#RedButton>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://134.96.184.229/isreal/messemodul.owl#button> . }

I get true.
Can anyone help?
Best regards
Stefan



-------------------required by german law--------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany

Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313
-------------------------------------------------------------

_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion




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

Message: 3
Date: Wed, 16 Sep 2009 17:45:17 +0300
From: "Damyan Ognyanoff" <dam...@sirma.bg>
Subject: Re: [Owlim-discussion] directsubclass bug?
To: "Armando Stellato" <stell...@info.uniroma2.it>,
        <owlim-discussion@ontotext.com>
Message-ID: <080c825386aa4d429b26c2727475c...@sirma.int>
Content-Type: text/plain; charset="iso-8859-1"

Hi Armando,

I've fixed the handling of directType/SubClassOf/SubPropertyOf predicates so to consider owl:equivalentClass and owl:equivalenProperty while performing the task (also the reflexivity of both is considered) so your queries should be much simpler and run just fine using only the system predicates

let me k now if you experience eny issues with that feature

the new distibution could be downloaded from our site:

SwiftOWLIM v3.0.11: 
http://www.ontotext.com/owlim/swiftowlim-3.0.beta11-sesame-2.0.zip

HTH,
Damyan
 ----- Original Message -----
 From: Armando Stellato
 To: owlim-discussion@ontotext.com
 Sent: Saturday, September 05, 2009 7:37 PM
 Subject: Re: [Owlim-discussion] directsubclass bug?


 .ops, I forgot to mention my configuration:



 Owlim 3 beta 10



 This is the config in the owlim.ttl file:



 #

 # Sesame configuration template for a owlim repository

 #

 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

 @prefix rep: <http://www.openrdf.org/config/repository#>.

 @prefix sr: <http://www.openrdf.org/config/repository/sail#>.

 @prefix sail: <http://www.openrdf.org/config/sail#>.

 @prefix owlim: <http://www.ontotext.com/trree/owlim#>.



 [] a rep:Repository ;

    rep:repositoryID "odnamarExample" ;

    rdfs:label "Odnamar Example" ;

    rep:repositoryImpl [

       rep:repositoryType "openrdf:SailRepository" ;

       sr:sailImpl [

          sail:sailType "swiftowlim:Sail" ;

          owlim:ruleset "owl-max" ;

        owlim:partialRDFS  "true" ;

          owlim:noPersist "false" ;

          owlim:storage-folder "odnamar-storage" ;

              owlim:base-URL "http://www.fao.org/aims/aos/agrovoc#"; ;

          owlim:new-triples-file "new-triples-file.nt" ;

          owlim:entity-index-size "200000" ;

          owlim:jobsize "200" ;

              owlim:repository-type "in-memory-repository" ;

owlim:imports "./src/main/resources/ontologies/ owl.rdfs;" ;

              owlim:defaultNS "http://www.w3.org/2002/07/owl#;";



       ]

    ].







 From: Armando Stellato [mailto:stell...@info.uniroma2.it]
 Sent: Saturday, September 05, 2009 6:35 PM
 To: 'owlim-discussion@ontotext.com'
 Subject: directsubclass bug?



 Hi all,



Loaded an empty repository, asked for triples with predicate SESAME:DIRECTSUBCLASSOF and got a lot of triples like:



 X SESAME:DIRECTSUBCLASSOF X



 While direct sub class semantics (from its javadoc) clearly states:



     Class A is a direct subclass of B iff:

        1. A is a subclass of B and;

        2. A and B are not equa and;

        3. there is no class C (unequal A and B) such that

           A is a subclass of C and C of B.



 So this seems to clash with condition 2.



 Is it a bug in owlim?



 Armando









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


 _______________________________________________
 OWLIM-discussion mailing list
 OWLIM-discussion@ontotext.com
 http://ontotext.com/mailman/listinfo/owlim-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ontotext.com/mailman/private/owlim-discussion/attachments/20090916/b14a46cd/attachment.html >

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

_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion


End of OWLIM-discussion Digest, Vol 8, Issue 5
**********************************************

_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion

Reply via email to