I have some problems with Orientdb driver for jdbc. i´m using Netbeans, i have include the library JDBC+OrientDB libraries (orientdb-jdbc-2.0.8-all.jar) in the directory and in netbeans, i have also include the connector in the proyect (i have include the connector in the Classpath), but i still have the same problem :

Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:orient:remote:localhost/GratefulDeadConcerts
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at Aconexion.AConexion.main(AConexion.java:15)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

my code:

package Aconexion;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import com.orientechnologies.orient.jdbc.OrientJdbcConnection;
public class AConexion {
public static void main(String[] args) throws SQLException {

Properties info = new Properties();
info.put("user", "admin");
info.put("password", "admin");
Connection conn = (OrientJdbcConnection) 
DriverManager.getConnection("jdbc:orient:remote:localhost/GratefulDeadConcerts", info);

Connection connection = (OrientJdbcConnection)
DriverManager.getConnection("jdbc:orient:remote:localhost/GratefulDeadConcerts", info);
}catch (ClassNotFoundException e) {

Code example


the problem is that you need to put in a direct way the user, eliminate info

DriverManager.getConnection("jdbc:orient:remote:localhost/GratefulDeadConcerts", "root", "password");


Apparently, the JDBC driver needs to be loaded before the connection is made by Class.forName("com.orientechnologies.orient.jdbc.OrientJdbcDriver").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.