简体   繁体   English

com.microsoft.sqlserver.jdbc.SQLServerDriver类未找到异常(新)

[英]com.microsoft.sqlserver.jdbc.SQLServerDriver class not found exception (NEW)

Now I am working with Microsoft SQLserver jdbc connectivity when I try to define class.forname 现在,当我尝试定义class.forname时,我正在使用Microsoft SQLserver jdbc连接性

java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

error occurs, everything else is fine, but I dint have any idea about this error. 错误发生,其他一切都很好,但是我对这个错误没有任何想法。

pom.xml: pom.xml:

<dependency>
  <groupId>com.microsoft.sqlserver</groupId>
  <artifactId>sqljdbc4</artifactId>
  <version>4-2.0</version>
  <scope>system</scope>
  <systemPath>D:\my current work(please backup this folder)\backup\12-15-2016\milma_jishnu/src/main/lib/sqljdbc4-2.0.jar</systemPath>
</dependency>

Quoting Maven documentation : 引用Maven文档

System Dependencies 系统依赖

Important note: This is marked deprecated.

Dependencies with the scope system are always available and are not looked up in repository. 与作用域系统的依赖关系始终可用,不会在存储库中查找。 They are usually used to tell Maven about dependencies which are provided by the JDK or the VM. 它们通常用于告知Maven JDK或VM提供的依赖项。 Thus, system dependencies are especially useful for resolving dependencies on artifacts which are now provided by the JDK, but where available as separate downloads earlier. 因此,系统依赖关系对于解决JDK现在提供的工件的依赖关系特别有用,但以前可以单独下载获得。 Typical example are the JDBC standard extensions or the Java Authentication and Authorization Service (JAAS). 典型示例是JDBC标准扩展或Java身份验证和授权服务(JAAS)。

So, <scope>system</scope> tells Maven: This is already present, you don't need to do anything. 因此, <scope>system</scope>告诉Maven:这已经存在,您无需执行任何操作。

Ergo, it is not added to the classpath, and you wonder why it's not there? 嗯,它没有添加到类路径中,您想知道为什么它不存在吗?

Seems you misunderstood the purpose of <scope>system</scope> . 似乎您误解了<scope>system</scope> Don't use it, because the MS SQL JDBC driver is not part of the JDK. 不要使用它,因为MS SQL JDBC驱动程序不是JDK的一部分。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com.microsoft.sqlserver.jdbc.SQLServerDriver 未找到错误 - com.microsoft.sqlserver.jdbc.SQLServerDriver not found error 无法加载com.microsoft.sqlserver.jdbc.SQLServerDriver类? - unable to load class com.microsoft.sqlserver.jdbc.SQLServerDriver? Java Hibernate错误“找不到指定的JDBC驱动程序com.microsoft.sqlserver.jdbc.SQLServerDriver类” - Java Hibernate Error “Specified JDBC Driver com.microsoft.sqlserver.jdbc.SQLServerDriver class not found” 未找到指定的JDBC驱动程序“com.microsoft.sqlserver.jdbc.SQLServerDriver”类 - Specified JDBC Driver “com.microsoft.sqlserver.jdbc.SQLServerDriver” class not found com.microsoft.sqlserver.jdbc.SQLServerDriver的ClassNotFoundException - ClassNotFoundException for com.microsoft.sqlserver.jdbc.SQLServerDriver com.microsoft.sqlserver.jdbc.SQLServerDriver的ClassNotFoundException - ClassNotFoundException for com.microsoft.sqlserver.jdbc.SQLServerDriver 用于“ com.microsoft.sqlserver.jdbc.SQLServerDriver”的ClassNotFoundException - ClassNotFoundException for “com.microsoft.sqlserver.jdbc.SQLServerDriver” java.lang.ClassNotFoundException:无法在新的 docker 容器上加载 class:com.microsoft.sqlserver.jdbc.SQLServerDriver - java.lang.ClassNotFoundException: Unable to load class: com.microsoft.sqlserver.jdbc.SQLServerDriver on new docker container 无法在 Maven 项目中加载 JDBC 驱动程序类 [com.microsoft.sqlserver.jdbc.SQLServerDriver] - Could not load JDBC driver class [com.microsoft.sqlserver.jdbc.SQLServerDriver] in Maven Project java.lang.ClassNotFoundException:com.microsoft.sqlserver.jdbc.SQLServerDriver - java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM