back to forum.

Topic: Howto connect to SQLServer with integratedsecurity

Topic by
asbjorn

2009-10-15
12:22

Howto connect to SQLServer with integratedsecurity

I run into a problem with integrated security I wish to share with the rest of you. Integrated security will only work if you're on a windows box.

If you're using integrated security you have to configure this in two places.
First you need to modify the java command in your datacleaner.bat.
Add the following parameter
 
–Djava.libary.path=<path>Microsoft SQL Server JDBC Driver 2.0\sqljdbc_2.0\enu\auth\x86\
Afterwards add the parameter
integratedSecurity=true 
in your connectionString. You can leave usr/pwd blank.

Reply by
kasper

2009-10-16
07:00
Hi Asbjorn,

Great info, thanks!

Reply by
jawi2300

2010-12-08
12:21
Hi,

On Windows is it not:

-Djava.library.path="C:/Microsoft SQL Server JDBC Driver 3.0/sqljdbc_3.0/enu/auth/x86/"

...use double quotes if there are spaces in path name and use """/""" instead of """\""" as path separator.

Reply by
adiggs

2012-08-02
22:32
The idea of enabling integrated security makes sense to me. I just installed DataCleaner 2.5.2 and I'm not finding a datacleaner.bat file.

Is this an option I would configure from within the GUI now? I'll look for an option to configure the Microsoft JDBC driver (I'm using 4.0) from the GUI (but if anybody has an idea for me, I'm all ears :).

Reply by
adiggs

2012-08-02
23:06
I've found the Manage option where I can add additional JDBC database connection drivers. I believe that I have successfully and correctly added the Microsoft JDBC Driver 4.0. In particular, here's what I did:

1) Download the Microsoft JDBC Driver 4.0 from:
[http://www.microsoft.com/en-us/download/details.aspx?id=11774]

2) Run sqljdbc_4.0.2206.100_enu.exe and installed to the default path (C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu)

3) Using the Manage option in New Database Connection, Add a new driver

3a) Driver name (whatever you want - I called mine MS JDBC 4)

3b) URL hint (copied from the MS Help page)
jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks;integratedSecurity=true;

3c) Driver Class (default value - I didn't change anything here)

3d) Add to Classpath
C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\sqljdbc4.jar


Reply by
adiggs

2012-08-02
23:18
Having completed the steps above to configure the Microsoft JDBC driver, I am getting the following error - my interpretation is that the connection isn't finding the sqljdbc_auth.dll in c:\windows\system32 or c:\windows\system. That file is in both locations, and both locations are in the %PATH%.

Ideas / suggestions? (when I close the loop and get this working, I'll consolidate all the details into a single post for future reference)

---------------------


com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:02119131-9f11-41bc-8d0b-dfe837d7de90
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at com.ataccama.dqc.gui.model.internal.database.DatabaseDriverImpl.getConnection(y:227)
at com.ataccama.dqc.gui.ui.wizards.database.DatabaseConnectionModel.testConnection(y:3403)
at com.ataccama.dqc.gui.ui.wizards.database.NewDatabasePage$1.run(y:2069)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)
... 13 more

Reply by
adiggs

2012-08-02
23:39
For grins, I also attempted the connection using the Microsoft JDBC Driver 3.0 - same exact error.

(General approach for getting it configured was the same as documented above for the 4.0 driver - the only difference was removing the 4.0 sqljdbc4.jar from the classpath, and adding the 3.0 version of sqljdbc4.jar).

Any help, greatly appreciated.

Thanks,
Asoka

Reply by
kasper

2012-08-03
11:01
You can find the datacleaner.bat file if you download the "platform independent" version of DC.

Reply by
adiggs

2012-08-03
19:36
Thanks for that tip kasper - I downloaded that setup, and I believe I have the .cmd file edited into shape. I can launch DataCleaner using the command file and configure the connection.

The error I get now has shifted when I try to connect to the database (connection works fine using the native SQL Server connection driver):

Here's the error - I can throw up the full Stack Trace if it will help:


Unexpected error!


Message:
org.eobjects.metamodel.MetaModelException: Could not establish connection: Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)
Level:
SEVERE

Reply by
kasper

2012-08-03
20:11
Again, I am no expert on MS SQL Server, but I do know a thing or two about Java ;-) So my next tip would be to set the "java.library.path" variable to wherever this SSPI library thing is supposed to be (dont know what it is).

You can set java.library.path using a "-D" prefix on the command line, like this:

java -Djava.library.path=c:\path\to\folder

Hope that provides for yet another small piece in the puzzle :-)

Reply by
kasper

2012-08-03
20:12
Btw. once all this stuff is done and dealt with, I hope we can gather all your experience and write a HOWTO in the documentation for SQL Server connections:

Database (JDBC) connections

I hope you're willing to contribute to this by sharing all your findings :)

Reply by
adiggs

2012-08-03
23:43
Hi Kasper - thanks for the additional idea. Yes - totally onboard with gathering all of this up and getting it into a HOWTO for others. I have a coworker who is trying to do the same thing - once I think I have this right, I'll be able to have him duplicate the process and see how well the documentation is.


Anyway, my error is stable, but I've been able to implement some of the elements discussed above and that I have found elsewhere. Namely:
set JAVA_HOME = C:\Program Files\Java\jre6\bin

copy sqljdbc_auth.dll and ntlmauth.dll to
-- JAVA_HOME
-- c:\windows\system32
-- c:\windows\system
-- java.library.path (as set in DataCleaner.cmd)
[[yes - there's a certain degree of desperation and flailing about here :)]]

Update DataCleaner.cmd by adding to the DATACLEANER_JAVA_OPTS line as follows:
set DATACLEANER_JAVA_OPTS=%JAVA_OPTS% -Xmx1024m -Djava.libary.path="c:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu"

Validate that C:\windows\system32 and c:\windows\system are in the PATH environment variable.

The machine I'm working on is Win 7 - I believe both SQL Servers I've tried connecting to are 2008 R2; I also have a 2012 to connect to (in all cases, using SQL Server Management Studio and the native SQL Server client, I connect easily).


As a reminder, and now with complete Stack Trace, the error I am seeing is:

Unexpected error!


Message:
org.eobjects.metamodel.MetaModelException: Could not establish connection: Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)
Level:
SEVERE
Stack Trace:
Could not establish connection: Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)
org.eobjects.metamodel.jdbc.JdbcUtils.wrapException(JdbcUtils.java:57)
org.eobjects.metamodel.jdbc.JdbcDataContext.getConnection(JdbcDataContext.java:735)
org.eobjects.metamodel.jdbc.JdbcDataContext.initialize(JdbcDataContext.java:183)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:155)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:112)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:175)
org.eobjects.metamodel.DataContextFactory.createJdbcDataContext(DataContextFactory.java:426)
org.eobjects.analyzer.connection.DataSourceDatastoreConnection.<init>(DataSourceDatastoreConnection.java:36)
org.eobjects.analyzer.connection.JdbcDatastore.createDatastoreConnection(JdbcDatastore.java:214)
org.eobjects.analyzer.connection.UsageAwareDatastore.getDataContextProvider(UsageAwareDatastore.java:120)
org.eobjects.analyzer.connection.UsageAwareDatastore.openConnection(UsageAwareDatastore.java:131)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:94)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:51)
org.eobjects.datacleaner.panels.DatastoreListPanel$1.actionPerformed(DatastoreListPanel.java:148)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
org.eobjects.datacleaner.panels.DatastoreListPanel.clickAnalyzeButton(DatastoreListPanel.java:619)
org.eobjects.datacleaner.panels.DatastorePanel$3.mouseClicked(DatastorePanel.java:134)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$000(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
Cannot create PoolableConnectionFactory (I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.)
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
org.eobjects.metamodel.jdbc.JdbcDataContext.getConnection(JdbcDataContext.java:733)
org.eobjects.metamodel.jdbc.JdbcDataContext.initialize(JdbcDataContext.java:183)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:155)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:112)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:175)
org.eobjects.metamodel.DataContextFactory.createJdbcDataContext(DataContextFactory.java:426)
org.eobjects.analyzer.connection.DataSourceDatastoreConnection.<init>(DataSourceDatastoreConnection.java:36)
org.eobjects.analyzer.connection.JdbcDatastore.createDatastoreConnection(JdbcDatastore.java:214)
org.eobjects.analyzer.connection.UsageAwareDatastore.getDataContextProvider(UsageAwareDatastore.java:120)
org.eobjects.analyzer.connection.UsageAwareDatastore.openConnection(UsageAwareDatastore.java:131)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:94)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:51)
org.eobjects.datacleaner.panels.DatastoreListPanel$1.actionPerformed(DatastoreListPanel.java:148)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
org.eobjects.datacleaner.panels.DatastoreListPanel.clickAnalyzeButton(DatastoreListPanel.java:619)
org.eobjects.datacleaner.panels.DatastorePanel$3.mouseClicked(DatastorePanel.java:134)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$000(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:615)
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:357)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
org.eobjects.metamodel.jdbc.JdbcDataContext.getConnection(JdbcDataContext.java:733)
org.eobjects.metamodel.jdbc.JdbcDataContext.initialize(JdbcDataContext.java:183)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:155)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:112)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:175)
org.eobjects.metamodel.DataContextFactory.createJdbcDataContext(DataContextFactory.java:426)
org.eobjects.analyzer.connection.DataSourceDatastoreConnection.<init>(DataSourceDatastoreConnection.java:36)
org.eobjects.analyzer.connection.JdbcDatastore.createDatastoreConnection(JdbcDatastore.java:214)
org.eobjects.analyzer.connection.UsageAwareDatastore.getDataContextProvider(UsageAwareDatastore.java:120)
org.eobjects.analyzer.connection.UsageAwareDatastore.openConnection(UsageAwareDatastore.java:131)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:94)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:51)
org.eobjects.datacleaner.panels.DatastoreListPanel$1.actionPerformed(DatastoreListPanel.java:148)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
org.eobjects.datacleaner.panels.DatastoreListPanel.clickAnalyzeButton(DatastoreListPanel.java:619)
org.eobjects.datacleaner.panels.DatastorePanel$3.mouseClicked(DatastorePanel.java:134)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$000(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1893)
net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:588)
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:357)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
org.eobjects.metamodel.jdbc.JdbcDataContext.getConnection(JdbcDataContext.java:733)
org.eobjects.metamodel.jdbc.JdbcDataContext.initialize(JdbcDataContext.java:183)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:155)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:112)
org.eobjects.metamodel.jdbc.JdbcDataContext.<init>(JdbcDataContext.java:175)
org.eobjects.metamodel.DataContextFactory.createJdbcDataContext(DataContextFactory.java:426)
org.eobjects.analyzer.connection.DataSourceDatastoreConnection.<init>(DataSourceDatastoreConnection.java:36)
org.eobjects.analyzer.connection.JdbcDatastore.createDatastoreConnection(JdbcDatastore.java:214)
org.eobjects.analyzer.connection.UsageAwareDatastore.getDataContextProvider(UsageAwareDatastore.java:120)
org.eobjects.analyzer.connection.UsageAwareDatastore.openConnection(UsageAwareDatastore.java:131)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:94)
org.eobjects.analyzer.connection.JdbcDatastore.openConnection(JdbcDatastore.java:51)
org.eobjects.datacleaner.panels.DatastoreListPanel$1.actionPerformed(DatastoreListPanel.java:148)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
javax.swing.AbstractButton.doClick(Unknown Source)
org.eobjects.datacleaner.panels.DatastoreListPanel.clickAnalyzeButton(DatastoreListPanel.java:619)
org.eobjects.datacleaner.panels.DatastorePanel$3.mouseClicked(DatastorePanel.java:134)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEventImpl(Unknown Source)
java.awt.EventQueue.access$000(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.awt.EventQueue$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.awt.EventQueue$2.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)

Reply by
kasper

2012-08-06
09:23
Hi adiggs,

Only two vague ideas from my side left:

1: The spaces in the path might be a problem. Try moving the file(s) to a location where the full path does not contain spaces. That way the "key-value" parameter is not broken into multiple words.

2: Try moving the -Djava.library.path parameter to to be the first of the parameters to the "java" command. This is because (as far as I recall) Java will otherwise treat it as parameters to the application, not the the JVM. In practice this should not be an issue since DC takes a look for all the -D parameters and promotes them to system properties, but anyways... :)

Reply by
tmmackay

2013-05-16
17:01
I don't know if anyone's still trying to figure out how to do this, but I have this working and here's what I did.

1) Download JDBC driver from Microsoft and unzip.

2) Copy the file "sqljdbc4.jar" into the .\DataCleaner\lib folder. If you do this, you don't have to worry about classpaths.

3) Copy the file "sqljdbc_auth.dll" from the "auth" subfolder of the Microsoft JDBC Driver folder (use either the x86 or x64 version depending on your version of the JVM); copy this file into the .\DataCleaner folder (the same folder that has DataCleaner.exe). If you do this, you don't have to worry about the environment variables.

4) From the DataCleaner Options menu, select the "Database drivers" tab and click "Add database driver".

5) Enter com.microsoft.sqlserver.jdbc.SQLServerDriver as the Driver class name.

6)Select "Local jar files" and browse to the lib folder and select the jar file you copied above. Click "Add database driver"

7) You should now be able to select "Microsoft SQL Server (official)" from the list of more datastore types.

8) When creating the connection string, use the format below:

jdbc:sqlserver://<hostname>;instanceName=<instancename>;integratedSecurity=true;databaseName=<databasename>

I was unable to get it to connect when passing a port number, so I suggest if you aren't using the default instance that you use the instance name syntax shown above. It's working very well for me with integrated windows authentication on a SQL Server 2008 server using a non-default instance and database.

Reply by
tmmackay

2013-05-16
17:01
I don't know if anyone's still trying to figure out how to do this, but I have this working and here's what I did.

1) Download JDBC driver from Microsoft and unzip.

2) Copy the file "sqljdbc4.jar" into the .\DataCleaner\lib folder. If you do this, you don't have to worry about classpaths.

3) Copy the file "sqljdbc_auth.dll" from the "auth" subfolder of the Microsoft JDBC Driver folder (use either the x86 or x64 version depending on your version of the JVM); copy this file into the .\DataCleaner folder (the same folder that has DataCleaner.exe). If you do this, you don't have to worry about the environment variables.

4) From the DataCleaner Options menu, select the "Database drivers" tab and click "Add database driver".

5) Enter com.microsoft.sqlserver.jdbc.SQLServerDriver as the Driver class name.

6)Select "Local jar files" and browse to the lib folder and select the jar file you copied above. Click "Add database driver"

7) You should now be able to select "Microsoft SQL Server (official)" from the list of more datastore types.

8) When creating the connection string, use the format below:

jdbc:sqlserver://<hostname>;instanceName=<instancename>;integratedSecurity=true;databaseName=<databasename>

I was unable to get it to work by passing a port number, so I suggest if you aren't using the default instance that you use the instance name syntax shown above. It's working very well for me with integrated windows authentication on a SQL Server 2008 server using a non-default instance and database.

You need to be logged in to participate

In order to post your own comments on this topic, you need to be logged in.

Username:

Log in by clicking the login link at the top of the screen