Hi there,

This post might not be struts-related, but I read so many posts on this issue, 
that I thought I might ask...
Having read all the posts, I still cannot estabilish database connection using 
connection pooling.
I think I made all the settings I need, but still nothing...
1) I have a <context> tag in my server.xml
2) I used the following source code to connect:

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

1.    Context ctx = new InitialContext();
2.        if(ctx == null )  throw new Exception("No Context");
3.            
4.            Context envCtx = (Context) ctx.lookup("java:comp/env");           
 
5.            DataSource ds = (DataSource) envCtx.lookup("jdbc/akr_db");
6.                        
7.            if (ds != null) {
8.                Connection conn = ds.getConnection();
9.                
10.                if(conn != null)  {
            .....   ..... .....
------------

I can get the datasource (5th line), but I cannot get connection (8th line). It 
exits with the following error message, however, I have set both the driver 
class name and url in my server.xml:

"org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'"

Any ideas what's next?

Thanks a lot,

  BM



 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

Reply via email to