pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC/Netscape/PostgreSQL Problem
2+ messages / 2 participants
[nested] [flat]

* JDBC/Netscape/PostgreSQL Problem
@ 2000-02-21 07:37 Allan Huffman <huffmana@ppc.pims.org>
  2000-02-21 15:46 ` Re: [INTERFACES] JDBC/Netscape/PostgreSQL Problem Ralf Lehmann <ralf@lehmann.cc>
  0 siblings, 1 reply; 2+ messages in thread

From: Allan Huffman @ 2000-02-21 07:37 UTC (permalink / raw)
  To: pgsql-interfaces

Java Database Connection Problem

Environment:
The hope.class, java application is working under the Visual Café (Data
Base Edition 3.0c) environment using jdbc6_5-1_1.jar (loaded in the
Internal VM in the Environmental Options, as a classpath setting).  The
PostgreSQL database (Version 6.5.2) is running on the Sun Sparc
demo.ppc.pims.org.  The web server is running Netscape Suitespot 3.5.1
on another Sparc.  Our user’s will access the web server using Netscape
Communicator 4.5 or higher from a PC running Windows NT 4.0 Service Pack
4 or 5.

Suitespot Administrator Setup
      An additional Directory is made with the Suitespot Administrator
as follows:
      ADDITIONAL DOCUMENT DIRECTORY
      Prefix /hope
      Directory /vol1/HTML/pass

The Suitespot Administrator configuration is:
       Primary: Directory /vol1/HTML
       Index Filenames: index.html,home.html,index.htm

The following is in the script for starting the Suitespot server, the
https-default “start” script:

CLASSPATH=$CLASSPATH:/export/home/huffmana/postgresql.jar:/export/home/huffmana:

      /vol1/HTML/pass:/vol1/HTML/pass/postgresql.jar

I’ve also set the CLASSPATH in the UNIX shell before starting “nohup
postmaster –i”

HTML
       <HTML>
      <HEAD>
      <TITLE>hope.html</TITLE>
      </HEAD>
      <BODY>
      <APPLET CODE="hope.class" archive="postgresql.jar" WIDTH=665
HEIGHT=631></APPLET>
      </BODY>
      </HTML>

Running from Netscape Communicator
      Netscape Communications Corporation -- Java 1.1.5
      Type '?' for options.
      Symantec Java! ByteCode Compiler Version 210.065
      Copyright (C) 1996-97 Symantec Corporation
      ===>INSTANTIATE CONNECTIONMGR<===
      {{{{{{{{{{{{{{{{{JDBCConnection 1}}}}}}}}}}}}}}}}}}}
      {{{{{{{{{{{{{{{{{INITIALIZATION 1}}}}}}}}}}}}}}}}}}}
      {{{{{{{{{{{ATTEMPT CONNECTION demo.ppc.pims.org}}}}}}}}}}}}}
      java.lang.NullPointerException
        at postgresql.util.PSQLException.translate(Compiled Code)
        at postgresql.util.PSQLException.<init>(Compiled Code)
        at postgresql.Driver.connect(Compiled Code)
        at java.sql.DriverManager.getConnection(Compiled Code)
        at java.sql.DriverManager.getConnection(Compiled Code)
        at ConnectionMgr1.<init>(Compiled Code)
        at hope.init(Compiled Code)
      * at
netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
Code)
        at
java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
        at java.awt.EventDispatchThread.run(Compiled Code)
        at
netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
Code)

Java Code
       The null pointer occurs at the getConnection statement
            Connection con;
            con = DriverManager.getConnection(
                "jdbc:postgresql://demo.ppc.pims.org/cpass",
                "postgres",
                "postgres");

I’ve tried using the IP address with the same results.  Any ideas?

Allan from Belgium






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [INTERFACES] JDBC/Netscape/PostgreSQL Problem
  2000-02-21 07:37 JDBC/Netscape/PostgreSQL Problem Allan Huffman <huffmana@ppc.pims.org>
@ 2000-02-21 15:46 ` Ralf Lehmann <ralf@lehmann.cc>
  0 siblings, 0 replies; 2+ messages in thread

