| From: | Stephen Davies <sdavies(at)sdc(dot)com(dot)au> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: JDBC issue |
| Date: | 2026-07-12 07:40:59 |
| Message-ID: | 249a6fb9-4d31-4640-a391-0b6e16798667@sdc.com.au |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 12/7/26 16:43, Christophe Pettus wrote:
>
>
>> On Jul 12, 2026, at 00:01, Stephen Davies <sdavies(at)sdc(dot)com(dot)au> wrote:
>>
>> I have several JDBC-based programs on my Rocky Linux 9.8 box.
>> Postgresql 17.10 and JDBC 42.7.2.
>> As of today, these programs all fail because the JDBC connections do not work and the following code example produces no output except:
>>
>> "org.apache.jasper.JasperException: An exception occurred processing [/jsp/browsewineries.jsp] at line [48] st1 is null".
>
>
> Look at catalina.out (or journalctl -u tomcat) for the e.printStackTrace() output; that should get you the real exception. You can also check the PostgreSQL logs to see if it even made it to opening the connection.
>
>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:570)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:456)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:350)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:301)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
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)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:428)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:350)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:301)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
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.
psql access to the same databases still works.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Davies | 2026-07-12 07:48:57 | Re: JDBC issue |
| Previous Message | Christophe Pettus | 2026-07-12 07:13:36 | Re: JDBC issue |