Re: JDBC issue - Mailing list pgsql-general

From shammat@gmx.net
Subject Re: JDBC issue
Date
Msg-id bf09cc4a-a107-4c0a-b051-0b0638ceebfe@gmx.net
Whole thread
In response to Re: JDBC issue  (Stephen Davies <sdavies@sdc.com.au>)
List pgsql-general
Am 12.07.26 um 09:40 schrieb Stephen Davies:
> Root Cause
>
> java.lang.NullPointerException: Cannot invoke "java.sql.Statement.executeQuery(String)" because "st1" is null
>      org.apache.jsp.jsp.browsewineries_jsp._jspService(browsewineries_jsp.java:171)
>      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:62)
>
> Tells me nothing more.
> The code has to go past the connection and statement lines to get to the query line.
> This code has been working for several years before today.
There is a variable named "st1" in the servlet code which is NULL.

This is not a Postgres error, but an error in your code.

You need to check how st1 is populated in the Java code.

If I had to guess: the code retrieves data from the database and receives a NULL
value that it does not expect and thus not check.





pgsql-general by date:

Previous
From: Stephen Davies
Date:
Subject: Re: JDBC issue
Next
From: Mihir Kandoi
Date:
Subject: Transaction Isolation level for ERP software