Re: Prblm: Using PostgreSQL JDBC driver from Windows. - Mailing list pgsql-jdbc
From | Dave Cramer |
---|---|
Subject | Re: Prblm: Using PostgreSQL JDBC driver from Windows. |
Date | |
Msg-id | 1027007597.15030.110.camel@inspiron.cramers Whole thread Raw |
In response to | Prblm: Using PostgreSQL JDBC driver from Windows. ("Ola Theander" <ola.theander@otsystem.com>) |
Responses |
Re: Prblm: Using PostgreSQL JDBC driver from Windows.
|
List | pgsql-jdbc |
Ola, likely a permissions problem, does the windows box have permissions to open a connection to the db? check pg_hba.conf on the server box to make sure. Also to make things simpler why don't you write a 5 line program to connect and run it from the command line, then all of the exception will be shown. Dave On Thu, 2002-07-18 at 11:48, Ola Theander wrote: > Dear subscribers. > > I've recently tried to use the PostgreSQL JDBC driver from a Windows > workstation, connecting over the network to a PostgreSQL db running on > Linux, and there seems to be a minor problem, see the attached Java > stack trace. > > The Windows computer runs a development environment with Sun's Forte for > Java 4 CE and is used to develop JSP/servlet solutions. The db server is > running PostgreSQL 7.2.1. on a SuSE Linux 8.0. My guess is that it might > have something to do with threads since the code crashes if it's in a > servlet processed by Tomcat 4.x. If I move the same code to a Java > application, i.e. an ordinary main class, the same code works. > > My next step is to check whether the same problem occurs with one of our > development computers running Linux, i.e. to find out if it's a Windows > problem or not. > > The computers are using JDK 1.4.0. > > Any help on this matter would be greatly appreciated. > > Kind regards, Ola Theander > ---- > > "Something unusual has occured to cause the driver to fail. Please report this exception: Exception: java.lang.NullPointerException > Stack Trace: > java.lang.NullPointerException > at org.postgresql.Connection.openConnection(Connection.java:155) > at org.postgresql.Driver.connect(Driver.java:149) > at java.sql.DriverManager.getConnection(DriverManager.java:512) > at java.sql.DriverManager.getConnection(DriverManager.java:171) > at add.processRequest(add.java:51) > at add.doPost(add.java:98) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:223) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.netbeans.modules.web.monitor.catalina.MonitorValve.invoke(MonitorValve.java:142) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) > at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) > at java.lang.Thread.run(Thread.java:536) > End of Stack Trace > " > ---- > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
pgsql-jdbc by date: