KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to establish connection to a database. It's a simple project with using maven. I have problems with sqljdbc_auth.dll I have added mssql jdbc driver and added a dependency in pom.xml <dependency> <groupId>com.microsoft</groupId> <artifactId>mssql-jdbc</artifactId> <version>4.0.0</version> </dependency> This is my try block try { // Establish the connection. SQLServerDataSource ds = new SQLServerDataSource(); ds.setIntegratedSecurity(true); ds.setServerName("BUILDSRV"); ds.setDatabaseName("master"); ds.setIntegratedSecurity(true); con = ds.getConnection(); } and I get this error 21.11.2012 18:07:04 com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit> WARNING: Failed to load the sqljdbc_auth.dll cause :- no sqljdbc_auth in java.library.path com.microsoft.sqlserver.jdbc.SQLServerException: I have my sqljdbc_auth.dll but I don't need to put it to my C:\windows\... I need to add it in my project from maven. How can I do this? I tried to add it to the pom.xml but it doesn't work <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>attach-artifacts</id> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <file>target</file> <type>dll</type> </artifa
Tags (comma-separated)
Save Edits
Cancel