Mysql JDBC problem

Hi All

I hope someone can help me as I am having problems connecting to a MySQL database through a JSP web application using netbeans and sun applications server.

Here is my process;

Connect the Mysql database in netbeans

|

Create a connection pool

|

Create a JDBC resource

|

try and obtain a reference to the JDBC resource using the following code:

private javax.sql.DataSource getKarlLaptopJDBCResource() throws javax.naming.NamingException {

javax.naming.Context c = new javax.naming.InitialContext();

return (javax.sql.DataSource) c.lookup("java:comp/env/jdbc/KarlLaptopJDBCResource");

}

when I call source = getKarlLaptopJDBCResource();

source comes back as null;

I am able to ping the db from within the admin console. There is no entry under JNDI which relate to my database and i am not sure if i require one.

Easy time i just get a null response when trying to look up a connection.

If anyone knows of any comprehensive documentation or tutorials as I would be most grateful

Regards

Karl

[1124 byte] By [k_smolka] at [2007-11-26 10:55:28]
# 1
Hi Karl,Can you post the connection pool configuration from domain.xml Since the con. pool is created via netbeans, can you post this query to nbusers@netbeans.org ?Thanks,-Jagadish
JagadishPrasath at 2007-7-7 3:08:40 > top of Java-index,Application & Integration Servers,Application Servers...