Hi Mirko,
Thanks, I have not been able to reproduce, and we are looking into
this now ...
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
On 28 Apr 2009, at 10:12, Mirko wrote:
Yep, you need to include some more libraries in your classpath.
Elmo1.4 depends on the following (required) libraries, included in
the Elmo download:
dist/elmo-1.4.jar
dist/elmo-rdfs-1.4.jar
lib/persistence-api-1.0.jar
lib/commons-beanutils 1.7.0
lib/javassist-3.7.ga.jar
lib/commons-beanutils-1.7.0.jar
lib/slf4j-api-1.5.0.jar
lib/slf-jdk14-1.5.0.jar
Best, Mirko
Am 28.04.2009 um 02:41 schrieb Hugh Williams:
Hi Mirko,
I have compiled your test program but on attempting to run it
fails with the error below:
$ /usr/bin/javac -classpath "lib/slf4j-api-1.5.0.jar:lib/openrdf-
sesame-2.1.2-onejar.jar:lib/slf4j-jdk14-1.5.0.jar:../../libsrc/
JDBCDriverType4/virtjdbc3.jar:virt_sesame2.jar:lib/
elmo-1.4.jar:lib/elmo-rdfs-1.4.jar" virtuoso_driver/SesameTest.java
Note: virtuoso_driver/SesameTest.java uses or overrides a
deprecated API.
Note: Recompile with -Xlint:deprecation for details.
$ /usr/bin/java -classpath "lib/slf4j-api-1.5.0.jar:lib/openrdf-
sesame-2.1.2-onejar.jar:lib/slf4j-jdk14-1.5.0.jar:lib/
elmo-1.4.jar:lib/elmo-rdfs-1.4.jar:../../libsrc/JDBCDriverType4/
virtjdbc3.jar:virt_sesame2.jar:virtuoso_driver" SesameTest
Exception in thread "main" java.lang.NoClassDefFoundError: javax/
persistence/EntityManagerFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass
(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:
260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass
(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal
(ClassLoader.java:319)
at SesameTest.main(SesameTest.java:21)
Any ideas as to how to resolve this, seeing as it runs on your
machine ?
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
On 27 Apr 2009, at 17:05, Mirko wrote:
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
<SesameTest.java>
---------------
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();
}
}
@rdf("http://foo.org/TestData")
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
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
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:
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
VirtSesame2Provider#%20Setup
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
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support
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 - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables
unlimited
royalty-free distribution of the report engine for
externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users
--------------------------------------------------------------------
----------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally
facing
server and web deployment.
http://p.sf.net/sfu/
businessobjects_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users