I am trying to build my maven project in IntelliJ.
I added the dependency in the pom
file as shown.
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/sqljdbc4-2.0.jar</systemPath>
</dependency>
I also have the sqljdbc4-2.0.jar
in the /lib
folder.
I am able to successfully clean the project and package it. However, when i run the jar on my linux machine it gives me following exception:
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
Please help. Struggling with this for quite some time. Thanks.