Re: feature subset selection using Ontology

2018-08-08 Thread Lorenz Buehmann
Javed...I don't know how many mails you wrote to this list (and the
Protege Users list), but shouldn't you already have learned that you
have to provide more information, data, code, queries, use case, etc. in
order to get help?!

What do you expect as an answer on a question "can we ..." - my answer
is, "yes, you can". And now?

Just to clarify, SPARQL is a query language for RDF data, thus, you can
query any explicit information that is contained in an RDF dataset.


On 08.08.2018 21:56, javed khan wrote:
> Hello
>
> For instance, we have to select some features ( for data mining) , can we
> do it using Semantic Web technologies like Ontology and SPARQL. ?
>
> Thanks
>



Re: Writing an ARQ Extension Function

2018-08-08 Thread Lorenz Buehmann
I'm always wondering how people that are new to Apache Jena still use
the old version. I mean, the first hit via Google is the Apache Jena
webpage which clearly refers to the latest version.

In the current case, he just copied the code example from [1] which
indeed uses the old version given that the blog entry is from 2005.
Well, at this time I didn't know about Semantic Web at all...

[1] http://www.ldodds.com/projects/sparql/LastModified.txt


On 08.08.2018 22:14, Andy Seaborne wrote:
> com.hp.hpl.jena -- that's Jena2.
>
> Packages are "org.apache.jena" in Jena3.
>
> The code seems to have been compiled against Jena2 and run against
> Jena3.  That won't work.
>
>     Andy
>
> On 08/08/18 18:14, Arunkumar Krishnamoorthy wrote:
>> The java code i am executing is,
>>
>> package samplejena;
>>
>> import com.hp.hpl.jena.query.expr.NodeValue;
>> import com.hp.hpl.jena.query.function.FunctionBase1;
>>
>> import java.net.*;
>> import java.text.SimpleDateFormat;
>> import java.util.*;
>>
>> public class LastModified extends FunctionBase1
>> {
>> private static final SimpleDateFormat format = new
>> SimpleDateFormat("-MM-dd'T'HH:mm:ss");
>> private Map _cache;
>> public LastModified()
>> {
>> _cache = new HashMap();
>> }
>> public NodeValue exec(NodeValue nodeValue)
>> {
>> String value = nodeValue.asString();
>> if (_cache.containsKey(value))
>> {
>> return (NodeValue)_cache.get(value);
>> }
>>  String lastModified = "";
>> try {
>> lastModified = getLastModified( nodeValue.asString() );
>> } catch (Exception e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>>
>>  NodeValue date = NodeValue.makeDate(lastModified);
>>  _cache.put(value, date);
>>  return date;
>> }
>> public String getLastModified(String link) throws Exception
>> {
>> URL url = new URL(link);
>> URLConnection connection = url.openConnection();
>> connection.setAllowUserInteraction(false);
>> long secs = connection.getLastModified();
>> String xsdDate = dateToXSD(secs);
>> return xsdDate;
>> }
>> public String dateToXSD(long secs)
>> {
>> Date date = new Date(secs);
>> return format.format(date);
>> }
>> }
>>
>>
>>
>> On Wed, Aug 8, 2018 at 1:14 PM, Arunkumar Krishnamoorthy
>> 
>> wrote:
>>
>>> Hello Andy,
>>>
>>> I am getting the following issue when i run the code,
>>>
>>> Caused by: java.lang.ClassNotFoundException: com.hp.hpl.jena.query.
>>> function.FunctionBase1
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
>>>
>>> I have added the .class file in the directory. Do i need to package the
>>> dependancy jars also? Please advice.
>>>
>>> Regards,
>>> Arun
>>>
>>> On Tue, Aug 7, 2018 at 2:11 PM, Arunkumar Krishnamoorthy <
>>> akris...@ncsu.edu> wrote:
>>>
 It is executing now Andy. Thanks a lot. I missed to add the directory.
 Thanks again for this help.

 On Tue, Aug 7, 2018 at 2:06 PM, Andy Seaborne  wrote:

>
>
> On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote:
>
>> So my JENA_CP
>> is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak
>> /Documents'.
>>
>
> Does the file
>
> /home/ak/Documents/samplejena/LastModified.class
>
> exist?
>
>
>
>> /home/ak/Documents location has the classfile/jar of the code
>>
>> But still when i run this command,
>>
>> /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
>> /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
>>
>> I am getting the below error,
>>
>> ak@akrish12:~$ /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
>> /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
>> 12:41:35 WARN  ClsLoader    :: Class not found:
>> samplejena.LastModified
>> 12:41:35 WARN  exec :: URI
>> 
>> has no registered function factory
>> -
>> | title | r |
>> =
>> -
>>
>>
>> Regards,
>> Arun
>>
>> On Tue, Aug 7, 2018 at 12:20 PM, Andy Seaborne 
>> wrote:
>>
>> The list doesn't accept attachments.
>>>
>>> JENA_CP="$JENA_HOME"'/home/ak/Documents'
>

>>> This needs to be a valid java classpath.
>>>
>>> $JENA_HOME is directory of the Jena installation.
>>>
>>> In the original it says:
>>>
>>> JENA_CP="$JENA_HOME"'/lib/*'
>>>
>>> the .../lib/* (NB single quotes - no * expansion) puts all the
>>> jars in
>>> that direct on the classpath.
>>>
>>> For you:
>>>
>>> JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*'
>>>
>>> You need to add the package/classfile tree for you code.
>>>
>>> As you have: java:samplejena
>>>
>>> Suppoose /DIR is the top of that directory tree so "samplejena" 
>>> is one
>>> directory 

Re: Writing an ARQ Extension Function

2018-08-08 Thread Andy Seaborne

com.hp.hpl.jena -- that's Jena2.

Packages are "org.apache.jena" in Jena3.

The code seems to have been compiled against Jena2 and run against 
Jena3.  That won't work.


Andy

On 08/08/18 18:14, Arunkumar Krishnamoorthy wrote:

The java code i am executing is,

package samplejena;

import com.hp.hpl.jena.query.expr.NodeValue;
import com.hp.hpl.jena.query.function.FunctionBase1;

import java.net.*;
import java.text.SimpleDateFormat;
import java.util.*;

public class LastModified extends FunctionBase1
{
private static final SimpleDateFormat format = new
SimpleDateFormat("-MM-dd'T'HH:mm:ss");
private Map _cache;
public LastModified()
{
_cache = new HashMap();
}
public NodeValue exec(NodeValue nodeValue)
{
String value = nodeValue.asString();
if (_cache.containsKey(value))
{
return (NodeValue)_cache.get(value);
}
 String lastModified = "";
try {
lastModified = getLastModified( nodeValue.asString() );
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

 NodeValue date = NodeValue.makeDate(lastModified);
 _cache.put(value, date);
 return date;
}
public String getLastModified(String link) throws Exception
{
URL url = new URL(link);
URLConnection connection = url.openConnection();
connection.setAllowUserInteraction(false);
long secs = connection.getLastModified();
String xsdDate = dateToXSD(secs);
return xsdDate;
}
public String dateToXSD(long secs)
{
Date date = new Date(secs);
return format.format(date);
}
}



On Wed, Aug 8, 2018 at 1:14 PM, Arunkumar Krishnamoorthy 
wrote:


Hello Andy,

I am getting the following issue when i run the code,

Caused by: java.lang.ClassNotFoundException: com.hp.hpl.jena.query.
function.FunctionBase1
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j

I have added the .class file in the directory. Do i need to package the
dependancy jars also? Please advice.

Regards,
Arun

On Tue, Aug 7, 2018 at 2:11 PM, Arunkumar Krishnamoorthy <
akris...@ncsu.edu> wrote:


It is executing now Andy. Thanks a lot. I missed to add the directory.
Thanks again for this help.

On Tue, Aug 7, 2018 at 2:06 PM, Andy Seaborne  wrote:




On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote:


So my JENA_CP
is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak
/Documents'.



Does the file

/home/ak/Documents/samplejena/LastModified.class

exist?




/home/ak/Documents location has the classfile/jar of the code

But still when i run this command,

/home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
/home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq

I am getting the below error,

ak@akrish12:~$ /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
/home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
12:41:35 WARN  ClsLoader:: Class not found:
samplejena.LastModified
12:41:35 WARN  exec :: URI

has no registered function factory
-
| title | r |
=
-


Regards,
Arun

On Tue, Aug 7, 2018 at 12:20 PM, Andy Seaborne  wrote:

The list doesn't accept attachments.


JENA_CP="$JENA_HOME"'/home/ak/Documents'





This needs to be a valid java classpath.

$JENA_HOME is directory of the Jena installation.

In the original it says:

JENA_CP="$JENA_HOME"'/lib/*'

the .../lib/* (NB single quotes - no * expansion) puts all the jars in
that direct on the classpath.

For you:

JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*'

You need to add the package/classfile tree for you code.

As you have: java:samplejena

Suppoose /DIR is the top of that directory tree so "samplejena"  is one
directory within /DIR.

You then want:

JENA_CP='/home/afs/jlib/apache-jena/lib/*:/DIR'

: is the classpath separator.

  Andy

On 07/08/18 16:25, Arunkumar Krishnamoorthy wrote:

Hello,


I have attached the file with the change, i am getting Could not find
or
load main class arq.arq

My classpath location is /home/ak/Documents. Please let me know
whether
my change is correct.

Regards,
Arun


On Tue, Aug 7, 2018 at 11:11 AM, Andy Seaborne > wrote:

  Hi - Please send email to the jena users mailing list.

  (It is correct if it works!)

   Andy















feature subset selection using Ontology

2018-08-08 Thread javed khan
Hello

For instance, we have to select some features ( for data mining) , can we
do it using Semantic Web technologies like Ontology and SPARQL. ?

Thanks


Re: Question about indexing in text search

2018-08-08 Thread Alysson Gomes
Rob, I tried to load the configuration file (the index.ttl) in the Fuseki
with the following command:

./fuseki-server --conf
/home/alysson/Documents/PUC-Rio/TestJena/tdb-citation-data-en-fuseki-index/index.ttl

but when tried run the query [1] appeared this in the logs:

TextQueryPF WARN  Failed to find the text index: tried context and as a
text-enabled dataset
TextQueryPF WARN  No text index - no text search performed

I searched in google, but not appeared nothing useful. Do you have some
suggestion?

[1] Query
PREFIX text: 
SELECT ?s ?o
WHERE {
?s text:query(  "David") ;
 ?o
}


Em ter, 7 de ago de 2018 às 05:46, Rob Vesse 
escreveu:

> Alysson
>
> It was briefly discussed on the dev list.  The conclusion is that what you
> are trying to do isn't supported as a pure command line task currently.
> You will need to write code or use the Fuseki web server to achieve what
> you want
>
> Rob that
>
> On 06/08/2018, 18:15, "Alysson Gomes"  wrote:
>
> Hi Rob!
> Still about this problem of indexing, do you have some suggestion?
>
> Em qui, 19 de jul de 2018 às 13:59, Alysson Gomes <
> alyssonas...@gmail.com>
> escreveu:
>
> > I did, but as you told the sparql launched an exception:
> > org.apache.jena.sparql.ARQException: Found two matches: var ?root ->
> > http://localhost/jena_example/#text_dataset,
> >
> file:///home/alysson/Documents/PUC-Rio/TestJena/tdb-citation-data-en-fuseki-index/index.ttl#dataset
> >
> >
> > Em qui, 19 de jul de 2018 às 13:13, Rob Vesse 
> > escreveu:
> >
> >> No I can't, the documentation is doing the right thing. A text
> dataset is
> >> fundamentally a wrapper around another dataset so any text indexing
> config
> >> will always require at least two datasets in the configuration file.
> >>
> >> Did you try using the sparql tool instead as I suggested?
> >>
> >> Rob
> >>
> >> On 19/07/2018, 15:25, "Alysson Gomes" 
> wrote:
> >>
> >> Are do you can send an example of a configuration file with
> only one
> >> dataset that contains the index? Because I'm based me in the
> examples
> >> of
> >> the documentation (is must similar to the configuration that I'm
> >> using).
> >>
> >> Em qui, 19 de jul de 2018 às 10:04, Rob Vesse <
> rve...@dotnetrdf.org>
> >> escreveu:
> >>
> >> > Thanks, so your problem was as I suspected
> >> >
> >> > You use tdbquery which does not understand text indexes using
> it as
> >> you
> >> > do.  By using --loc you are only querying your base dataset,
> this
> >> does not
> >> > include your text index so you don't get any results.
> >> >
> >> > I would try using the base sparql tool instead passing in your
> >> > configuration file i.e.
> >> >
> >> > sparql --desc=index.ttl --query=queries.rq
> >> >
> >> > I am not 100% sure this will work because there are two
> datasets
> >> defined
> >> > in your config file (the base dataset and the text indexed
> dataset)
> >> and I
> >> > am not sure which one the sparql tool will pick by default
> >> >
> >> > Rob
> >> >
> >> >
> >> >
> >> >
> >> > On 19/07/2018, 13:47, "Alysson Gomes" <
> alyssonas...@gmail.com>
> >> wrote:
> >> >
> >> > I'm using the file bin of the Jena:
> >> > *tdbquery
> >> >
> >>  --loc=/home/alysson/Documents/PUC-Rio/TestJena/tdb-citation-data-en
> >> > --query=queries.rq*
> >> >
> >> > file *queries.rq*:
> >> > *prefix text:  >> > >select ?s ?owhere{?s
> >> text:query(
> >> >  >> http://dbpedia.org/property/first
> >> > >>
> >> > "David") ; >> > > ?o}*
> >> >
> >> > Em qui, 19 de jul de 2018 às 05:56, Rob Vesse <
> >> rve...@dotnetrdf.org>
> >> > escreveu:
> >> >
> >> > > You still didn’t state how you execute the query, you
> included
> >> > commands
> >> > > for creating the database and index but not the
> command/code
> >> that
> >> > actually
> >> > > makes the query
> >> > >
> >> > >
> >> > >
> >> > > Please show exactly how you are submitting your query
> >> > >
> >> > >
> >> > >
> >> > > Rob
> >> > >
> >> > >
> >> > >
> >> > > From: Alysson Gomes 
> >> > > Reply-To: 
> >> 

Re: Writing an ARQ Extension Function

2018-08-08 Thread Arunkumar Krishnamoorthy
The java code i am executing is,

package samplejena;

import com.hp.hpl.jena.query.expr.NodeValue;
import com.hp.hpl.jena.query.function.FunctionBase1;

import java.net.*;
import java.text.SimpleDateFormat;
import java.util.*;

public class LastModified extends FunctionBase1
{
private static final SimpleDateFormat format = new
SimpleDateFormat("-MM-dd'T'HH:mm:ss");
private Map _cache;
public LastModified()
{
_cache = new HashMap();
}
public NodeValue exec(NodeValue nodeValue)
{
String value = nodeValue.asString();
if (_cache.containsKey(value))
{
return (NodeValue)_cache.get(value);
}
String lastModified = "";
try {
lastModified = getLastModified( nodeValue.asString() );
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

NodeValue date = NodeValue.makeDate(lastModified);
_cache.put(value, date);
return date;
}
public String getLastModified(String link) throws Exception
{
URL url = new URL(link);
URLConnection connection = url.openConnection();
connection.setAllowUserInteraction(false);
long secs = connection.getLastModified();
String xsdDate = dateToXSD(secs);
return xsdDate;
}
public String dateToXSD(long secs)
{
Date date = new Date(secs);
return format.format(date);
}
}



On Wed, Aug 8, 2018 at 1:14 PM, Arunkumar Krishnamoorthy 
wrote:

> Hello Andy,
>
> I am getting the following issue when i run the code,
>
> Caused by: java.lang.ClassNotFoundException: com.hp.hpl.jena.query.
> function.FunctionBase1
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j
>
> I have added the .class file in the directory. Do i need to package the
> dependancy jars also? Please advice.
>
> Regards,
> Arun
>
> On Tue, Aug 7, 2018 at 2:11 PM, Arunkumar Krishnamoorthy <
> akris...@ncsu.edu> wrote:
>
>> It is executing now Andy. Thanks a lot. I missed to add the directory.
>> Thanks again for this help.
>>
>> On Tue, Aug 7, 2018 at 2:06 PM, Andy Seaborne  wrote:
>>
>>>
>>>
>>> On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote:
>>>
 So my JENA_CP
 is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak
 /Documents'.

>>>
>>> Does the file
>>>
>>> /home/ak/Documents/samplejena/LastModified.class
>>>
>>> exist?
>>>
>>>
>>>
 /home/ak/Documents location has the classfile/jar of the code

 But still when i run this command,

 /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
 /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq

 I am getting the below error,

 ak@akrish12:~$ /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
 /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
 12:41:35 WARN  ClsLoader:: Class not found:
 samplejena.LastModified
 12:41:35 WARN  exec :: URI
 
 has no registered function factory
 -
 | title | r |
 =
 -


 Regards,
 Arun

 On Tue, Aug 7, 2018 at 12:20 PM, Andy Seaborne  wrote:

 The list doesn't accept attachments.
>
> JENA_CP="$JENA_HOME"'/home/ak/Documents'
>>>
>>
> This needs to be a valid java classpath.
>
> $JENA_HOME is directory of the Jena installation.
>
> In the original it says:
>
> JENA_CP="$JENA_HOME"'/lib/*'
>
> the .../lib/* (NB single quotes - no * expansion) puts all the jars in
> that direct on the classpath.
>
> For you:
>
> JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*'
>
> You need to add the package/classfile tree for you code.
>
> As you have: java:samplejena
>
> Suppoose /DIR is the top of that directory tree so "samplejena"  is one
> directory within /DIR.
>
> You then want:
>
> JENA_CP='/home/afs/jlib/apache-jena/lib/*:/DIR'
>
> : is the classpath separator.
>
>  Andy
>
> On 07/08/18 16:25, Arunkumar Krishnamoorthy wrote:
>
> Hello,
>>
>> I have attached the file with the change, i am getting Could not find
>> or
>> load main class arq.arq
>>
>> My classpath location is /home/ak/Documents. Please let me know
>> whether
>> my change is correct.
>>
>> Regards,
>> Arun
>>
>>
>> On Tue, Aug 7, 2018 at 11:11 AM, Andy Seaborne > > a...@apache.org>> wrote:
>>
>>  Hi - Please send email to the jena users mailing list.
>>
>>  (It is correct if it works!)
>>
>>   Andy
>>
>>
>
>

>>
>


Re: Writing an ARQ Extension Function

2018-08-08 Thread Arunkumar Krishnamoorthy
Hello Andy,

I am getting the following issue when i run the code,

Caused by: java.lang.ClassNotFoundException:
com.hp.hpl.jena.query.function.FunctionBase1
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.j

I have added the .class file in the directory. Do i need to package the
dependancy jars also? Please advice.

Regards,
Arun

On Tue, Aug 7, 2018 at 2:11 PM, Arunkumar Krishnamoorthy 
wrote:

> It is executing now Andy. Thanks a lot. I missed to add the directory.
> Thanks again for this help.
>
> On Tue, Aug 7, 2018 at 2:06 PM, Andy Seaborne  wrote:
>
>>
>>
>> On 07/08/18 18:07, Arunkumar Krishnamoorthy wrote:
>>
>>> So my JENA_CP
>>> is JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*:/home/ak
>>> /Documents'.
>>>
>>
>> Does the file
>>
>> /home/ak/Documents/samplejena/LastModified.class
>>
>> exist?
>>
>>
>>
>>> /home/ak/Documents location has the classfile/jar of the code
>>>
>>> But still when i run this command,
>>>
>>> /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
>>> /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
>>>
>>> I am getting the below error,
>>>
>>> ak@akrish12:~$ /home/ak/Downloads/apache-jena-3.8.0/bin/arq --data
>>> /home/ak/Desktop/dataset.rdf --query /home/ak/Desktop/query.rq
>>> 12:41:35 WARN  ClsLoader:: Class not found:
>>> samplejena.LastModified
>>> 12:41:35 WARN  exec :: URI 
>>> has no registered function factory
>>> -
>>> | title | r |
>>> =
>>> -
>>>
>>>
>>> Regards,
>>> Arun
>>>
>>> On Tue, Aug 7, 2018 at 12:20 PM, Andy Seaborne  wrote:
>>>
>>> The list doesn't accept attachments.

 JENA_CP="$JENA_HOME"'/home/ak/Documents'
>>
>
 This needs to be a valid java classpath.

 $JENA_HOME is directory of the Jena installation.

 In the original it says:

 JENA_CP="$JENA_HOME"'/lib/*'

 the .../lib/* (NB single quotes - no * expansion) puts all the jars in
 that direct on the classpath.

 For you:

 JENA_CP='/home/ak/Downloads/apache-jena-3.8.0/lib/*'

 You need to add the package/classfile tree for you code.

 As you have: java:samplejena

 Suppoose /DIR is the top of that directory tree so "samplejena"  is one
 directory within /DIR.

 You then want:

 JENA_CP='/home/afs/jlib/apache-jena/lib/*:/DIR'

 : is the classpath separator.

  Andy

 On 07/08/18 16:25, Arunkumar Krishnamoorthy wrote:

 Hello,
>
> I have attached the file with the change, i am getting Could not find
> or
> load main class arq.arq
>
> My classpath location is /home/ak/Documents. Please let me know whether
> my change is correct.
>
> Regards,
> Arun
>
>
> On Tue, Aug 7, 2018 at 11:11 AM, Andy Seaborne   a...@apache.org>> wrote:
>
>  Hi - Please send email to the jena users mailing list.
>
>  (It is correct if it works!)
>
>   Andy
>
>


>>>
>


Re: TransactionManager ERROR There are now active transactions

2018-08-08 Thread Andy Seaborne

We need to recreate it with a debugger attached.

If you could collect the HTTP requests the scripts are making, then with 
a copy of the data, it might be possible to recreate the situation.


Otherwise it's "something happened".  I can't see how to recreate it 
without a use case.


Andy


On 07/08/18 10:06, Mikael Pesonen wrote:


Are there any further tests I could do that might help solving this?

On 6.8.2018 14:01, aj...@apache.org wrote:

It tells us that the problem seems more likely to be with TDB than with
Fuseki, which is a step towards isolating it.

Adam

On Mon, Aug 6, 2018, 5:55 AM Mikael Pesonen 
wrote:


With in-memory db everything works. Ran ~5 operations x10 (10
scripts in parallel) and no problems. Mem usage was 3g-5,5g (java
xmx4000) and vm 10g.

So what does this tell? System is upcloud server so there shouldn't be
any issues with disk there...

Br,


On 3.8.2018 16:33, ajs6f wrote:
That seems a bit strange. I would think that the single dataset lock 
and
multiple-reader-or-single-writer policy would guard against this-- 
only one

thread (request) can mutate the dataset at a time. Or is this a problem
with TDB? Do you see this occurring with in-memory datasets?

ajs6f

On Aug 3, 2018, at 8:01 AM, Mikael Pesonen 


wrote:


Easier fix that sleeping was to add system wide semaphore which puts

all concurrent requests to single queue.

So the problem is in the way how Fuseki handles situation where
(concurrent) requests are coming in faster that it can process it. 
Usually

there are 2 ways to handle that: return error to client or sleep until
there is more space in request queue.

Br

On 2.8.2018 17:18, Andy Seaborne wrote:

On 02/08/18 12:56, Mikael Pesonen wrote:

I dont have any configuration, so it's default?

Command line:

/usr/bin/java -Dlog4j.configuration=file:...log4j.properties

-Xmx5600M -jar fuseki-server.jar --update --port 3030
--loc=...jena_data_test/ /ds

log4j.properties is default except couple of INFO -> WARN



On 2.8.2018 12:56, Andy Seaborne wrote:

Fuseki configuration?

The stacktrace isn't GSP.

Im only calling /ds endpoint with php+curl

It says "SPARQL_Update.perform" so it is not GSP.

https://www.w3.org/TR/sparql11-http-rdf-update/


I'm not able to produce a sendable script that
would case these errors.

It (still) looks like there is an environment factor.

  Andy


On 02/08/18 10:41, Mikael Pesonen wrote:

3.7.0.

On 2.8.2018 12:40, Andy Seaborne wrote:

version?

On 02/08/18 10:06, Mikael Pesonen wrote:

It does happen in our test environment on high load quite often.

More sleep I put in the test script, less frequently error happens.

Most of the time transactions are executed after the error, but
not always. Fuseki never returns error. Rarely below error happens, 
don't

know if it's related.

I'm not able to produce a sendable script that would case these

errors.

So as a fix I'm planning just to add enough sleep between every

Fuseki call. 50-100ms seems to work.



org.apache.jena.query.QueryException: Secondary index duplicate:
GSPO->GPOS -> [[00A9D430], [15AFB422], 
[2602],

[04007E280A6A5DC0]]




   at
org.apache.jena.sparql.lang.ParserARQUpdate._parse(ParserARQUpdate.java:78) 


   at
org.apache.jena.sparql.lang.ParserARQUpdate.parse$(ParserARQUpdate.java:45) 


   at

org.apache.jena.sparql.lang.UpdateParser.parse(UpdateParser.java:48)

   at

org.apache.jena.update.UpdateAction.parseExecute(UpdateAction.java:421)

   at

org.apache.jena.update.UpdateAction.parseExecute(UpdateAction.java:380)

   at
org.apache.jena.fuseki.servlets.SPARQL_Update.execute(SPARQL_Update.java:234) 


   at
org.apache.jena.fuseki.servlets.SPARQL_Update.executeBody(SPARQL_Update.java:189) 


   at
org.apache.jena.fuseki.servlets.SPARQL_Update.perform(SPARQL_Update.java:106) 


   at
org.apache.jena.fuseki.servlets.ActionService.executeLifecycle(ActionService.java:192) 


   at
org.apache.jena.fuseki.servlets.ActionService.execCommonWorker(ActionService.java:106) 


   at

org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:73)

   at
org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:73) 


   at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) 


   at
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) 


   at
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) 


   at
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) 


   at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) 


   at
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) 


   at