From: | Peter Royal <proyal(at)pace2020(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | NPE in creating a SQLException |
Date: | 2003-07-29 14:01:13 |
Message-ID: | 1D12FEA0-C1CD-11D7-AC9E-000393B61B56@pace2020.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I'm getting the below NPE:
java.lang.NullPointerException
at java.io.PrintWriter.write(PrintWriter.java:247)
at java.io.PrintWriter.print(PrintWriter.java:392)
at java.io.PrintWriter.println(PrintWriter.java:529)
at java.lang.Throwable.printStackTrace(Throwable.java:509)
at java.sql.SQLException.<init>(SQLException.java:103)
at
org.postgresql.util.PSQLException.<init>(PSQLException.java:19)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connec
tion.java:480)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connec
tion.java:461)
at
org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1
Connection.java:942)
The offense starts here (SQLException:103)
if (!(this instanceof SQLWarning)) {
if (DriverManager.getLogWriter() != null) {
printStackTrace(DriverManager.getLogWriter());
}
}
And then continues on to (Throwable:509)
synchronized (s) {
s.println(this);
StackTraceElement[] trace = getOurStackTrace();
It is the "s.println(this)" that is causing errors... All of this is
happening in the constructor, so I guess that is why 'this' is null?
I'm not 100% sure and pretty confused by it all :/
-pete
From | Date | Subject | |
---|---|---|---|
Next Message | Carlos Guzman Alvarez | 2003-07-29 14:04:16 | Re: Passing server_encoding to the client is not future-proof |
Previous Message | Fernando Nasser | 2003-07-29 14:00:28 | Re: Problem with LargeObject/jdbc when writing short (Repost) |