pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedweb-app not working after upgrade 7.4 to 8.1
4+ messages / 3 participants
[nested] [flat]
* web-app not working after upgrade 7.4 to 8.1
@ 2006-12-02 12:35 Wolfgang Rinnert <wrinnert@web.de>
2006-12-04 12:41 ` Re: web-app not working after upgrade 7.4 to 8.1 João Paulo Ribeiro <jp@mobicomp.com>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Rinnert @ 2006-12-02 12:35 UTC (permalink / raw)
To: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: web-app not working after upgrade 7.4 to 8.1
2006-12-02 12:35 web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
@ 2006-12-04 12:41 ` João Paulo Ribeiro <jp@mobicomp.com>
2006-12-04 18:46 ` Re: web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
0 siblings, 1 reply; 4+ messages in thread
From: João Paulo Ribeiro @ 2006-12-04 12:41 UTC (permalink / raw)
To: Wolfgang Rinnert <wrinnert@web.de>; +Cc: pgsql-jdbc
Its possible that your upgrade missed up the postgres configuration.
Verifiy if the postgres is waiting for connections at port 5342.
As root try:
netstat -ntlp | grep 5432
You should see somenting like:
tcp 0 0 0.0.0.0:5432
0.0.0.0:* LISTEN 3668/postmaster
tcp 0 0 :::5432
:::* LISTEN 3668/postmaster
If not, postgres is not waiting for connections and you'll get the "no
database connection" error.
JP
Wolfgang Rinnert wrote:
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
João Paulo Ribeiro | Senior Software Engineer
jp@mobicomp.com
PHONE: + 351 253 305 250
FAX : + 351 253 305 250
www.mobicomp.com
________________________________________________________________
About Solutions | Wireless World
CONFIDENTIALITY NOTICE: This message, as well as existing attached files, is confidential and intended exclusively for the individual(s) named as addressees. If you are not the intended recipient, you are kindly requested not to make any use whatsoever of its contents and to proceed to the destruction of the message, thereby notifying the sender.
DISCLAIMER: The sender of this message can not ensure the security of its electronic transmission and consequently does not accept liability for any fact which may interfere with the integrity of its content.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: web-app not working after upgrade 7.4 to 8.1
2006-12-02 12:35 web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
2006-12-04 12:41 ` Re: web-app not working after upgrade 7.4 to 8.1 João Paulo Ribeiro <jp@mobicomp.com>
@ 2006-12-04 18:46 ` Wolfgang Rinnert <wrinnert@web.de>
2006-12-12 11:14 ` Re: web-app not working after upgrade 7.4 to 8.1 Paul Thomas <paul@tmsl.demon.co.uk>
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Rinnert @ 2006-12-04 18:46 UTC (permalink / raw)
To: João Paulo Ribeiro <jp@mobicomp.com>; pgsql-jdbc
Hello Joao,
João Paulo Ribeiro wrote:
> Its possible that your upgrade missed up the postgres configuration.
> Verifiy if the postgres is waiting for connections at port 5342.
> As root try:
> netstat -ntlp | grep 5432
>
Thanks for your tip. I tried it - that is not the problem.
What I am going to do, is write a minimal web application that connects
to the database, and see if I can get to the core of the problem.
Since this is a hobby and I have to do it in the evening besides
professional work and family affairs, it will take me some time.
Thanks anyways.
Wolfgang
...
> JP
>
>
> Wolfgang Rinnert wrote:
>> 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.
>>
>>...
>> Any hint is apreciated.
>>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: web-app not working after upgrade 7.4 to 8.1
2006-12-02 12:35 web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
2006-12-04 12:41 ` Re: web-app not working after upgrade 7.4 to 8.1 João Paulo Ribeiro <jp@mobicomp.com>
2006-12-04 18:46 ` Re: web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
@ 2006-12-12 11:14 ` Paul Thomas <paul@tmsl.demon.co.uk>
0 siblings, 0 replies; 4+ messages in thread
From: Paul Thomas @ 2006-12-12 11:14 UTC (permalink / raw)
To: Wolfgang Rinnert <wrinnert@web.de>; +Cc: pgsql-jdbc
On 04/12/2006 18:46 Wolfgang Rinnert wrote:
> Hello Joao,
>
> João Paulo Ribeiro wrote:
>> Its possible that your upgrade missed up the postgres configuration.
>> Verifiy if the postgres is waiting for connections at port 5342.
>> As root try:
>> netstat -ntlp | grep 5432
>>
> Thanks for your tip. I tried it - that is not the problem.
>
> What I am going to do, is write a minimal web application that connects
> to the database, and see if I can get to the core of the problem.
> Since this is a hobby and I have to do it in the evening besides
> professional work and family affairs, it will take me some time.
>
> Thanks anyways.
>
> Wolfgang
pg_hba.conf?
--
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-12-12 11:14 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-02 12:35 web-app not working after upgrade 7.4 to 8.1 Wolfgang Rinnert <wrinnert@web.de>
2006-12-04 12:41 ` João Paulo Ribeiro <jp@mobicomp.com>
2006-12-04 18:46 ` Wolfgang Rinnert <wrinnert@web.de>
2006-12-12 11:14 ` Paul Thomas <paul@tmsl.demon.co.uk>
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