I have added the oracle driver ojdbc6.jar in Preferences->KNIME->Databases. I did this in the sdk itself and then when testing my node in the KNIME perspective I had to add it again.
However I get an exception that no suitable driver is found for my connection string and this means that the oracle driver is not loaded at all. I verfied this with
Class.forName("oracle.jdbc.driver.OracleDriver");
which throws a ClassNotFoundException.
How can I load and use this driver in my node automatically?
Ary our refering to the KNIME perspective in the KNIME SDK? You need to start an new KNIME application from the SDK, not just switch the perspective in the SDK.
KNIME registers all drivers found in all Jar files registered in the preferences. So you should not need to register it manually.