Re: No suitable error ?
Posted by: Mark Matthews
Date: October 18, 2004 07:32AM

Putting .jar files in .../jre/lib won't cause the JVM to pick them up automatically (you need to use jre/lib/ext).

The line that looks like this in your program is masking the error, because you're basically throwing away the exception that is caused when Class.forName() can't find the driver class:

try { Class.forName(this.driverName); } catch (ClassNotFoundException e) { };

You might consider at least logging the exception message in cases like this, empty 'catch' blocks are usually problematic when it comes to debugging what's going wrong with your code ;)



Options: ReplyQuote

Written By
October 18, 2004 01:55AM
Re: No suitable error ?
October 18, 2004 07:32AM
October 24, 2004 07:14PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.