Hi Peter, It seem the source forge mailing list has a limit on the size of emails/attachments, thus I have uploaded the file to the following location where you can download:
ftp://download.openlinksw.com/support/virtuoso/virt-jdbc-samples.tar.gz Best Regards, Hugh Williams Professional Services OpenLink Software On 1/6/07 00:07, "Hugh Williams" <hwilli...@openlinksw.com> wrote: > Hi Peter, > > The attached file virt-jdbc-samples.tar.gz contains sample JDBC applications > shipped with the Virtuoso commercial version for various JDK versions, which > can be used to test basic JDBC connectivity to your Virtuoso database. Sources > are also included. > > To use: > > 1. Extract to a location of your choice > > 2. From a DOS prompt change directory to: > > $INSTALLDIR\JDBC\jdk1.5\JDBCDemo > > 3. Run the following command to start the JDBCDemo sample program > > java -cp ".;%CLASSPATH%" JDBCDemo > > This should start the JDBCDemo GUI application > > 4. From the File menu choose the "set connection URL" menu option > > 5. Set the "Driver Name" and "Connect URL" params your Virtuoso Driver name > (virtjdbc3.Driver) and Connectstring ( > jdbc:virtuoso://otherhostname:8890/DATABASE=sparql/UID=user/PWD=pass") > > 6. Once the above connect string params are set you can then enter a valid > SQL or SPARQL query in the text windows and hit the 'Query" Button to execute > against the target Virtuoso Server > > Please attempt the above to verify the basic connectivity to your Virtuoso > Server and report any errors encountered. > > Best Regards, > Hugh Williams > Professional Services > OpenLink Software > > > On 31/5/07 22:09, "Peter M" <pete...@gmail.com> wrote: > >> Dear gurus, >> I am converting my app from Oracle to Virtuoso, and having troubles >> with connection. >> This code for Oracle was connecting to DB OK: >> >> Class.forName("oracle.jdbc.driver.OracleDriver"); >> Connection conn = >> DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:ORCL", >> "user", "pass"); >> >> When trying Virtuoso version, like this: >> Class.forName("virtuoso.jdbc3.Driver"); >> Connection conn = >> DriverManager.getConnection("jdbc:virtuoso://otherhostname:8890/DATABASE=spar>> q >> l/UID=user/PWD=pass"); >> >> I am getting timeout. >> Server platform is Windows (Win32), virtuoso5, build Apr 10 2007 >> DB is running, I can get response via HttpURLConnection >> >> =============================== >> >> Stack trace: >> virtuoso.jdbc3.VirtuosoException: Virtuoso Communications Link Failure >> (timeout) : Read timed out >> at virtuoso.jdbc3.VirtuosoFuture.nextResult(Unknown Source) >> at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) >> at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) >> at virtuoso.jdbc3.VirtuosoConnection.<init>(Unknown Source) >> at virtuoso.jdbc3.Driver.connect(Unknown Source) >> at java.sql.DriverManager.getConnection(Unknown Source) >> at java.sql.DriverManager.getConnection(Unknown Source) >> at try_sparql.test_sparql.main(test_sparql.java:35) >> >> >> ================= >> >> What I am doing wrong? >> >> Can you suggest a link for download sample app to be able to see real >> running code? >> >> Or can you post simple sample: connect, createStatement, executeQuery, >> loop through dataset? >> >> Thanks >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Virtuoso-users mailing list >> Virtuoso-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/virtuoso-users > > > Best Regards, > Hugh Williams > VP Product Development > OpenLink Software > Tel: +44 (0) 8681 7701 > Web: http://www.openlinksw.com > Universal Data Access & Data Integration Technology Providers Best Regards, Hugh Williams VP Product Development OpenLink Software Tel: +44 (0) 8681 7701 Web: http://www.openlinksw.com Universal Data Access & Data Integration Technology Providers