I have the following code (most of the gui made using the NetBeans ide):
public static void main(String[] args) {
launch(AuctioneerGui.class, args);
Class.forName("oracle.jdbc.OracleDriver").newInstance();
System.out.println("1");
System.out.println(Thread.currentThread().toString());
System.out.println(SwingUtilities.isEventDispatchThread());
Connection conn = DriverManager.getConnection(dbUrl, dbUser, dbPass);
System.out.println("2");
The output is:
1
Thread[main,5,main]
false
As you can see, no exception is thrown, and the program halts forever on the getConnection statement.
This only happens if the DB is remote, if it is locally it doesn't get stuck. Additionally, if I comment the GUI builder and run it with a remote DB, it works again.
Anyone has any tip as to why this is happening?
Edited by: TylerDurden83 on Dec 17, 2009 3:01 AM
Edited by: TylerDurden83 on Dec 17, 2009 3:01 AM