Skip site navigation (1) Skip section navigation (2)

JDBC getConnection with Tomcat

From: "Murray Warren" <murray_warren(at)bah(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: JDBC getConnection with Tomcat
Date: 2006-06-30 19:14:18
Message-ID: 5F7F4FD7A39AC0498110C3395D87093D0106EAB3@MCLNEXVS01.resource.ds.bah.com (view raw or flat)
Thread:
Lists: pgsql-novice
I'm sorry for the posting, but recently re-installed my development
machine to Win XP from Win 2000.  I had everything working fine with Win
2000.  My issue is when I go the query the database from my jsp page I
receive this HTTP Status 500 error:

Exception
javax.servlet.ServletException
	
org.apache.struts.action.RequestProcessor.processException(RequestProces
sor.java:523)
		. . .


root cause
java.lang.NullPointerException
	fssm.dao.UnitDAO.getUnit(UnitDAO.java:104)
	fssm.manager.UnitManager.HqsUnit(UnitManager.java:22)

Here is what's on line 104 of UnitDAO.java:

		. . .
		Connection conn = null;
		Statement stmt = null;
		ResultSet rs = null;

		try 
		{
			conn = getConnection();
			stmt = conn.createStatement();

			rs = stmt.executeQuery(GET_HQ_UNITS_SQL);
		. . .

Any suggestion for what I should check.  I'm thinking I have a path
problem.  My web.xml points to an application.xml file in
CATALINA_HOME\conf\Catalina\localhost directory. 

Thank you,
Warren

Responses

pgsql-novice by date

Next:From: Michael SwierczekDate: 2006-06-30 19:33:51
Subject: Re: JDBC getConnection with Tomcat
Previous:From: Garcia, JoshuaDate: 2006-06-30 15:17:06
Subject: Re: insert more than one rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group