You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/06/26 17:05:53 UTC
DO NOT REPLY [Bug 10249] New: -
Tomcat hangs with Interclient JDBC driver
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10249>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10249
Tomcat hangs with Interclient JDBC driver
Summary: Tomcat hangs with Interclient JDBC driver
Product: Tomcat 4
Version: 4.0.4 Final
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: webmaster@cienciapura.com.br
I have an environment with multiple virtual hosts. One of my users put an
Interclient JDBC driver in his area and after trying to use it, Tomcat hangs.
The curious is that 'connectionless' JSP pages work fine. Servlets and JSP
pages that tries to connect to other databases, like MySQL, hangs too. I had
top restart Tomcat.
It might be a bug with JDBC2.0 or even in the driver, but I think Tomcat should
be robust enough and harm other user's application.
Steps to reproduce:
- download the driver:
http://www.kpi.com.au/interbase/files/interclient.jar
( you don't need to have Interbase server running anywhere !!)
- servlet:
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Interbase extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
res.setContentType("text/html");
PrintWriter out = res.getWriter();
try {
Class.forName("interbase.interclient.Driver");
Connection con = DriverManager.getConnection
("jdbc:interbase://localhost/data/mydb.gdb","SYSDBA","masterkey");
stmt = con.createStatement();
rs = stmt.executeQuery("SELECT * from users");
out.println("<HTML>");
out.println("<BODY>");
while (rs.next()) {
out.println(rs.getString(1));
}
rs.close();
con.close();
out.println("</BODY></HTML>");
}
catch(ClassNotFoundException e) {
out.println("ERROR " + e.getMessage());
}
catch(SQLException e) {
out.println("ERROR " + e.getMessage());
}
finally {
// Always close the database connection.
try {
if (con != null) con.close();
}
catch (SQLException ignored) { }
out.flush();
out.close();
}
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>