Hi,
I'm quite new to cocoon and I'm trying to make a jdbc connection in a custom generator but I always get this error which can be found in the sitemap.log: 'java.sql.SQLException: No suitable driver'
Here's the code I use in my generator:
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url, username, password);I also tried with:
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver()); Connection conn = DriverManager.getConnection(url, username, password);
Both codes give me the same error.
If I try to instanciate the OracleDriver like the following code, the debug shows me "od isn't 'null'", meaning the driver class is found.
OracleDriver od = new oracle.jdbc.driver.OracleDriver();
if(od==null)
getLogger().debug("od is 'null'");
else
getLogger().debug("od isn't 'null'");
The driver class is loaded in the web.xml, as I know it has to be.
If I use the same code in simple Java class, out of cocoon, it connects without any problem.
Does anyone have any idea why this happens ?
Thanks, Nicolas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
