Hi Damyan,
Thank you for your response. The Connection closed seems to be a
problem on an another part of my application.
Concerning the serialization problem, I am using BigOWLIM. Do you have
a new version of BigOWLIM with this fixed issue ?
Thanks.
Kind Regards
Laurent
Le 16 sept. 2009 à 16:34, Damyan Ognyanoff a écrit :
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
_______________________________________________
OWLIM-discussion mailing list
OWLIM-discussion@ontotext.com
http://ontotext.com/mailman/listinfo/owlim-discussion