Can't get Connection, missing classpath?
Posted by: Bo Vargas
Date: September 12, 2008 09:18AM

Tony,

I did want you said but I am now getting the following error. Java.SqlDriverManager.GetConnection(Unknow Source).

I created a jar file which had this code inside...

AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
// privileged code goes here, for example:
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null; // nothing to return
}
});


conn = DriverManager.getConnection("jdbc:mysql://localhost/wbem?user=root&password=password");

This Jar file contains a provider which will be loaded by WBEM. What other classpath I'm I missing?

Regards,



Edited 1 time(s). Last edit at 09/12/2008 12:26PM by Bo Vargas.

Options: ReplyQuote


Subject
Written By
Posted
December 04, 2007 05:39AM
Can't get Connection, missing classpath?
September 12, 2008 09:18AM


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.