DBCP Connection Configuration
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Douglas_SIX
Posted On:   Thursday, December 5, 2002 02:48 PM

Hi, I'm trying to make a connection to my postgresql server using DBCP Tomcat Connection Pool Classes. But the only result I have is java.sql.SQLException: No suitable driver Here is my configuration: Tomcat 4.1 standalone j2sdk 1.4 postgresql JDBC driver in the common/lib tomcat folder all needed jar files in the common/lib tomcat folder photo.jocl file in my application folder WEB-INF/classes/org/apache/commons/dbcp/Poolingdriver/photo.jocl Here is my photo.jocl:    More>>

Hi,

I'm trying to make a connection to my postgresql server using DBCP Tomcat Connection Pool Classes.

But the only result I have is java.sql.SQLException: No suitable driver



Here is my configuration:

Tomcat 4.1 standalone

j2sdk 1.4

postgresql JDBC driver in the common/lib tomcat folder

all needed jar files in the common/lib tomcat folder

photo.jocl file in my application folder WEB-INF/classes/org/apache/commons/dbcp/Poolingdriver/photo.jocl



Here is my photo.jocl:

			
				













And finally here is my JSP code:

			<%@ page import="java.sql.*" %>
			
<%

String url = "jdbc:apache:commons:dbcp:/photo";

try{
Connection conn = DriverManager.getConnection(url);
conn.close();
}catch(SQLException ex){
out.print("
Voici l'url : " + url + " et voici l'erreur : " + ex.toString() + "

");
}catch(Exception e){
out.print("Erreur plus grave : " + e.toString());
}
%>

Can you help me ?

Thanks for all,

Douglas.

   <<Less
About | Sitemap | Contact