Re: Fwd:Re[2]: mod_jk and JDBC?
It's hard to tell from that stack trace. It's clearly barfing inside the oracle driver, not in tomcat. But I think if you set the system property "JdbcTrace=true", then you will see more detailed information. You might need to call "OracleLog.initialize()" first -- I'm not sure if it's done automatically or not. Sorry I can't be of more help. T Robert Dana wrote: Forward Header_ Subject:Re[2]: mod_jk and JDBC? Author: Robert Dana Date: 12/5/00 12:46 PM Travis, Thanks for your interest. Here it is: oracle.jdbc.dbaccess.DBError.check_error(DBError.java, Compiled Code) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java, Compiled Code) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java, Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at ReadFromCarmen.doGet(ReadFromCarmen.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp 12ConnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) Reply Separator Subject:Re: mod_jk and JDBC? Author: Travis Low [EMAIL PROTECTED] Date: 12/5/00 11:23 AM Would you please post the stack trace for the exception? T Robert Dana wrote: I am trying to upgrade from Tomcat 3.1 and mod_jserv to Tomcat 3.2 and mod_jk. Everything seemed to go just fine with the installation, and I am able to run JSPs and servlets without any problems. With one BIG exception: the upgrade has left me without the capacity to establish JDBC connections. The details of my environment are as follows: RedHat Linux 6.2 Apache 1.3.9 mod_jk built from the Jakarta-tomcat-3.2-src distribution Oracle 8.0.5 To illustrate the problem, I wrote a simple servlet to test if JDBC works. I also wrote this as a Java program, which runs from the command line without a problem. I know, therefore, that my database is responding normally to JDBC calls. As a servlet, however, the program reports that the driver is loaded and then throws an SQLException indicating that it cannot connect to the database server. When Tomcat starts up, it does report that the JDBC drivers are in its CLASSPATH and, as I said, the driver does get loaded OK, it just can't connect. By the way, just to keep things as simple as possible, Apache, Tomcat and Oracle are all running on the same machine in this example. The servlet also runs fine under Tomcat 3.1 and mod_jserv. Has anyone else experienced this problem? Can anybody suggest a solution? Robert Dana ORC Macro International import java.sql.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ReadFromCarmen extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html"); PrintWriter out = res.getWriter(); // The driver to load String driver_class = "oracle.jdbc.driver.OracleDriver"; // The query we will execute String query = "select sysdate from dual"; try { // Load the JDBC driver Class.forName(driver_class); out.println("loaded...BR"); // servlet works up to this point // Connect to the database // !! actual server name has been removed just for this email !! Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@:1521:ora8", "scott", "tiger"); out.println("connected...BR"); // this never makes it to the browser // Create a statement Statement stmt = conn.createStatement(); out.println("created statement...BR"); // Execute the query ResultSet rset = stmt.executeQuery(query); out.println("executed query...BR");
RE: Fwd:Re[2]: mod_jk and JDBC?
Is this the thin driver or the one that requires OCI/client install. I have been successfully running the thin drivers against 8.1.6 for some time now (jdk 1.1.8) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Travis Low Sent: Tuesday, December 05, 2000 03:43 PM To: [EMAIL PROTECTED] Subject: Re: Fwd:Re[2]: mod_jk and JDBC? It's hard to tell from that stack trace. It's clearly barfing inside the oracle driver, not in tomcat. But I think if you set the system property "JdbcTrace=true", then you will see more detailed information. You might need to call "OracleLog.initialize()" first -- I'm not sure if it's done automatically or not. Sorry I can't be of more help. T Robert Dana wrote: Forward Header_ Subject:Re[2]: mod_jk and JDBC? Author: Robert Dana Date: 12/5/00 12:46 PM Travis, Thanks for your interest. Here it is: oracle.jdbc.dbaccess.DBError.check_error(DBError.java, Compiled Code) at oracle.jdbc.driver.OracleConnection.(OracleConnection.java, Compiled Code) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java, Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at ReadFromCarmen.doGet(ReadFromCarmen.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java, Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java, Compiled Code) at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled Code) at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp 12ConnectionHandler.java, Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code) at java.lang.Thread.run(Thread.java, Compiled Code) Reply Separator Subject:Re: mod_jk and JDBC? Author: Travis Low [EMAIL PROTECTED] Date: 12/5/00 11:23 AM Would you please post the stack trace for the exception? T Robert Dana wrote: I am trying to upgrade from Tomcat 3.1 and mod_jserv to Tomcat 3.2 and mod_jk. Everything seemed to go just fine with the installation, and I am able to run JSPs and servlets without any problems. With one BIG exception: the upgrade has left me without the capacity to establish JDBC connections. The details of my environment are as follows: RedHat Linux 6.2 Apache 1.3.9 mod_jk built from the Jakarta-tomcat-3.2-src distribution Oracle 8.0.5 To illustrate the problem, I wrote a simple servlet to test if JDBC works. I also wrote this as a Java program, which runs from the command line without a problem. I know, therefore, that my database is responding normally to JDBC calls. As a servlet, however, the program reports that the driver is loaded and then throws an SQLException indicating that it cannot connect to the database server. When Tomcat starts up, it does report that the JDBC drivers are in its CLASSPATH and, as I said, the driver does get loaded OK, it just can't connect. By the way, just to keep things as simple as possible, Apache, Tomcat and Oracle are all running on the same machine in this example. The servlet also runs fine under Tomcat 3.1 and mod_jserv. Has anyone else experienced this problem? Can anybody suggest a solution? Robert Dana ORC Macro International import java.sql.*; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class ReadFromCarmen extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { res.setContentType("text/html"); PrintWriter out = res.getWriter(); // The driver to load String driver_class = "oracle.jdbc.driver.OracleDriver"; // The query we will execute String query = "select sysdate from dual"; try { // Load the JDBC driver Class.forName(driver_class); out.println("loaded...BR"); // servlet works up to this point // Connect to the database // !! actual server name has been removed just for this email !! Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@:1521:ora8&qu