I'm working on a webapplication using Oracle9i and JAVA (J2EE). I use the Oracle IDE JDeveloper to write my code. When I try to make a connection with JDeveloper, this connection is successfull. When I try to connect in a class with the same specifications, there goes something wrong.

My JDeveloper connection settings:
connection name : TestDb
connection type : Oracle (jdbc)
driver : thin
host name : localhost
port : <portnr>
sid : <oracle sid>

My class connections looks like this:

// Loading Driver (this part is successfull)

Connection TestDb = null;
try {
String url = "jdbcdbc:thin:@localhost:<port>:<sid>";
String username = "***";
String password = "***";
TestDb = DriverManager.getConnection(url, username, password);
catch (SQLException e) {

// Rest of code ...

Who can help me? What am I doing wrong?

Thanks in advance!