class not found exception

Поиск
Список
Период
Сортировка
Искать

class not found exception

От:
"vijay raghava" <vijayaraghava_m@rediffmail.com>
Дата:



  Hello Postgresql users,
          I wrote a normal java application(using main() method) and
successfully connected to postgresql database but when I connect to it
using JSP, Iam getting 'Class not found exception'.Iam using pg73jdbc1.jar and jdk1.4.1_04 and Red Hat Linux 9.0.The web server is
Jakarta Tomcat 5.0.4.Please help me.Send a reply as soon as possible.


    M.Vijaya Raghava
 




Re: class not found exception

От:
Dave Cramer <pg@fastcrypt.com>
Дата:
Vijaya,

Did you read this?

http://doc.postgresintl.com/jdbc/ch11s04.html

If you aren't using datasource's then can you post the code and your web
configuration?

Dave

On Fri, 2004-03-05 at 12:15, vijay raghava wrote:
>    Hello Postgresql users,
>           I wrote a normal java application(using main() method) and 
> successfully connected to postgresql database but when I connect to it
> using JSP, Iam getting 'Class not found exception'.Iam using pg73jdbc1.jar and jdk1.4.1_04 and Red Hat Linux 9.0.The web server is 
> Jakarta Tomcat 5.0.4.Please help me.Send a reply as soon as possible.
> 
> 
>     M.Vijaya Raghava
>   
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561

Re: class not found exception

От:
Oliver Jowett <oliver@opencloud.com>
Дата:
vijay raghava wrote:

> Iam using pg73jdbc1.jar and jdk1.4.1_04

You are using the JDBC1 build of the driver; you should be using a JDBC3 
build with JDK 1.4.

(I don't know if this is causing the problem you see, but it won't be 
helping)

-O

connection problem - why idle

От:
dinakar <din_akar@yahoo.com>
Дата:
Hi All, 

 We have hosted an web application and now it is live.


 s/w used : Apache, Tomcat 4.1.x, Postgresql 7.x 

 It seems that there is a major problem with the
database connectivity.  

 What we are seeing is that over a period of time the
database reports more and more connections from the
our web application until the connection limit (100 on
our setup) is reached. 

this is a sample code i am using across application. 

whether we need to release the connection explicitly ?

As of now i have not released the connection only i
have closed it .... ? 

/*****************************************************/

       -------------my db class-----------------
try {
		
	this.setConnection(ConnectionPool.getConnection()); 
	ArrayList arrList = new ArrayList();

	con.setAutoCommit(false);
	preStmt 	= con.prepareStatement("SELECT * from t");
	resultSet 	= preStmt.executeQuery();

	while (resultSet.next()) {
		.....
		.....
	}
	return arrList;	
} 
catch(Exception ex) {
	sberror.append(ex.getMessage());
	return null;
}

finally {
	try {
		con.setAutoCommit(true);
		resultSet.close();
		preStmt.close();
        con.close();
	} 
	catch (SQLException e) {
       	sberror.append(e.getMessage());
		return null;
	}
}


      -----------my Connectionpool class-----------

public static Connection getConnection() {

	Connection con = null;
	javax.sql.DataSource ds;
    try {
    	InitialContext ctx = new InitialContext();
		ds = (DataSource)
ctx.lookup("java:comp/env/jdbc/postgres");
		if (ds != null) {
			con = ds.getConnection();
		}
		else 
			return null;
        }		
	catch (Exception e) {
		return null;
	}
	return con;
}


/*****************************************************/


please help... 

Thanks, 
Dinakar 

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

any way in PG to check idle connections and close it automatically

От:
dinakar <din_akar@yahoo.com>
Дата:
Hi All, 

Is there any way in Postgresql 7.x to check for idle
connections and close it automatically. ? 

please advise. 

Thanks, 
Dinakar 

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com
FAQ