Jump to content

SQLException:This driver with Integrated authenca


vsoneta

Recommended Posts

Hello,

 

I am trying to connect to MS SQL through custom datasource in jasperserver but got exception :

 

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:207)

 

 

Searched the web and found that "sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed." the question is where would I go ahead and install dll ? I have it on C:/WINDOWS and the same code works fine in my other java application. It's just not working in jasperserver application. Please help...

 

Thanks in advance...


  

 

Code:
    CallableStatement proc = null;        String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";        String connectString = "jdbc:sqlserver://XXX;database=XX;user=XXX;password=XXX;integratedSecurity=true";               Connection con = null;            Class.forName(driver);                       try{            con = DriverManager.getConnection(connectString);}catch(Exception e){e.printStackTrace();return null;}try {            proc = con.prepareCall("{call spJDBCSQLConnectionStringNETGet(?,?,?)}");            System.out.println("got the proc");            proc.setString("ConnectionStringName", connectionStringName);            proc.setString("Environment", environment);            proc.registerOutParameter("ConnectionString", Types.VARCHAR);            proc.execute();            String connectionString = proc.getString("ConnectionString");            return connectionString;        } finally {            try {                proc.close();            } catch (SQLException e) {            }            con.close();        }
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Is it possible to have the MS SQL database connection with jasperserver ?

 

I followed the steps mentioned to install the driver.. ie http://www.altova.com/manual2009/Mapforce/mapforce-enterprise/index.html?mffjdbcdriversetup.htm  -- Microsoft SQL Server 2005 JDBC driver 1.1

1) set the path to the where sqljdbc.jar is

2) copied the file .dll to c:/Windows/system32

But still same exception...

Do I need to do something else with jasperserver... as this works perfectly fine with my other application.. it's just with jasperserver it does't work....

Code is posted in the previous message...

Please help, I am just stuck here....

I am using community jasperserver 3.1 v.

 As I see an example in jasperserver 3.5 of an query through custom datasource... But jasperserver 3.5 has new MYSQL db structure (new table and there are dependencyies on exisiting tables). So please tell me wether I can query my MS SQL in customdatasource- java class ? If no then I can try jasperserv3.5... But this will be a big pain.. as I don;t know whether they have migration scripts from 3.1 to 3.5 ...



Post Edited by vsoneta at 04/28/2009 15:11



Post Edited by vsoneta at 04/28/2009 15:32
Link to comment
Share on other sites

Got it working...

1) Added .dll and .jar in Java/JDK/bin
2) Added .jar in tomcat/lib
3) Added .jar in applications/lib
4) Added .dll in windows/system32

add the java/jdk../bin and windows/system32 in "Path" system environment.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...