HI Dave,
Please try compiling and running the following sample program which
performs multiple inserts with the JDBC driver, such that we can see
if it hangs:
import java.util.*;
import java.sql.*;
public class ATest {
public static void main(String argv[])
{
try {
String urlDB = "jdbc:virtuoso://localhost:1111/";
Class.forName("virtuoso.jdbc3.Driver");
Connection conn = DriverManager.getConnection(urlDB,"dba","dba");
Statement st = conn.createStatement();
try {
st.execute("drop table tst1");
} catch (Exception e) {}
st.execute("create table tst1(f1 integer)");
st.execute("insert into tst1 values(1)");
st.execute("insert into tst1 values(2)");
st.execute("insert into tst1 values(3)");
st.execute("insert into tst1 values(4)");
st.execute("insert into tst1 values(5)");
conn.close();
} catch (Exception e) {
System.out.println(e);
System.out.println
("=========================================");
e.printStackTrace();
}
}
}
$ java -classpath "virtjdbc3.jar:." virtuoso.jdbc3.Driver
OpenLink Virtuoso(TM) Driver for JDBC(TM) Version 3.x [Build 3.26]
$ javac -classpath "virtjdbc3.jar:." ATest.java
$ java -classpath "/virtjdbc3.jar:." ATest
$ /usr/local/virtuoso-opensource/bin/isql
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
Type the rest of statement, end with a semicolon (;)> ;
Connected to OpenLink Virtuoso
Driver: 05.09.3035 OpenLink Virtuoso ODBC Driver
f1
INTEGER
________________________________________________________________________
_______
1
2
3
4
5
5 Rows. -- 1 msec.
SQL> quit;
Also, when you say your CF application hangs, does Virtuoso itself
hang at this point also ie is the hang occurring in CF, Virtuoso or
both ?
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 25 Dec 2008, at 01:36, David Benge wrote:
I had tried jdbc3 also and it also did not work. My CF 8.0.1 runs
1.5.0_16-133. I swapped back to jdbc3 and reran the test with the
same results. CF hangs waiting for a response.
On 12/24/08 5:01 PM, "Hugh Williams" <hwilli...@openlinksw.com> wrote:
Hi David,
What version of the JDK does Coldfusion use as virtjdbc2.jar is for
JDBC 2.0 used by JDKs 1.2 & 1.3, whereas virtjdbc3.jar is for JDBC
3.0 used by JDK 1.4 & 1.5 ( and compatible with JDK 1.6) ? I would
have thought Coldfusion is using something greater than JDK 1.4 at
least thus virtjdbc3.jar is what you should be using ie copy to the
CF classpath and remove the virtjdbc2.jar from that location.
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 24 Dec 2008, at 17:06, David Benge wrote:
Yea, the first one is going in fine then it hangs. If I comment
the SQL insert the loop runs all 50 so that is working. I looked
in the Coldfusion server logs and did not find anything at all.
I was trying both with and without ; on the query.
Yea, that version info is weird. I did remove 5.0.8 and installed
5.0.9 so I am not sure why its reporting the wrong version.
In CF you have a class path and you just put the jdbc libraries
there and all is good. I currently have only virtjdbc2.jar in the
lib directory for CF.
On 12/24/08 1:59 AM, "Hugh Williams" <hwilli...@openlinksw.com> wrote:
Hi David,
What is the insert query that is actually failing or causing the
hang, as looking at the server log you provide the only insert
query I see that has failed from the server log is:
09:52:03 CSLQ_0 dba 10.7.241.250 1111:29 s8259 INSERT INTO
KITN.OPENSOCIAL.PERSON
(KITNUSER_ID,PERSON_ID,ID,FIRST_NAME,LAST_NAME) VALUES
(710,'inactv1770','inactv1770','Wee Ling','Tan');
09:52:03 COMP_2 dba 10.7.241.250 1111:29 Compile text: INSERT INTO
KITN.OPENSOCIAL.PERSON
(KITNUSER_ID,PERSON_ID,ID,FIRST_NAME,LAST_NAME) VALUES
(710,'inactv1770','inactv1770','Wee Ling','Tan');
09:52:03 ERRS_0 37000 SQ074 Line 1: syntax error
Which is then immediately corrected with the ";" being removed and
is then successful:
09:52:37 CSLQ_0 dba 10.7.241.250 1111:29 s8260 INSERT INTO
KITN.OPENSOCIAL.PERSON
(KITNUSER_ID,PERSON_ID,ID,FIRST_NAME,LAST_NAME) VALUES
(710,'inactv1770','inactv1770','Wee Ling','Tan')
09:52:37 COMP_2 dba 10.7.241.250 1111:29 Compile text: INSERT INTO
KITN.OPENSOCIAL.PERSON
(KITNUSER_ID,PERSON_ID,ID,FIRST_NAME,LAST_NAME) VALUES
(710,'inactv1770','inactv1770','Wee Ling','Tan')
09:52:37 EXEC_1 dba 10.7.241.250 1111:29 s8260 Exec 1 time(s)
INSERT INTO KITN.OPENSOCIAL.PERSON
(KITNUSER_ID,PERSON_ID,ID,FIRST_NAME,LAST_NAME) VALUES
(710,'inactv1770','inactv1770','Wee Ling','Tan')
Also, you state that you virtuoso version is "Version 5.0.8.3035-
threads as of Nov 5 2008" but when I look in the server log for
the actual running instance I see:
15:48:58 Version 05.09.3035-threads for Win32 as of Nov 5 2008
So you are running the latest 5.09 release.
How did the Virtuoso JDBC driver virtjdbc.jar get in your
application server presumably you copied it their some how from the
distribution, so their must be a copy you can get the version of by
adding it to your classpath, you will also need it their for the
JDBCDemo program to locate it.
Best Regards
Hugh Williams
Professional Services
OpenLink Software
Web: http://www.openlinksw.com
Support: http://support.openlinksw.com
Forums: http://boards.openlinksw.com/support