Is it possible to make a connection from Android to Sql server using JDBC with integrated security?

113 views Asked by At

I am new to Android.

I have a problem, when I want to connect Android to SQL Server. On this line:

con = DriverManager.getConnection(ConnURL);

I get an error:

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/ietf/jgss/GSSManager;

Has anybody an idea how to solve it? And is it possible to make the "integratedSecurity=true" for Android? Thank you.

My code:

 try {

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();

        StrictMode.setThreadPolicy(policy);


        String ip = "xx.xx.xx.xxx";

        String ConnURL= "jdbc:jtds:sqlserver://" + ip + ";databasename=C_Teile;integratedSecurity=true;";


        Class.forName("net.sourceforge.jtds.jdbc.Driver").newInstance();



        con = DriverManager.getConnection(ConnURL);
        Log.e("ASK","Connection Called");

    }
    catch (Exception e){
        Log.e("ASK","EX" + e.getMessage());
    }
0

There are 0 answers