Re: Exception when trying to configure a pool of connections for use of WS

2008-09-06 Thread David Smith
Oops! I goofed in adapting the docs example. The code yours should look like is below. Oddly enough, the mistake I made in my previous post would have caused the error you were asking about. --David David Smith wrote: This isn't the code I was asking for. You should have some code that lo

Re: Exception when trying to configure a pool of connections for use of WS

2008-09-06 Thread David Smith
This isn't the code I was asking for. You should have some code that looks up the DataSource via JNDI (javax.naming.* classes). Following the examples in the tomcat docs, it would look like: Context initContext = new InitialContext(); DataSource ds = (Context)initContext.lookup("java:/comp/e

Re: Exception when trying to configure a pool of connections for use of WS

2008-09-06 Thread Daniele Development-ML
No, actually it happens when I invoke the WS, which access to the DB. Daniele On Sat, Sep 6, 2008 at 4:44 PM, Len Popp <[EMAIL PROTECTED]> wrote: > Does the error occur in that piece of code or is it during Tomcat > startup? The stack trace looks like the exception is thrown during > startup, if

Re: Exception when trying to configure a pool of connections for use of WS

2008-09-06 Thread Len Popp
Does the error occur in that piece of code or is it during Tomcat startup? The stack trace looks like the exception is thrown during startup, if I'm reading it correctly. -- Len On Sat, Sep 6, 2008 at 06:29, Daniele Development-ML <[EMAIL PROTECTED]> wrote: > Thanks David! > The code is: > > Clas

Re: Exception when trying to configure a pool of connections for use of WS

2008-09-06 Thread Daniele Development-ML
Thanks David! The code is: Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/cellmlrep"; Connection con = DriverManager.getConnection(url, "root", ""); Statement stmt = con.createStatement(); String query = "SELECT * FROM user_accounts u;"; stmt.executeQuery(quer

Re: Exception when trying to configure a pool of connections for use of WS

2008-09-05 Thread David Smith
And the code you use to get a connection? Looks like the database pool should be fine, you are getting a javax.sql.DataSource object but treating it as a java.naming.Context object. As an aside and definitely not things affecting the issue you describe below: 1. Do not use the root user in th