• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

access violation

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>" );
}
%>
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
What's that smell? I think this tiny ad may have stepped in something.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic