Hi Ugo,

Thanks a lot, you pointed exactly my mistake. The error message made me think it was a driver related problem. For this reason, I didn't double check the url... which was malformed...

Thanks for the precision regarding the cocoon.xconf as well.


Ugo Cei wrote:
Il giorno 07/dic/04, alle 14:03, Nicolas Rod ha scritto:

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.


Your code looks fine to me. Are you sure you are using the right kind of url? It should be something like "jdbc:oracle:thin:@hostname:1521:SID".


The driver class is loaded in the web.xml, as I know it has to be.


It does not have to be, if you are loading the driver by yourself, like in the above code. It has to be only if you declare a datasource component in cocoon.xconf, which does not seem to be your case.

    Ugo


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to