Thanks Hugh, you are absolutely right.  There is an old virtjdbc3.jar
included in the jenajars.zip package downloaded from:
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSDownload
I was including all of those jars.  Removing that, and including the version
in {virtuoso}/lib/jdbc-3.0/ fixed the problem.  After that, all samples
ran.

-Steve

2009/3/21 Hugh Williams <hwilli...@openlinksw.com>

> Hi Steve,
> What is the version of the Virtuoso JDBC Driver (virtjdbc3.jar) being used
> ? This can be determine with commands of the form in my case:
>
> ~/binsrc/jena$ java -cp "../../libsrc/JDBCDriverType4/virtjdbc3.jar:."
> virtuoso.jdbc3.Driver
> OpenLink Virtuoso(TM) Driver for JDBC(TM) Version 3.x [Build 3.26]
>
> The error you report indicates you may be using an older version of the
> JDBC Driver thus you need to make sure you are using the latest version,
> which works for me as follows:
>
> ~/binsrc/jena$ /usr/bin/java -classpath
> "lib/arq.jar:lib/iri.jar:lib/jena.jar:lib/icu4j_3_4.jar:lib/xercesImpl.jar:lib/commons-logging-1.1.1.jar:lib/axis.jar:../../libsrc/JDBCDriverType4/virtjdbc3.jar:./virt_jena.jar:.:virtuoso_driver"
> VirtuosoSPARQLExample1
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-uri-fn
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfLongTmpl
> ^{custom-verbatim-1}^_INVERSE (__id2in (^{tree}^)) . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-uri-fn
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfUriTmpl
> ^{custom-verbatim-1}^_INVERSE (^{tree}^) . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-literal-fn
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfUriTmpl
> ^{custom-verbatim-1}^_INVERSE (^{tree}^) . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-literal-fn
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfLongTmpl
> ^{custom-verbatim-1}^_INVERSE (__ro2sq /*l*/ (^{tree}^)) . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfSqlvalTmpl
> ^{sqlval-of-tree}^^{as-name-0}^^{comma-cut}^NULL^{as-name-1}^ . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar-dt
> http://www.openlinksw.com/schemas/virtrdf#qmfShortOfSqlvalTmpl
> ^{sqlval-of-tree}^^{as-name-0}^^{comma-cut}^NULL^{as-name-1}^ . }
> .
> .
> .
> ttp://www.openlinksw.com/virtrdf-data-formats#sql-numeric
> http://www.openlinksw.com/schemas/virtrdf#qmfTypeminTmpl 
> -99999999999999999999999999999999999999999999999999 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-numeric-uri
> http://www.openlinksw.com/schemas/virtrdf#qmfTypeminTmpl 
> -99999999999999999999999999999999999999999999999999 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-numeric-uri-fn
> http://www.openlinksw.com/schemas/virtrdf#qmfTypeminTmpl 
> -99999999999999999999999999999999999999999999999999 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-dt
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-varchar-lang
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar-dt
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-nvarchar-lang
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> http://www.openlinksw.com/schemas/virtrdf# {
> http://www.openlinksw.com/virtrdf-data-formats#sql-longvarbinary
> http://www.openlinksw.com/schemas/virtrdf#qmfIsrefOfShortTmpl  0 . }
> VIRTMAIN@hugh-williams-computer-1368:~/binsrc/jena$
>
> 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 21 Mar 2009, at 21:12, Steve Judkins wrote:
>
> I'm trying to run the Jena Provider 
> samples<http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtJenaProvider>and
>  I'm getting an error.  Any help figuring out why this is failing is
> appreciated:
>
> Exception in thread "main" com.hp.hpl.jena.shared.JenaException: Convert
> results are FAILED.:virtuoso.jdbc3.VirtuosoException: Virtuoso
> Communications Link Failure (timeout) : Connection to the server lost
>     at virtuoso.jena.driver.VirtuosoQueryExecution.execSelect(Unknown
> Source)
>     at VirtuosoSPARQLExample1.main(VirtuosoSPARQLExample1.java:51)
>
> The server logs say:
> "Malformed data received from IP [127.0.0.1]: Box length too large.
> Disconnecting the client"
>
> Here is what appears to be configured properly:
> * Running 5.0.10 virtuoso-javavm-t
> * Including the classpath of all the jars included in the jenajars package
> * VirtuosoSPAQRLExampleX.java samples compiled properly
> * I can make a connection directly to iSQL: "sql 1111 dba dba"
> * The sample uses the default connection string:
> "jdbc:virtuoso://localhost:1111"
> * I am able to successfully connect with the JDBC sample app:
> {virtuoso-source}/binsrc/samples/JDBC/jdk1.3/JDBCDemo
>
> Example:
> java -cp
> "../jar/iri.jar:../jar/icu4j_3_4.jar:../jar/virtjdbc3.jar:../jar/axis.jar:../jar/xercesImpl.jar:../jar/jena.jar:../jar/arq.jar:../jar/commons-logging.jar:../jar/virt_jena.jar:/usr/lib/jvm/java-1.5.0-sun-1.5.0.16/lib:."
> VirtuosoSPARQLExample1
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial.
> http://p.sf.net/sfu/www-adobe-com_______________________________________________
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
>

Reply via email to