I'm trying to connect to a Microsoft SQL Server database with a class that looks like this

import java.sql.*;

public class ssh_test_db
    public void dbConnect(String db_connect_string)
        try {
            Connection conn = DriverManager.getConnection(db_connect_string);
            Statement statement = conn.createStatement();
            String queryString = "select * from sysobjects where type='u'";
            ResultSet rs = statement.executeQuery(queryString);
            while (rs.next()) {
        } catch (Exception e) {

    public static void main(String[] args)
        ssh_test_db connServer = new ssh_test_db();

I keep getting errors like this:

Connected to the target VM, address: '', transport: 'socket'

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000513498f7, pid=23488, tid=22732

JRE version: Java(TM) SE Runtime Environment (10.0.1+10) (build 10.0.1+10) Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0.1+10, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) Problematic frame: V [jvm.dll+0x3b98f7]

No core dump will be written. Minidumps are not enabled by default on client versions of Windows

I don't know what to look for as a cause for this error.

0 Answers