Re: Client "Host not found"
- From: "lujate" <jtaylor@xxxxxxxxxxxxx>
- Date: 14 Mar 2006 09:48:14 -0800
The ping command was ran from a command line, PING 'x.x.x.x'.
Here is the java code:
--------------------------------------------------------------------------------------------
import java.sql.*;
public class Jdbc {
public static void main (String args[]) throws Exception {
try {
java.lang.Class.forName
("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Connection c = java.sql.DriverManager.getConnection
("jdbc:sqlserver://x.x.x.x;user=Anonymous;password=guest;");
System.out.println("Connected");
}
catch (SQLException se) {
do {
System.out.println("SQL STATE: " + se.getSQLState());
System.out.println("ERROR CODE: " + se.getErrorCode());
System.out.println("MESSAGE: " + se.getMessage());
System.out.println();
se = se.getNextException();
} while (se != null);
se.printStackTrace();
}
}
}
--------------------------------------------------------------------------------------------
And the stack trace.
java.lang.NullPointerException
at java.lang.Throwable.<init>(Throwable.java:180)
at java.lang.Exception.<init>(Exception.java:29)
at java.lang.RuntimeException.<init>(RuntimeException.java:32)
at
java.lang.NullPointerException.<init>(NullPointerException.java:36)
at Jdbc.main(Jdbc.java:6)
.
- Follow-Ups:
- Re: Client "Host not found"
- From: Joe Weinstein
- Re: Client "Host not found"
- References:
- Client "Host not found"
- From: lujate
- Re: Client "Host not found"
- From: Joe Weinstein
- Client "Host not found"
- Prev by Date: Re: Client "Host not found"
- Next by Date: Re: Client "Host not found"
- Previous by thread: Re: Client "Host not found"
- Next by thread: Re: Client "Host not found"
- Index(es):