无法加载netezza JDBC驱动程序 [英] Cannot load netezza JDBC driver

查看:402
本文介绍了无法加载netezza JDBC驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在spring中配置了一个netezza db.我在类路径

I have configured a netezza db in spring . I have added the dependent nzjdbc.jar in the classpath

Spring配置:

<bean id="QA_CAM_BASE_jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">

    <!-- Initialization for data source -->

<bean id="QA_CAM_BASE_dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName" value="${com.ec.database.driver}"/>
    <property name="url" value="${com.ec.database.url}"/>
    <property name="username" value="${com.ec.database.user}"/>
    <property name="password" value="${com.ec.database.pass}"/>

pom xml config 

<dependency>
    <groupId>org.netezza</groupId>
    <artifactId>netezza</artifactId>
    <version>1.0</version>
    <scope>system</scope>
    <systemPath>${basedir}/src/main/resources/lib/nzjdbc.jar</systemPath>
</dependency>

<resource> 
    <directory>${basedir}/src/main/resources/lib</directory> 
    <targetPath>WEB-INF/lib</targetPath> 
</resource> 
</webResources>

推荐答案

nzjdbc.jar放入本地Maven存储库

Put the nzjdbc.jar in your local maven repository

mvn install:install-file -Dfile=netezza.jar -DgroupId=org.netezza -DartifactId=netezza -Dversion=1.0 -Dpackaging=jar

(在netezza.jar所在的目录中执行此操作

(execute this in the directory where the netezza.jar is located

然后像正常依赖项一样使用它:

And then use it like a normal dependency:

<dependency>
    <groupId>org.netezza</groupId>
    <artifactId>netezza</artifactId>
    <version>1.0</version>
</dependency>

@请参见安装第三方JAR的指南

这篇关于无法加载netezza JDBC驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