From: Ralf Lehmann @ 2000-02-21 15:46 UTC (permalink / raw)
  To: Allan Huffman <huffmana@ppc.pims.org>; +Cc: pgsql-interfaces



Allan Huffman schrieb:
> 
> Java Database Connection Problem
> 
> Environment:
> The hope.class, java application is working under the Visual Café (Data
> Base Edition 3.0c) environment using jdbc6_5-1_1.jar (loaded in the
> Internal VM in the Environmental Options, as a classpath setting).  The
> PostgreSQL database (Version 6.5.2) is running on the Sun Sparc
> demo.ppc.pims.org.  The web server is running Netscape Suitespot 3.5.1
> on another Sparc.  Our user’s will access the web server using Netscape
> Communicator 4.5 or higher from a PC running Windows NT 4.0 Service Pack
> 4 or 5.
> 
> Suitespot Administrator Setup
>       An additional Directory is made with the Suitespot Administrator
> as follows:
>       ADDITIONAL DOCUMENT DIRECTORY
>       Prefix /hope
>       Directory /vol1/HTML/pass
> 
> The Suitespot Administrator configuration is:
>        Primary: Directory /vol1/HTML
>        Index Filenames: index.html,home.html,index.htm
> 
> The following is in the script for starting the Suitespot server, the
> https-default “start” script:
> 
> CLASSPATH=$CLASSPATH:/export/home/huffmana/postgresql.jar:/export/home/huffmana:
> 
>       /vol1/HTML/pass:/vol1/HTML/pass/postgresql.jar
> 
> I’ve also set the CLASSPATH in the UNIX shell before starting “nohup
> postmaster –i”
> 
> HTML
>        <HTML>
>       <HEAD>
>       <TITLE>hope.html</TITLE>
>       </HEAD>
>       <BODY>
>       <APPLET CODE="hope.class" archive="postgresql.jar" WIDTH=665
> HEIGHT=631></APPLET>
>       </BODY>
>       </HTML>
> 
> Running from Netscape Communicator
>       Netscape Communications Corporation -- Java 1.1.5
>       Type '?' for options.
>       Symantec Java! ByteCode Compiler Version 210.065
>       Copyright (C) 1996-97 Symantec Corporation
>       ===>INSTANTIATE CONNECTIONMGR<===
>       {{{{{{{{{{{{{{{{{JDBCConnection 1}}}}}}}}}}}}}}}}}}}
>       {{{{{{{{{{{{{{{{{INITIALIZATION 1}}}}}}}}}}}}}}}}}}}
>       {{{{{{{{{{{ATTEMPT CONNECTION demo.ppc.pims.org}}}}}}}}}}}}}
>       java.lang.NullPointerException
>         at postgresql.util.PSQLException.translate(Compiled Code)
>         at postgresql.util.PSQLException.<init>(Compiled Code)
>         at postgresql.Driver.connect(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at java.sql.DriverManager.getConnection(Compiled Code)
>         at ConnectionMgr1.<init>(Compiled Code)
>         at hope.init(Compiled Code)
>       * at
> netscape.applet.DerivedAppletFrame$InitAppletEvent.dispatch(Compiled
> Code)
>         at
> java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
>         at java.awt.EventDispatchThread.run(Compiled Code)
>         at
> netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
> Code)
> 
> Java Code
>        The null pointer occurs at the getConnection statement
>             Connection con;
>             con = DriverManager.getConnection(
>                 "jdbc:postgresql://demo.ppc.pims.org/cpass",
>                 "postgres",
>                 "postgres");


try again wiht con = DriverManager.getConnection(
>                 "jdbc:postgresql://demo.ppc.pims.org:port/cpass",  //the port who postresql runs most 5432
>                 "postgres",
>                 "postgres");


mfg
ralf lehmann

PS:look in the jdbc sources at
/pqsql/src/interfaces/jdbc/postgresql/driver.java
there are comments to the getConnection func.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2000-02-21 15:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-02-21 07:37 JDBC/Netscape/PostgreSQL Problem Allan Huffman <huffmana@ppc.pims.org>
2000-02-21 15:46 ` Ralf Lehmann <ralf@lehmann.cc>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox