Re: Jena / Stanbol success stories?

2014-11-24 Thread Adam Retter
The National Archives (UK) are using Apache Jena to power the
Linked-Data Catalogue which forms the backbone of their new Digital
Archive system (DRI). They are also using Fuseki and Elda which are
related to Jena.

I no longer work on the project, but Rob (Cc'd) might be able to tell
you more if you want to know.

On 24 November 2014 at 03:19, Phillip Rhodes  wrote:
> Hi all, I was just wondering if anybody knows of, or is involved with,
> any projects using Jena and/or Stanbol which (have been|can be)
> discussed and cited publicly?
>
> A local company that I've been talking to is interested in possibly
> using SemWeb technology (specifically, Jena/Stanbol) internally, but
> are looking for some evidence to support the assertion that this
> technology delivers and is "for real".
>
> Any pointers or references would be appreciated... or if you are
> personally involved in something and are willing to talk about it
> (possibly with appropriate NDAs, etc. in place), I'd love to talk to
> you.
>
>
> Thanks,
>
>
>
> Phil
> ---
> This message optimized for indexing by NSA PRISM



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


Re: Jena libraries in Netbeans

2014-04-26 Thread Adam Retter
My advice would be to use Maven.

NetBeans has first class support for Maven, you can open a Maven project as
though it was any other native NetBeans project in NetBeans. Also Eclipse
and IntelliJ have support for NetBeans, and therefore you only need to
learn how to do something once and it will work for all those IDE's.

Simply create a folder for your project with a Java source directory -

$ mkdir -p my-project/src/main/java

And then place the following minimal pom.xml file into the my-project
folder. This assumes a Java project that depends on the latest Jena
libraries.


http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
4.0.0

com.your-company
your-project
1.0-SNAPSHOT



org.apache.jena
apache-jena-libs
pom
2.11.1






You can then go to open project in NetBeans and just point it at the
'my-project' folder.

Jena's page about Maven is here: https://jena.apache.org/download/maven.html

Have fun!





On 26 April 2014 08:31, David Moss  wrote:

>
>
>
>
> Jena libraries in Netbeans
>
> Saturday, 26 April 2014
>
> 12:38 PM
>
> Adding Jena to Netbeans was interesting. Lots of trial and error. There
> were  tutorials on how to do this for Eclipse on the web in April 2014, but
> nothing for Netbeans.
>
>
>
> [image: Phone number] I downloaded the file
>
> apache-jena-2.11.1.zip<http://mirror.rackcentral.com.au/apache/jena/binaries/apache-jena-2.11.1.zip>
>
> From <https://jena.apache.org/download/index.cgi>
>
> and unzipped it to
>
> C:\Users\David\Documents\java\library
>
>
>
> In Netbeans I clicked on Tools/Libraries and the button New Library.
>
> I named the new library "Jena" and clicked the OK button.
>
>
>
> There are three aspects to a library in Netbeans: Classpath, Sources and
> Javadoc.
>
>
>
> I clicked on the Classpath tab first, then the button for Add JAR/Folder.
>
>
> After downloading and unzipping, the Jena files ended up in:
> C:\Users\David\Documents\java\library\apache-jena-2.11.0
>
> So I navigated there, opened the lib folder, highlighted all the files in
> it and clicked the Add JAR/Folder button. This added the Jena class files
> to my newly created Jena library.
>
>
>
> Next I clicked on the Sources tab, then the button for Add JAR/Folder.
>
> The source files were in the
> C:\Users\David\Documents\java\library\apache-jena-2.11.0\src-lib folder. I
> added all the files from there as above.
>
>
>
> I completed the library by clicking the JavaDoc tab and adding all the
> folders under
> C:\Users\David\Documents\java\library\apache-jena-2.11.0 with javadoc in
> their name.
>
>
>
> Finally I opened my project , right clicked on the libraries attribute,
> clicked on Add Library and chose Jena.
>
>
>
> The Jena framework, complete with javadoc is now available in my project.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Created with Microsoft OneNote 2013.
>



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


Re: Query causes a StackOverflowError

2014-03-18 Thread Adam Retter
Well unfortunately we are not there yet, we are having to re-engineer
quite a lot of things around the re-design of our query.

In the meantime we have tried to roll-back and are considering
increasing the stack size as Andy suggested. However, my fear is that
this will not actually help us at all. Although it was not clear in my
original email, because I cut out some of the stacktrace to save
bytes, my reasoning is thus:

Our query contains 9,669 unions, however in the stack trace we see
270,000+ frames which are mostly the following repeating over and over
again:

at com.hp.hpl.jena.sparql.algebra.op.OpUnion.visit(OpUnion.java:49)
at 
com.hp.hpl.jena.sparql.algebra.OpWalker$WalkerVisitor.visit2(OpWalker.java:102)
at com.hp.hpl.jena.sparql.algebra.OpVisitorByType.visit(OpVisitorByType.java:74)

as there is such a disparity between the number of unions we actually
want to perform and the number of stack frames for OpUnion, I am
rather inclined to believe at the moment that this is a recursion bug.
My concern is that no matter how large I grow the stack size, it will
continue to overflow. Would that be a correct assumption? ...or is it
correct that I should have 270,000+ OpUnion frames for a union of just
9,669 resources?

Thanks

On 17 March 2014 20:55, Andy Seaborne  wrote:
> On 17/03/14 18:17, Adam Retter wrote:
>>
>> Thanks Guys,
>>
>>
>> We did try using the:
>>
>> "yourSPARQLEndpoint elda:supportsNestedSelects true."
>>
>> Although I think we found that the option was actually (non-plural):
>>
>> "yourSPARQLEndpoint elda:supportsNestedSelect true."
>>
>> However, whilst Elda reported that it did indeed support the
>> NestedSelect, it continued to create that absolutely massive union for
>> our query.
>
>
> Bizarre - probably one for the ELDA mailing list
>   linked-data-api-discuss AT googlegroups.com
>
>
>>
>> The good news is my colleague Rob was able to change Elda's config
>> file so that it generated a much simpler query for us. So we have now
>> moved past that one. If anyone wants more info on this, please say,
>> and I will ask him to post some detail.
>
>
> Yes - it would be interesting to know what changes you made, and their
> effect.
>
> Andy
>
>
>>
>> Thanks for all your help guys.
>>
>>
>>
>> On 17 March 2014 06:51, Chris_Dollin  wrote:
>>>
>>> On Sunday, March 16, 2014 06:58:29 PM Adam Retter wrote:
>>>
>>>> Unfortunately, today, we have a query that is generated by Elda and
>>>> POST'ed to Fuseki (https://github.com/epimorphics/elda). The query is
>>>> about 1.4MB!
>>>>
>>>> Unfortunately this query causes Fuseki to throw a
>>>> java.lang.StackOverflowError. The only other post I found on the
>>>> mailing list which looks similar was from 2011
>>>> http://markmail.org/message/pwzdrcn7lnkqra35 but there was no follow
>>>> up to it.
>>>
>>>
>>> Concur with Andy -- you need to enable the nested select option
>>> (which has been in Elda for a long time, since we hit exactly the same
>>> issue of ENORMOUS queries you have ...)
>>>
>>> Add to your configuration:
>>>
>>>  yourSPARQLEndpoint elda:supportsNestedSelects true.
>>>
>>> where elda has been defined with
>>>
>>>@prefix elda:
>>> <http://www.epimorphics.com/vocabularies/lda#> .
>>>
>>> This is documented at
>>>
>>>
>>> http://epimorphics.github.io/elda/docs/E1.2.29/reference.html#section-1015
>>>
>>> (which is the .29 documentation, but this aspect hasn't changed since it
>>> was
>>> introduced, and I see a couple of typos there which I will fix before .30
>>> comes
>>> out Later This Week All Being Well.)
>>>
>>> Chris
>>>
>>>
>>>
>>
>>
>>
>



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


Re: Query causes a StackOverflowError

2014-03-17 Thread Adam Retter
Thanks Guys,


We did try using the:

"yourSPARQLEndpoint elda:supportsNestedSelects true."

Although I think we found that the option was actually (non-plural):

"yourSPARQLEndpoint elda:supportsNestedSelect true."

However, whilst Elda reported that it did indeed support the
NestedSelect, it continued to create that absolutely massive union for
our query.

The good news is my colleague Rob was able to change Elda's config
file so that it generated a much simpler query for us. So we have now
moved past that one. If anyone wants more info on this, please say,
and I will ask him to post some detail.

Thanks for all your help guys.



On 17 March 2014 06:51, Chris_Dollin  wrote:
> On Sunday, March 16, 2014 06:58:29 PM Adam Retter wrote:
>
>> Unfortunately, today, we have a query that is generated by Elda and
>> POST'ed to Fuseki (https://github.com/epimorphics/elda). The query is
>> about 1.4MB!
>>
>> Unfortunately this query causes Fuseki to throw a
>> java.lang.StackOverflowError. The only other post I found on the
>> mailing list which looks similar was from 2011
>> http://markmail.org/message/pwzdrcn7lnkqra35 but there was no follow
>> up to it.
>
> Concur with Andy -- you need to enable the nested select option
> (which has been in Elda for a long time, since we hit exactly the same
> issue of ENORMOUS queries you have ...)
>
> Add to your configuration:
>
> yourSPARQLEndpoint elda:supportsNestedSelects true.
>
> where elda has been defined with
>
>   @prefix elda:   <http://www.epimorphics.com/vocabularies/lda#> .
>
> This is documented at
>
> http://epimorphics.github.io/elda/docs/E1.2.29/reference.html#section-1015
>
> (which is the .29 documentation, but this aspect hasn't changed since it was
> introduced, and I see a couple of typos there which I will fix before .30 
> comes
> out Later This Week All Being Well.)
>
> Chris
>
>
>



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


Re: Query causes a StackOverflowError

2014-03-16 Thread Adam Retter
Thanks for the quick reply Andy -

On 16 March 2014 20:48, Andy Seaborne  wrote:
> Hi Adam,
>
>
> On 16/03/14 18:58, Adam Retter wrote:
>>
>> Hi there,
>>
>> Firstly I would just like to say that whilst we have only been using
>> Elda and Fuseki for about a year, we have until now been really very
>> happy with them. Excellent stuff :-)
>
>
> Which versions?

Fuseki 0.2.6, I did check the release notes and commit history for
newer versions, but did not see any detail of bug fixes that might
address this. Is it possible that it has been fixed and I just missed
it?

I will have to check the version of Elda tomorrow when I am in the
office and get back to you.

> And is this using sub-SELECTs enabled in Elda?
>
> IIRC that will replace the nearly 10,000 cases of UNION with the SELECT that
> generated it in the first place, which is much (much) shorter.

I will check tomorrow and get back to you. If we are not doing that,
then that sounds very promising.

>
>>
>> Unfortunately, today, we have a query that is generated by Elda and
>> POST'ed to Fuseki (https://github.com/epimorphics/elda). The query is
>> about 1.4MB!
>>
>> Unfortunately this query causes Fuseki to throw a
>> java.lang.StackOverflowError. The only other post I found on the
>> mailing list which looks similar was from 2011
>> http://markmail.org/message/pwzdrcn7lnkqra35 but there was no follow
>> up to it.
>
>
> Have you tried increasing the stack?  What happens?

I can certainly give that a try tomorrow as well. However, I normally
try to avoid doing this, and prefer to fix the problem at it's source,
otherwise I may just delays the inevitable to sometime in the future
when I run with a larger query ;-)


>> Unfortunately, we really need to solve this issue quickly. I am not
>> opposed to getting my hands dirty in the Jena code base if someone can
>> tell me what needs to be done, and support me when I have questions.
>> But hopefully there is some sort of quick workaround? So then, what
>> are my options chaps?
>>
>> You may access the stack trace here:
>> https://dl.dropboxusercontent.com/u/35135948/StackOverflowError.txt
>> and the query that caused the exception here:
>> https://dl.dropboxusercontent.com/u/35135948/fuseki-query.txt
>> Sorry for the use of DropBox, book the Apache mailing list manager
>> kept rejecting my post as it was too large otherwise.
>>
>> Thanks Adam.
>>
>
> Andy



-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk


Query causes a StackOverflowError

2014-03-16 Thread Adam Retter
Hi there,

Firstly I would just like to say that whilst we have only been using
Elda and Fuseki for about a year, we have until now been really very
happy with them. Excellent stuff :-)

Unfortunately, today, we have a query that is generated by Elda and
POST'ed to Fuseki (https://github.com/epimorphics/elda). The query is
about 1.4MB!

Unfortunately this query causes Fuseki to throw a
java.lang.StackOverflowError. The only other post I found on the
mailing list which looks similar was from 2011
http://markmail.org/message/pwzdrcn7lnkqra35 but there was no follow
up to it.

Unfortunately, we really need to solve this issue quickly. I am not
opposed to getting my hands dirty in the Jena code base if someone can
tell me what needs to be done, and support me when I have questions.
But hopefully there is some sort of quick workaround? So then, what
are my options chaps?

You may access the stack trace here:
https://dl.dropboxusercontent.com/u/35135948/StackOverflowError.txt
and the query that caused the exception here:
https://dl.dropboxusercontent.com/u/35135948/fuseki-query.txt
Sorry for the use of DropBox, book the Apache mailing list manager
kept rejecting my post as it was too large otherwise.

Thanks Adam.

-- 
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk