Quantcast
Channel: SCN : Popular Discussions - SAP MaxDB
Viewing all articles
Browse latest Browse all 1545

[-4008]: Unknown user name/password combination (MaxDB, Java)

$
0
0

Hey,

 

I'm having some troubles to connect to MaxDB using Java. I'm getting some error when I try to run my program.

 

import java.sql.*;

public class Hello
{
public static void main(String[] args)
     throws ClassNotFoundException, SQLException     {          String username = "DBM";          String password = "azerty";          String dbname = "SAPDB";          Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");          Connection connection = DriverManager.getConnection("jdbc:sapdb:" + dbname, username, password);                ...     }
}

 

Exception in thread "main" com.sap.dbtech.jdbc.exceptions.DatabaseException: [-4008]: Unknown user name/password combination

     at com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:69)

     at com.sap.dbtech.jdbc.ConnectionSapDB.throwSQLError(ConnectionSapDB.java:768)

     at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:434)

     at com.sap.dbtech.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:325)

     at com.sap.dbtech.jdbc.ConnectionSapDB.doConnect(ConnectionSapDB.java:277)

     at com.sap.dbtech.jdbc.ConnectionSapDB.<init>(ConnectionSapDB.java:81)

     at com.sap.dbtech.jdbc.DriverSapDB.connect(DriverSapDB.java:184)

     at java.sql.DriverManager.getConnection(Unknown Source)

     at java.sql.DriverManager.getConnection(Unknown Source)

 

I checked the User  and Password  with the GUI (Database manager) and everything works fine.

 

I've also added the .jar in my Project Library.

 

Any ideas ?

 

Thanks


Viewing all articles
Browse latest Browse all 1545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>