File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes access violation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "access violation" Watch "access violation" New topic
Author

access violation

Peter Guillebaud
Ranch Hand

Joined: Jul 11, 2001
Posts: 57
Does anyone know why I might be getting 'access violation' errors from my jsp pages? I am running ms-sql on win NT4 with Tomcat. A jsp page will sometimes display a resultset from a database table but intermittantly it crashes tomcat and displays :
java.exe Exception: access violation ( at a certain address )
please help!
code is:
<%@ page import = "java.sql.*" %>
<%
//params
String url = "jdbc dbc:callLog";
String username = "root";
String password = "";
String theDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName ( theDriver );
Connection conn = DriverManager.getConnection ( url, username, password );
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery ( "Select * from clientCompany" );

//display
while ( rs.next())
{
String theName = rs.getString ( "companyName" );
String theAdd1 = rs.getString ( "add1" );

out.println ( theName + ": " + theAdd1 + "<br>" );
}
%>
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Have you tried a different driver, other than the jdbc-odbc bridge. It's not very fast, and not a recommended driver. I apologize if there is no other one, but the access violation with a HEX number seems a bit awful.
Peter Guillebaud
Ranch Hand

Joined: Jul 11, 2001
Posts: 57
thanks Mike, I am trying it with a different jdk - I was using jdk1.2.2, now jdk1.3 and the problem seems to have stopped.
 
 
subject: access violation