Hi Hugh,
1) I checked VirtuosoTest.java again. Test 1 passes only if the graph "http://demo.openlinksw.com/demo#this" is already in the DB. I oversaw this in my last run. Is this maybe intended? Test 4 passes in the first run, but fails when re-running the tests (the tupleQuery in test 4 returns 1 result, but the utf8 string doesn't equal the original). After restarting Virtuoso, test 4 passes again.

2) Attached you find my test programm that throws the AbtractMethodError. You need Elmo1.4 in your build path to run it. Data in Virtuoso are not required. Can you reproduce the exception in your environment?

Thanks, Mirko

Attachment: SesameTest.java
Description: Binary data


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


import org.openrdf.concepts.rdfs.Resource;
import org.openrdf.elmo.ElmoModule;
import org.openrdf.elmo.annotations.rdf;
import org.openrdf.elmo.sesame.SesameManager;
import org.openrdf.elmo.sesame.SesameManagerFactory;
import org.openrdf.repository.Repository;
import org.openrdf.repository.RepositoryException;

import virtuoso.sesame2.driver.VirtuosoRepository;

public class SesameTest {

public static void main(String[] args) {
Repository rep = new VirtuosoRepository("jdbc:virtuoso://localhost:1111","dba","dba");
try {
rep.initialize();
ElmoModule module = new ElmoModule();
module.addRole(TestData.class, "http://foo.org/TestData");
SesameManagerFactory factory = new SesameManagerFactory(module, rep); 
SesameManager manager = factory.createElmoManager(); 
Iterable<TestData> users = manager.findAll(TestData.class);
users.iterator(); // java.lang.AbstractMethodError: virtuoso.sesame2.driver.VirtuosoRepositoryConnection$1.setMaxQueryTime(I)V
rep.getConnection().close();
} catch (RepositoryException e) {
e.printStackTrace();
}
}
public interface TestData extends Resource{
}
}

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


Am 27.04.2009 um 12:20 schrieb Hugh Williams:

Hi Mirko,

Can you please provide the output of running the following command on you Mac OS X client:

java virtuoso.jdbc3.Driver

Please also provide the complete screen output of running the Sesame tests program on your machine ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software



On 27 Apr 2009, at 11:01, Mirko wrote:

Hi Hugh,
sorry I didn't test that in advance... No, I can't run all tests successfully. Tests 1,3,4,8 fail. Nothing is written to virtuoso in the failing tests, so no exceptions but 0 results from the tupleQuery.

btw: when re-running the tests, test 1 passes. I figured out that test 1 passes when running something like the following before (which is done in test 4):

URI testuri = repository.getValueFactory().createURI("http://foo.bar/test");
URI name = repository.getValueFactory().createURI("http://foo.bar/name");
Literal value = repository.getValueFactory().createLiteral("abc");
con.add(testuri, name, value, context);

 
Here is my environment:

#virtuoso: 
- Version: 05.10.3037, Build: Feb 18 2009
- running on ubuntu.

#client-side:
- Mac OSX 10.5.6
- Java 1.6 (same results with java 1.5)
build path:
- openrdf-sesame-2.2.4-onejar.jar (same results with sesame-2.1.2)
- virt_sesame2.jar
- virtjdbc3.jar
- slf4j-api-1.5.6.jar
- slf4j-jdk14-1.5.6.jar
- slf4j-log4j12-1.5.6.jar

Can you give me some info what could be wrong with my setup? 

Thanks, Mirko


Am 26.04.2009 um 21:02 schrieb Hugh Williams:

Hi Mirko,

Have you been able to successfully run the Sesame2  sample test program we provide as detailed at:


If so can you provide a sample program we can run to test your issue in-house ?
 
Best Regards
Hugh Williams
Professional Services
OpenLink Software



On 26 Apr 2009, at 19:29, Mirko wrote:

Hi,
I get an "AbstractMethodError" exception when retrieving data from  
Virtuoso using the Virtuoso Sesame2 driver in connection with  
Sesame2.2.4 (and Elmo1.4). Here's some simple test code that throws  
the exception:

Repository repository = new VirtuosoRepository("jdbc:virtuoso:// 
localhost:1111","dba","dba");
ElmoModule module = new ElmoModule();
SesameManagerFactory factory = new SesameManagerFactory(module,  
repository);
SesameManager manager = factory.createElmoManager();

Iterable result = manager.findAll(MyConcept.class);
result.iterator(); //EXCEPTION HERE

Exception in thread "main" java.lang.AbstractMethodError:  
virtuoso.sesame2.driver.VirtuosoRepositoryConnection 
$1.setMaxQueryTime(I)V
at  
org 
.openrdf 
.repository 
.contextaware 
.ContextAwareConnection.initQuery(ContextAwareConnection.java:624)
at  
org 
.openrdf 
.repository 
.contextaware 
.ContextAwareConnection.prepareTupleQuery(ContextAwareConnection.java: 
477)
at  
org 
.openrdf 
.elmo 
.sesame.SesameTypeManager.evaluateTypeQuery(SesameTypeManager.java:39)
at  
org 
.openrdf 
.elmo 
.sesame 
.SesameResourceManager.createRoleQuery(SesameResourceManager.java:154)
at org.openrdf.elmo.sesame.SesameManager 
$1.iterator(SesameManager.java:538)

The above code works fine with other repositories (such as  
NativeStore, MySQL, MemoryStore). Is this a bug in the Virtuoso Sesame  
driver?

Thanks for any comments! Mirko



------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
_______________________________________________
Virtuoso-users mailing list




Reply via email to