pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wolfgang Rinnert <wrinnert@web.de>
To: pgsql-jdbc@postgresql.org
Subject: web-app not working after upgrade 7.4 to 8.1
Date: Sat, 02 Dec 2006 13:35:08 +0100
Message-ID: <457172FC.9030602@web.de> (raw)

Hello experts,

I have recently upgraded my database from 7.4 to 8.1 and migrated all data.

In order to be able to use my web-app, I replaced the old jdbc.jar with 
postgresql-8.1-407.jdbc3.jar in WEB-INF/lib/.

Restarted Tomcat (4.1.31) - and later even redeployed the webapp.

I keep getting no database connection - as if the postmaster were not 
started.

Apparently I have ignored something basic - but no idea what to look at.
This is actually my first fully working webapp using Struts and Tomcat 
on Linux - so maybe my problem is really a Tomcat issue.

I have attached part of my coding of the Struts-Action, the exception 
occurs with the message "Presumably database is down."

Any hint is apreciated.

-----------------------------------


public ActionForward execute( ActionMapping mapping,
                                   ActionForm form,
                                   HttpServletRequest request,
                                   HttpServletResponse response )
                 throws Exception
{
    HttpSession sitzg = request.getSession();
    ConnectionPool pool = (ConnectionPool) sitzg.getAttribute( JDBC );
    if (pool == null)
    {
       try
       {
          pool = new ConnectionPool( driver, dburl, username, password, 
initConn );
          sitzg.setAttribute( JDBC, pool );
       }
       catch ( SQLException e )
       {
          System.out.println( e.getMessage() );
          System.out.println( "Cannot connect to database " + database );
          e.printStackTrace();
       }
       catch ( ClassNotFoundException e )
       {
          System.out.println( e.getMessage() );
          System.out.println( "Falscher Treibername in den Properties: " 
+ driver );
          e.printStackTrace();
       }
       if (pool == null)
       {
          throw new SQLException( "ERROR: NULL pool created!  Presumably 
database is down." );
       }

-----------------------------------

Regards,

Wolfgang Rinnert
wrinnert@web.de



view thread (4+ messages)  latest in thread

Message-ID: <457172FC.9030602@web.de>
Permalink:  ../457172FC.9030602@web.de/
Also on:    postgresql.org/message-id/457172FC.9030602@web.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: wrinnert@web.de
  Subject: Re: web-app not working after upgrade 7.4 to 8.1
  In-Reply-To: <457172FC.9030602@web.de>
  References: <457172FC.9030602@web.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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