Re: [Virtuoso-users] triples not reached by the index?

2017-06-23 Thread Beppe Mazzola
Hi Hugh

At the beginning I did not realize that the problem was caused before,
during the first loading of the table. In fact, in my understanding the
index of the table was corrupted somehow during the first bulk loading
performed by Sqlworkbench/j + Virtuoso JDBC driver. Later the strange
effect of "rows invisible to the index" appeared in the table, even if you
empty it and load it again with plain INSERT statements.

I did not investigate further the case, since the feature blocked by the
issue had to work asap, so I implemented the bulk load with a plain Java
program, using the Virtuoso JDBC driver.

My sensation was anyway that the problem was JDBC driver side, since
Sqlworkbench is "DB agnostic". If it was Sqlrorkbench fault it would have
appeared with other DBMS

I am available if you need more info/scripts to reproduce the problem
anyway. Let me know.

Cheers

Beppe

2017-06-22 23:39 GMT+01:00 Hugh Williams :

> Hi Beppe,
>
> I am confused now as the original test case provided for recreating did
> not use SQLWorkbench or JDBC, so how can the issue then be recreated ?
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.  //  http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
>
>
> On 22 May 2017, at 14:52, Beppe Mazzola  wrote:
>
> Hi Hughs
>
> It seems the problem is not related to the RDF views tied to the tables,
> because it happens even before executing the mapping.
> The problem arises *only *when I bulk load data into the tables with the
> tool Sqlworkbench/J using the Virtuoso JDBC driver virtjdbc4_2.jar.
> So there is something in the Sqlworkbench/j or (it seems to me more
> likely) in the JDBC driver that causes the issue.
>
> Cheers
>
> Beppe
>
>
>
> 2017-05-16 10:27 GMT+01:00 Beppe Mazzola :
>
>> Hi Hugh
>>
>> I have noticed something strange related to the PK index of the table
>> provided to you.
>>
>> After having run all the scripts I executed again by chance the first
>> INSERT statement and VOS allowed me to do it! And I could see both the rows
>> with ID=0 in the table...
>> At this point if you delete the rows with ID=0 one of them is deleted,
>> and the remaining one is visible only with select not using the PK index.
>> This might have a relation with the original RDF view issue
>>
>> I have used the Conductor Interactive SQL.
>>
>> Cheers
>>
>> Beppe
>>
>>
>> 2017-05-16 9:25 GMT+01:00 Beppe Mazzola :
>>
>>> Hi Hugh
>>>
>>> Here are the steps to reproduce the problem.
>>>
>>> 1) Create the table
>>>
>>> CREATE TABLE DB.PEST.ANNEXES
>>> (
>>>   ANNEXES_ID NUMERIC NOT NULL
>>> , ANNEXES_NAMES VARCHAR(50) NOT NULL
>>> , ANNEXES_PART VARCHAR(1)
>>> , ANNEXES_SPECIAL CHAR(1) NOT NULL
>>> , CONSTRAINT PK_ANNEXES PRIMARY KEY (ANNEXES_ID )
>>> );
>>>
>>> 2) initialize it with the attached script initANNEXES.sql
>>>
>>> 3) create the virtual graph with the attached script ttlpExecTrial.sql
>>>
>>> 4) query the virtual graph
>>> select *
>>> from 
>>> where {
>>>  #>> esource/annex-0> ?p ?o.
>>>  ?s ?p ?o filter regex(str(?s),'annex-0') .
>>> }
>>>
>>> I have used Virtuoso Open Source Edition (multi threaded)
>>> Version 7.2.4.3217-threads as of Apr 25 2016
>>> Compiled for Win64 (x86_64-generic-win-64)
>>>
>>> Cheers
>>>
>>> Beppe
>>>
>>>
>>> 2017-05-14 22:53 GMT+01:00 Hugh Williams :
>>>
 Hi

 Can you please provide the actual steps to reproduce the issue being
 encountered as it is not clear from the information provided ?

 Best Regards
 Hugh Williams
 Professional Services
 OpenLink Software, Inc.  //  http://www.openlinksw.com/
 Weblog   -- http://www.openlinksw.com/blogs/
 LinkedIn -- http://www.linkedin.com/company/openlink-software/
 Twitter  -- http://twitter.com/OpenLink
 Google+  -- http://plus.google.com/100570109519069333827/
 Facebook -- http://www.facebook.com/OpenLinkSoftware
 Universal Data Access, Integration, and Management Technology Providers



 On 13 May 2017, at 18:01, Beppe Mazzola  wrote:

 Hi to everybody

 I have generated with Virtuoso Open Source a virtual graph with the
 content of many RDB tables.obtained with an R2RML mapping.

 If I execute the following query I do not get any result.

 select *
 from
 where {
   ?p ?o.
 }


Re: [Virtuoso-users] Adding virtuoso to rdf4j failed

2017-06-23 Thread Adam Sanchez
Hi Hugh,

Finally I found my own solution. I am not very proud but it works at least.
Well, I have to compile RDF4J (https://github.com/eclipse/rdf4j)
including the libraries and the templates provided by Virtuoso
(http://vos.openlinksw.com/owiki/wiki/VOS/VirtSesame2HttpRepository)

The steps I followed are described here.

https://github.com/asanchez75/rdf4j/wiki

The changes were implemented in the branch virtuoso-7.2.4.2

Regards,

Adam

On Thu, Jun 22, 2017 at 11:15 AM, Adam Sanchez  wrote:
> Hi Hugh,
>
> I still got the same error I reported. Just in case, these are the
> paths and the versions I am using.
>
> - I have downloaded virt_rdf4j.jar from
>
> https://opldownload.s3.amazonaws.com/uda/virtuoso/rdfproviders/rdf4j/2/virt_rdf4j.jar
>
> and the version is
>
> java -jar 
> /usr/local/src/apache-tomcat-8.0.39/webapps/rdf4j-server/WEB-INF/lib/virt_rdf4j.jar
>
> OpenLink Virtuoso(TM) Provider for RDF4J(TM) Version 2.1.4 [Build 1.3]
>
> - I have downloaded virt_rdf4j.jar from
>
> https://opldownload.s3.amazonaws.com/uda/virtuoso/jdbc/virtjdbc4_2.jar
>
> and the version is
>
> java -jar 
> /usr/local/src/apache-tomcat-8.0.39/webapps/rdf4j-workbench/WEB-INF/lib/virtjdbc4_2.jar
>
> OpenLink Virtuoso(TM) Driver for JDBC(TM) Version 4.2 [Build 3.100]
>
> - I have downloaded create.xsl from
>
> https://opldownload.s3.amazonaws.com/uda/virtuoso/rdfproviders/rdf4j/2/create.xsl
>
> and the path is
>
> /usr/local/src/apache-tomcat-8.0.39/webapps/rdf4j-workbench/transformations/create.xsl
>
> - I have downloaded create-virtuoso.xsl from
>
> https://opldownload.s3.amazonaws.com/uda/virtuoso/rdfproviders/rdf4j/2/create-virtuoso.xsl
>
> and the path is
>
> /usr/local/src/apache-tomcat-8.0.39/webapps/rdf4j-workbench/transformations/create-virtuoso.xsl
>
> - The java version is
>
> java version "1.8.0_73", Java(TM) SE Runtime Environment (build
> 1.8.0_73-b02), Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02,
> mixed mode)
>
> - The Virtuoso version is
>
> Virtuoso Version: 07.20.3217, Build: Jun 22 2017.
> I compiled the branch stable/7, latest commit -> 0468195 Merge branch
> 'hotfix/7.2.4.2' into stable/7
>
> - The RDF4J version is
>
> RDF4J Workbench Version 2.1.6
> (http://www.eclipse.org/downloads/download.php?file=/rdf4j/eclipse-rdf4j-2.1.6-sdk.zip)
>
> - The operating system is
>
> Operating System  Mac OS X 10.12.5 (x86_64)
>
> - The error message that shows up after I try to create a repository
> connected with Virtuoso is
>
> =
>
> HTTP Status 500 - java.lang.NullPointerException
>
> type Exception report
>
> message java.lang.NullPointerException
>
> description The server encountered an internal error that prevented it
> from fulfilling this request.
>
> exception
>
> javax.servlet.ServletException: java.lang.NullPointerException
> org.eclipse.rdf4j.workbench.commands.CreateServlet.doPost(CreateServlet.java:68)
> org.eclipse.rdf4j.workbench.base.TransformationServlet.service(TransformationServlet.java:96)
> org.eclipse.rdf4j.workbench.base.AbstractServlet.service(AbstractServlet.java:125)
> org.eclipse.rdf4j.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:109)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:213)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:141)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:109)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:120)
> org.eclipse.rdf4j.workbench.base.AbstractServlet.service(AbstractServlet.java:125)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> org.eclipse.rdf4j.workbench.proxy.CacheFilter.doFilter(CacheFilter.java:62)
> org.eclipse.rdf4j.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:53)
>
> root cause
>
> java.lang.NullPointerException
> org.eclipse.rdf4j.workbench.commands.CreateServlet.getConfigTemplate(CreateServlet.java:153)
> org.eclipse.rdf4j.workbench.commands.CreateServlet.createRepositoryConfig(CreateServlet.java:120)
> org.eclipse.rdf4j.workbench.commands.CreateServlet.doPost(CreateServlet.java:65)
> org.eclipse.rdf4j.workbench.base.TransformationServlet.service(TransformationServlet.java:96)
> org.eclipse.rdf4j.workbench.base.AbstractServlet.service(AbstractServlet.java:125)
> org.eclipse.rdf4j.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:109)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:213)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:141)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:109)
> org.eclipse.rdf4j.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:120)
> org.eclipse.rdf4j.workbench.base.AbstractServlet.service(AbstractServlet.java:125)